Question

I have a simple ATMEL micro-controller with an LED light on a board connected to a Nexus tablet through a FTDI-232 cable and a USB->micro-USB OTG cable.

The device is not recognized if:

1)FTDI cable is connected to the board + micro-controller
2)The OTG cable is connected to the FTDI cable
3)OTG cable is connected to the tablet

It is recognized if:

1)The FTDI cable is connected to the board + micro-controller
2)the OTG cable is plugged into the tablet
3)the FTDI cable is plugged into the OTG cable

It is recognized if:

1)FTDI cable is plugged into the OTG cable
2)OTG cable is plugged into the tablet
3)FTDI cable is plugged into the board + micro controller

I also have an Arduino UNO board that works independent of the connection order.

I need it to work for the first example where the OTG cable is connected to the tablet last.

EDIT: After looking around a bit and testing some things I think the OTG cable decides which device is the host based on the first device that has power. If I remove power to the ATMEL board/chip and then plug in the whole thing it sets the tablet as the host.

So I need some way to force set the Nexus7 Tablet as host even if it is already plugged into a powered device.

Was it helpful?

Solution

Are you running any apps on the android side when messing with the FTDI device? Or just some Arduino code?
If you are running an Android app, do you have this line in your manifest?
<uses-feature android:name="android.hardware.usb.host" android:required="true"></uses-feature>
And still in the manifest, but in between the <activity></activity>:

 <intent-filter>
     <action android:name="android.hardware.usb.action.USB_DEVICE_ATTACHED" />
 </intent-filter>

 <meta-data android:name="android.hardware.usb.action.USB_DEVICE_ATTACHED"
     android:resource="@xml/device_filter" />`

Those following lines are present in my AndroidManifest.xml file to allow my app to talk to FTDI devices I'm working with currently. Again, if you aren't actually running any Android code, then disregard please! I do hope it can help though. I'm developing on a Samsung Galaxy Tab 2 7.0, in hopes of expanding to other tablets soon. So if you can get things working on the Nexus 7, I'd really appreciate knowing about the success!

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top