On 18/08/13 13:01, Anton Smirnov wrote:

Android can return file descriptor for native code:
http://developer.android.com/reference/android/hardware/usb/UsbDeviceConnection.html#getFileDescriptor() <http://developer.android.com/reference/android/hardware/usb/UsbDeviceConnection.html#getFileDescriptor%28%29>
Does libusbx support it?


Not currently. It would be quite a change to be able to support it as libusb would need to map the open file descriptor back to a bus and device, which would be hard.

An alternative choice would be to add an Android backend which makes use of JNI to invoke the UsbDeviceConnection APIs, although that would be equally tricky.

What are you trying to do?

If you want to get a list of devices for use with libusb you should call the libusb API for it ( libusb_get_device_list). If you want to use the android.hardware.usb.* APIs to access the device you should use those APIs.

Also libusb or android has the next issue for ftdi-devices:
https://code.google.com/p/android/issues/detail?id=58873


I'm not familiar with libftdi, but even if libusb somehow supported the android.hardware.usb.* APIs, wouldn't you need to make changes to libftdi to get it to call the passing file descriptor APIs?

Regards,

Toby
------------------------------------------------------------------------------
Get 100% visibility into Java/.NET code with AppDynamics Lite!
It's a free troubleshooting tool designed for production.
Get down to code-level detail for bottlenecks, with <2% overhead. 
Download for free and get started troubleshooting in minutes. 
http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk
_______________________________________________
libusbx-devel mailing list
libusbx-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libusbx-devel

Reply via email to