3

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.

182764125216
  • 931
  • 14
  • 38
  • 2
    No, the OTG cable has no smarts to make a decision, just two shorted pins. It is more likely that the time the tablet takes to switch itself into host mode is preventing it from enumerating the FTDI chip. When you plug the OTG cable in first, the tablet is already switched by the time you connect the FTDI chip. You might be able to solve the problem with a resistor and capacitor to hold the chip in reset for a bit after connection powers it, and hope that this gives the tablet time to get ready to be a host. – Chris Stratton Nov 12 '12 at 20:07
  • +1 to what @ChrisStratton said; sounds like the likely explanation to me too. Interesting bug/issue; I would have expected the master to hold the bus in some reset state (upon OTG detection) for long enough to avoid this.. – mik3y Nov 15 '12 at 09:13

1 Answers1

4

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!

Steven_BDawg
  • 796
  • 6
  • 21
  • YES! I had the and parts but didn't have the part. That did it. Sorry about the delayed response, I finally got the final product back for testing the tablet interface. I was going back through working out all the bugs and came back to this. – 182764125216 Mar 14 '13 at 20:10
  • It's okay! I've been on the site since YOU last commented, but it just now told me you responded. I'm glad to be of help! – Steven_BDawg May 07 '13 at 18:14