On 28/10/13 09:28, Rasmus Bisschop-Larsen wrote:
> Yes I have read the Android README maybe 10 times but it is not very 
> clear about how to get this to work. As I wrote (..."I can get file 
> descriptors (fd) through both libusbx and the android library 
> UsbDeviceConnection.getFileDescriptor() but I cannot figure out where 
> to pass the latter fd to libusbx in order to use it to open the 
> device.") it is part of my problem. I can see that libusb_init do get 
> fd for the device (actually two) and I can see that these are not the 
> same as the one I get with UsbDeviceConnection.getFileDescriptor(). It 
> still leaves me with the problem of how to pass the fd to libusbx if 
> that is the way to get it to work. Through a 
> UsbManager.hasPermission(device) call in the android's java I know 
> that I have permission to the device.

I've not tried it myself, but some people on the mailing list have 
reported some success with passing fd between the Java API and a 
modified libusbx: 
http://libusbx.1081486.n5.nabble.com/Libusbx-devel-libusbx-android-support-132-td1779.html

I am planning on adding support to libusbx for better interaction with 
Android's UsbManager, but I've not had the time yet to even look into 
the best way to implement it yet. My initial thinking was that it'd be 
worth making a new Android backend which used JNI to invoke the 
appropriate UsbManager APIs. That might however turn out to not be the 
best approach.

Regards,

Toby

------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from 
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60135991&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