FTDI - LIBUSB problem

358 views
Skip to first unread message

Stefkos

unread,
Jan 28, 2014, 5:43:07 PM1/28/14
to andro...@googlegroups.com
Hey

I compiled libusb and ftdi without big problems and want develop software with using chipset FT2232. 0x0403. 0x6010.
Most things went ok, program even found device but when I want open it I receive error: -3 from libusb: LIBUSB_ERROR_ACCESS

My first call from java:
int ok = ftdlib.ftdi_usb_open( con1, 0x0403, 0x6010 );
then JNI:
ret = (jint)ftdi_usb_open( con[ intnumber ], 0x0403, 0x6010 );//vendor, product );
ftdi.c:
if ( ( var = libusb_open(dev, &ftdi->usb_dev) ) < 0)
            {
                __android_log_print(ANDROID_LOG_INFO, "LIBFTDI", "ftdi OPEN USB fail" );
                ftdi_error_return_free_device_list( var, "usb_open() failed", devs);    //-4
            }
and here I cannot open it:
if (hpriv->fd == -1)
    {
        hpriv->fd = open(filename, O_RDWR);
        __android_log_print(ANDROID_LOG_INFO, "LIBFTDI", "Open path ---> %s  - %d", filename, hpriv->fd );
    }
// *** PrimeSense patch for Android ***
   
    if (hpriv->fd < 0) {


How to solve that?

Will this solution work for me?  http://stackoverflow.com/questions/7415346/how-to-give-dev-bus-usb-permissions-for-libusb-android-applications   (works on linux)
Will I have access to device from Java API?

Regards Pawel

Stefkos

unread,
Feb 1, 2014, 6:01:26 AM2/1/14
to andro...@googlegroups.com
If someone is interested in.
Solution described in url almost works for me (I have one issue and don't know if its hardware problem or software).
At least libusb doesnt return "ACCESS DENIED" information.

Regards
Reply all
Reply to author
Forward
0 new messages