|
From: Antão A. <ant...@gm...> - 2016-03-17 09:27:24
|
On Thu, Mar 17, 2016 at 5:09 AM Xiaofan Chen <xia...@gm...> wrote: > On Thu, Mar 17, 2016 at 1:30 AM, Antão Almada <ant...@gm...> > wrote: > > > > On Wed, Mar 16, 2016 at 12:54 AM Xiaofan Chen <xia...@gm...> > wrote: > >> > I'm using Android USB Accessory mode where the connected device is > >> > the host and implements Android Open Accessory (AOA). My app is not > >> > running on the host and the issue now is that the device does not show > >> > up in the device enumeration... :( > >> > >> In that case,your issue has nothing to do with libusb. libusb is only > >> for the host side. But your Android device is not the host in this > >> mode. You should forget about libusb in this case. > > > > > > I don't believe that's true. > > I am 100% sure libusb for Linux is only for the host side. If > Android is different from Linux in this regard, that will be > interesting to know. > > Ref: > > https://github.com/libusb/libusb/wiki/FAQ#Can_libusb_be_used_on_the_USB_device_side_eg_Linux_Gadget_Device To my best knowledge, libsub is designed to be on the host, only because the usb_device structure contains fields for that specific case. In the heart of libusb there is only a file descriptor and calls to ioctl, just like in the Android UsbDeviceManager: https://android.googlesource.com/platform/frameworks/base/+/jb-release/services/jni/com_android_server_UsbDeviceManager.cpp I've seen several people arguing that libusb has no place in Android. My opinion here is that it's good to have an alternative. Although Android is open, it takes a long time to get a fix and most devices will never get that update. I'm having an issue with Android accessory mode and their development team decided to set all related issues to obsolete. The lack of an alternative is jeopardizing the product I've been working on for a year. > > An Android accessory is available as a /dev/usb_accessory file: > > https://books.google.pt/books?id=0cuQAwAAQBAJ&pg=PA93 > > > > It requires some changes on the backend but I'm sure it is possible. > > If you are sure go ahead to propose the changes. > > > You'd better be sure about what you're saying before replying to > > emails on the mailing list. > > Anyway I will stop here and maybe others can help you better. > Thank you for your feedback but I'm getting frustrated with this issue, my job is at risk and I'd like to find people helping forward, not setting barriers that are simply artificial. Android is the most common Unix-based OS nowadays. > -- > Xiaofan > > > ------------------------------------------------------------------------------ > Transform Data into Opportunity. > Accelerate data analysis in your applications with > Intel Data Analytics Acceleration Library. > Click to learn more. > http://pubads.g.doubleclick.net/gampad/clk?id=278785231&iu=/4140 > _______________________________________________ > libusb-devel mailing list > lib...@li... > https://lists.sourceforge.net/lists/listinfo/libusb-devel > |