USB Droid and Bluetooth

The USBDroid provides USB Host functionality for use as an Android peripheral as an Open Android Development Kit board. [Product page]
Post Reply
geek_tk
Posts: 5
Joined: Sat Dec 31, 2011 11:52 pm

USB Droid and Bluetooth

Post by geek_tk » Thu Jan 05, 2012 3:20 am

Any chance I could get some instructions or a tutorial on how to get Bluetooth up and running via this board with a Digitech USB Bluetooth dongle?

Something along the lines of this tutorial:
http://www.arduino.cc/playground/Learning/Tutorial01

Would be very helpful. I'm sure a lot of folks will be buying this USB Droid and trying to get Bluetooth running through it.

Thanks.

geek_tk
Posts: 5
Joined: Sat Dec 31, 2011 11:52 pm

Re: USB Droid and Bluetooth

Post by geek_tk » Thu Jan 05, 2012 6:54 am

This page has some useful code, but I'm not sure if it can be adapted to work with the USBDroid:

http://www.circuitsathome.com/mcu/bluet ... o-usb-host

and another one:

http://ytai-mer.blogspot.com/2011/10/io ... ables.html

I'll keep adding bits and pieces here until I find a solution, in case someone else who comes along needs the same info.

THE USB Droid has a 1 x USB "A" connector using the MAX3421 chipset. Uses pins D9, D10, D11, D12, D13. So in the library that I need to write (unless someone points me to one) I need to assign these pins to the Bluetooth connections (Tx, Rx, GND etc.) right?

Here's the datasheet for the MAX3421E http://www.sparkfun.com/datasheets/DevT ... X3421E.pdf

And here's a USB Host library that I think works with the USBDroid:
http://www.circuitsathome.com/mcu/progr ... ry_release

LukeW
Posts: 91
Joined: Tue Nov 01, 2011 10:14 am

Re: USB Droid and Bluetooth

Post by LukeW » Fri Jan 06, 2012 12:26 am

http://www.circuitsathome.com/mcu/bluet ... o-usb-host

That should work with the USBDroid, either as-is without any changes or with minor changes, because it uses the same sort of USB host controller chipset as the USBDroid.

That chipset talks to the microcontroller over the SPI interface, using pins 11, 12 and 13, as well as an extra pin for chip select (often pin 10, sometimes not) and an extra pin bringing out an output from the MAX3421 chip to throw an interrupt to the AVR.
THE USB Droid has a 1 x USB "A" connector using the MAX3421 chipset. Uses pins D9, D10, D11, D12, D13. So in the library that I need to write (unless someone points me to one) I need to assign these pins to the Bluetooth connections (Tx, Rx, GND etc.) right?
I'm afraid it's a lot more complicated than that, because the Arduino talks to the USB host controller chipset over SPI, and the USB chipset is configured and controlled appropriately so that it can talk in a meaningful way to whatever the USB device is that it's connected to.

But if we just make sure that all the pins on the USBDroid's AVR for communications with the USB host chip (3 SPI pins, plus the chip select one, plus the interrupt if that interrupt is needed) are connected to the same Arduino pins as they are on the USB Host Shield board, then that example code should just work without any changes.

Olivier
Posts: 3
Joined: Thu Jan 05, 2012 10:22 am

Re: USB Droid and Bluetooth

Post by Olivier » Fri Jan 06, 2012 4:51 am

I have a Flytouch 2 (10.2") with USB ports all over it (ok, just two).
I plugged-in a USB Bluetooth dongle I had been fooling around with on my iMac.
The Flytouch "recognized" my Apple Magic Mouse within seconds of turning the tablet and mouse on. This was fun and encouraging so I tried for days to get my Flytouch to "see" other devices through this BT dongle. Fail fail fail.
Today it popped into my head to try something new.
Step by step:
- put the BT dongle in your desktop machine.
- use the Bluetooth stuff on the desktop to pair your keyboard and mouse.
- make sure all the paired devices are "connected".
(note: this took some fiddling around, toggling the power for the internal Bluetooth radio on the iMac and what have you.)
- put the dongle back into your MID pad.
- fool around a little with the power switches on the mouse and keyboard.
If this works for you as it does for me, you will have your Bluetooth keyboard and mouse talking to your Android tablet!
There is no reason I can think of that this approach will not work on a Windows machine as well as on a Mac.

Why did I bother to tell the Interwebz about my Earth shattering "discovery"?
I want my Earthmate to "talk" to the GPS enabled applications in Android and so far, all the Bluetooth GPS Toggles, Gadgets, and crap in the Android Market make the assumption that your Bluetooth radio is internal to your tablet/phone and none are "aware" of Bluetooth attached by USB. Why the heck didn't this Flytouch come with a BT radio installed?

geek_tk
Posts: 5
Joined: Sat Dec 31, 2011 11:52 pm

Re: USB Droid and Bluetooth

Post by geek_tk » Fri Jan 06, 2012 11:53 am

Here's another very similar project that might be adaptable:

http://code.google.com/p/yanis-android- ... ontroller/

Post Reply