Menu

#2 licut_probe.cpp endpoint class_dirname not found on recent Linux kernel (or my particular distro)

v1.0 (example)
open
None
5
2016-07-06
2016-07-06
Geremia
No

I don't know much about Linux USB interfacing, but I'm having trouble getting the endpoint open. Line 62 of licut_probe.cpp is not correct for recent Linux kernels (or at least not for my distro, Slackware):

sprintf( class_dirname, "/sys/class/usb_endpoint/usbdev%u.%u_ep%02x/device", bus, device, test_ep );

I don't have a /sys/class/usb_endpoint/ directory. What should I use instead?

Also, I've had to apply this patch to get the USB ID / bus numbers correct:

--- a/licut_probe.cpp
+++ b/licut_probe.cpp
@@ -37,8 +37,8 @@ int LicutProbe::Open( int verbose /*= 0*/ )
        if (verbose) printf( "Opened lsusb -v\n" );
        while (fgets( buff, sizeof(buff), lsusb ) && !found_devname)
        {

-           // Pared down search from "ID 0403:6001 Future Technology Devices International"
-           if (!in_ftdi && !found_ftdi && strstr( buff, "ID 0403:6001" ))
+         // Pared down search from "ID 20d3:0011 Future Technology Devices International"
+         if (!in_ftdi && !found_ftdi && strstr( buff, "ID 20d3:0011" ))
                {
                        in_ftdi = true;
                        found_ftdi = true;

Discussion


Log in to post a comment.

MongoDB Logo MongoDB