[Q] Looking for confirmation - no USB accessory support - General Topics

Hello.
I have a machine with a USB host and a USB accessory port.
I have successfully got an Android tablet to talk to the machine, using an OTG cable which puts the tablet into Host Mode (using the machine accessory port).
This has a couple of problems, one of which is charging while in host mode.
I am now trying to keep the tablet in accessory mode, and connect to the host port on the machine.
My research suggests that Android has no support for running as the accessory.
The ADK sample code clearly seems to intended to run on a host (as it enumerates accessories).
I know the tablet supports an accessory mode because when I plug it into a PC, it mounts as camera or storage.
I can understand why they would not expect a keyboard or hub to be running Android, but there do seem to be some legitimate use cases.
Can anyone confirm my understanding, that there is no way to run Android as the accessory ?
Thanks.

I have since found the Android Open Accessory Protocol. Using information from ver 1 and 2 of the protocol, I found enough info to switch the android device into the special android-accessory mode. Note that on Linux, you may need to change the adb program so it is owned by root if you want to run the debugger over the new connection.

Related

[Q] Android and micro usb peripherals

I'd like to connect to android powered tablet several peripherals (through micro usb I guess) like: couple of rs-232 ports, keyboard and even one rj12 port.. as I guess it's possible to create usb-hub-device to all this functions, and develop drivers for it.. I just never dealt with stuff like this before. What of it is possible and mb android have built-in support of some interfaces and devices..? goal is to make cheapest solid touch tablet based complete device.
For this to work, your Phone needs special USB-OTG-capable hardware. I doubt it has. If you don't know what it is and why it is definitely needed, google for USB OTG (on-the-go).
Of course, a simple USB host connector would do as well, but no phone has one (but some tablets do).
No android phone out now has USB host support, nor the drivers to run any peripherals.
thx for answrs, looks like its possible but I need to port usbhost module to device kernel.. and perpherals drivers modules too.

Host mode support on Nexus S developments?

hey guys came across an interesting discussion! i cant post in dev boards yet... however, this guy provides some answers, maybe some of the elders may want to take a look. EDIT: i cant even post an outside link read code box i guess...
Code:
Hi All,
I've spent some time today dithering on the Nexus S and host mode and I think the way to approach this is different from the Nexus 1 host driver hack.
The Nexus S uses a Fairchild USB switch (fsa8480) to detect device connections. I believe the point is to allow the device to handle multiple functions like charging, UART and USB access simultaneously.
The Switch will detect OTG connections. Plugging in a microB to A convertor with pin 4 grounded to 5 causes the fas9480 driver to wake up and report an OTG attachment. It also calls into the S3C_UDC_OTG driver to configure it up and create a vbus session. (start charging)
The problem is that in the Nexus S kernel, this driver is device mode only. There is no code to put it into Host mode and the chip can only be in Host or device mode. It can't do both at the same time. Also, the few people that have tried to use host drivers have found that they must disable the device code (including charging capability) to get the hubs to enumerate.
It appears that the OTG core in the samsung part is from DesignWare. There are synopsis reference drivers up here:
*************check edit reason for driver link*****************
The register map appears the same, and the code supports host and device mode as well as dynamic switching based on HNP negotiation.
It seems like the best way to approach this would be to integrate this code and use the fsa9480 discovery as the hook to force host mode (when OTG is detected) or device mode when other devices are detected.
The demo we were under the gun to support will probably just use Nexus one, however I thought the rest of you guys would want to see this. I think if done right, you could have host mode, gadget mode and charging all in the same kernel.
Steve
--
Steve Modica
CTO - Small Tree Communications
---not my words, or even me. just though people may want to know!

Share USB connection over Wifi/Bluetooth. Possible?

Is there an app/program or is it otherwise possible to share a usb device plugged into an android phone with a desktop computer, or vice versa over wifi or bluetooth. For example plugging a DSLR into my android phone and having it show up on the desktop computer as if it were connected via usb. There would be a ton of uses for this if it is possible. It would change your phone into a sort of wireless USB port.
there is software USB Network Gate with Win and Linux versions which probably could help you, but I don't know if it will work with Android...
I had run into USB Network Gate in my search for something similar for android. Seems like a great tool. If only it were able to run on android and was a bit cheaper.
Anyone know of something like this that will run on android?

Connect emulated device on Linux to a car (Android Auto)

Hi!
I'm trying to establish a connection between an Android Virtual Device and a car. The goal is to run the AVD on a Linux laptop and connect it to the car via USB. Ideally the AVD would recognize the car's HU (and also the other way around) which should make it possible to use Android Auto.
I read a lot about the Android Open Accessory Protocol and how the connection is established. I also found posts about people tunneling USB connections from a Linux host to an Emulator using the command below:
emulator @AVDname -qemu -usb -device usb-ehci.id=ehci -device usb-host,vendorid=0x----,productid=0x----
Some also say you need to build a custom kernel beforehand so that USB on the Emulator is enabled in the first place. So far the Linux machine doesn't recognize the HU at all, which makes it impossible to use the USB tunnel since I don't know the vendor and device id.
The HU probably acts as host and expects a device, so does the Linux machine. This is somehow where my progress stopped.
Does someone know if that kind of connection is even possible with a emulated device? Do AVD's support the Accessory Mode in the first place? Is there a way around this Host to Host problem?
Any hints or ideas would mean a lot to me!

I need an android device with some oddly specific requirements

I need an android device with
- arm64 app support
- Android 7.1+
- Separate HDMI and USB ports
- Preferably more than 2GB of ram
It can be any sort of device (tablet, tv box, SBC, etc.) but the USB port *must* fully support usb accessory mode (what Android Auto uses). I already tried a Raspberry Pi 4 with KonstaKang's ROM on it but accessory mode wasn't working right. My end goal is to install the DJI Fly app on the device so I can connect my drone remote to it and have the video from it on a big screen without the latency that comes with casting over wifi. The remote acts like a usb host and triggers accessory mode so that's why I need a separate HDMI port.
Tablets with USB Port & HDMI - Buy Online
Looking for Android Tablets with HDMI Input & USB Ports? We've done the research and found Android Tablets with HDMI Input & USB Ports for you to buy online now!
www.expertproductguide.com

Categories

Resources