[Q] [Q / Dev / USB] Unable to claim interface (official ICS) - General Questions and Answers

Hello. That's a vague question :
I have a custom USB device (class 0xff) and I want to communicate with it using my Android phone. I'm on ICS "stock" (original), and official API provides USB functionnalites.
I use a Java and C API to communicate with my device from my computer (libusb), so I though that it could be possible to do the same with my Androphone, and an OTG USB cable.
But my problem : When I plug the device to the Smartphone, it is correctly detected (and powered). Endpoints are correctly listed, and I can retrieve the serial name. But when I call the "claimInterface" function (Android API), it fails. I don't understand why, because the class of my device is unspecified and shouldn't be handled by Android OS or other App.
When I do a diagnostic with the XDA USB Host test software, I get "yes" in line "claimed" (Base API).
I realize that my question is too specific. My hope is to find someone who has already worked on this kind of problem, or who knows the limits of the USB host.
Thanks in advance.
(My phone is not rooted)

EDIT : Rooted. Same problem :/

Related

[Q] USB Host mode in iberry BT07i

I am developing an android terminal application to communicate with USB-serial devices.
I have iberry BT07i running ICS 4.0.3 with 3.0.8 kernel. Build number is given as crane_evb-eng 4.0.3 IML74K 20120418.
My tablet is already rooted.
The tablet has usb otg port with host adapter and it powers the usb bus also.
When USB mass storage device is connected, it is detected and I am able to see the contents. Also when I connect USB serial devices like FTDI/prolific they are detected through USB Device Info application in linux mode. But when I came to know from the iberry support that host apis are not enabled in this tablet.
My app need to work in all devices with usb host api support without rooting. Is there a way to enable the host apis in my tablet through custom roms?

[Q] 3g USB Modems

I have a Huawei E160 USB 3g adapter that I would like to be able to use with my TF300T. It appears to be supported in the kernel as it assigns itself to ttyUSB0 and ttyUSB1 according to dmesg run from a console emulator.
I have also connected to the modem using a serial terminal emulator "Slick USB 2"
On typing "ATI" into the connection I get the following:
Manufacturer: huawei
Model: E160
Revision 11.604.18.00.00
IMEI ***********
+GCAP: +CGSM,+DS,+ES (copied by hand so excuse any minor errors)
It therefore seems that the device is seen as a serial device and can be communicated with but there are no 3g options from the menus of the Asus firmware.
Does anyone know if this functionality can be added on by a third party app, if it needs rooting and an update.zip or if it will require a fresh ROM?
Use UMTS Manager which you can find in the Play Store. To work correctly it will need a rooted device.
hi, i have an huawei e 355 and it work well,soon and with no problem or configuration with mobile wifi app

Create virtual devices (slave mode)

I need to find out a way to develop an app that creates two virtual devices on the usb port but still in usb slave mode. Here is what I need to do:
Install my app on android.
Connect my android via usb cable to a Windows CE host.
Windows CE will detect two devices:
1. USB MASS STORAGE (android app will map this to a fs image file - can be readonly)
2. Standard serial port (android app will read and write to this port to communicate to a specific app on WinCE).
Is there any APIs that helps me to do this? I can only find docs about USB HOST mode and thats not what I'm looking for.

Phone not recognized in Download mode (trying to root / update with .kdz)

Phone model H955, Windows 10 x64, following drivers installed: LGUnitedMobileDriver_S51MAN313AP22_ML_WHQL_Ver_3.13.2 (which installed LGE Mobile USB Modem AFAIK)
In download mode phone is recognized as LGE Android MTP Device and there is no adb interface in control panel, also it doesnt install the device and it says CODE 10 (This device cannot start).
When i connect the phone when it's booted (normal mode), it correctly shows my phone's name and adb interface (with usb debugging enabled).
Any idea what is wrong? (and yes im connecting using USB2 port, using original usb cable)
Im about to give up, this is beyond stupid.
Let me add screenshot to show how it looks like, maybe it's supposed to be like this. (?)
same problem here, any fix, only flash tool works even installed the drivers 4.0.4 to test and the same result error code 10 but if the phone is on the,driver works fine the, usb debug is always on
link for 4.0.4 driver
http://www.mylgphones.com/lg-android-usb-device-drivers
This may be a bit late but did you manage to fix it?
Same issue on my H950 G Flex 2. Been searching for weeks for a driver that works in Download mode.

Asking for help. USB 3.0 Type A to Type A Male device from a Chinese Manufacturer

Hello xdadevelopers.
Android dev here. So here is my situation. I ordered an android device from a Chinese manufacturer. It only has USB 3.0 input. I am trying to compile and run my code on the device via a usb 3.0 Type A, male to Type A, male cable. After connecting the usb to my computer, it does not recognize my device. From here, I assumed it is because the manufactured device does not have a usb driver so am trying to install one onto the device. Is this correct to assume? Beyond this point, android documentation does not list the usb driver for my manufacturer because the manufacturer is not mainstream. Anyone have any insight as to how I can install a driver onto this alien device?

Categories

Resources