Since Kristian’s release of SPP service for USB Host 2.0 library I got many e-mails with questions about Bluetooth serial communications in general and using the SPP class in particular. While establishing a Bluetooth connection is quite easy when using PCs/smartphones/tablets, the Arduino implementation is less user-friendly (for a good reason) and somewhat confusing. This article is intended to be a short tutorial of Arduino USB Bluetooth connectivity using an Android device as a peer – in my opinion, the simplest one to set up and communicate.
To follow this tutorial, you will need the following:
- An Arduino board ( I sell them too )
- full-size USB Host Shield 2.0
- USB Host Shield 2.0 library downloaded and installed in your Arduino library directory
- An SPP example sketch
- Bluetooth dongle – see below for detailed discussion
- Android device – a phone or tablet. The accuracy of this tutorial has been checked on Nexus S phone and Nexus 7 tablet, both running Jelly Bean 4.1.1 OS.
- A Bluetooth terminal emulator app for Android – I use Blueterm
The hardware setup is shown on the title photo (click on it to make it larger). It is a good idea to use external power supply at least in the beginning – some Bluetooth dongles are not happy when powered together with Arduino board/USB Host shield from USB cable. On a side note, it is always a good idea to use external power supply while experimenting with USB devices, especially when using current Arduino boards with their weak regulators. Also, Bluetooth code requires plenty of resources. The example used in this article compiles in ~24K and even though it would work on standard Arduino, any meaningful project will likely require a bigger board, like a Mega.
Finding compatible Bluetooth dongle could be tricky. Many will work; a pile of dongles in the foreground represent compatible ones. Older dongles from Belkin, D-Link and Kingston are all good. Most Chinese dongles from eBay are likely good too. Among brand names, Asus dongles won’t work. Bluetooth dongle sold by Sparkfun is an example of incompatible Chinese product.
Here’s how the terminal output looks like when compatible dongle is used:
1 2 3 4 5 6 7 | SPP Bluetooth Library Started Bluetooth Dongle Initialized No response to HCI Reset HCI Reset complete Local Bluetooth Address: 00:0C:76:46:1A:D6 The name is set to: Arduino Wait For Incoming Connection Request |
Note line 3. You may or may not see this message. In any case, the output similar to the one above is an indication of a good dongle. Also note device address – if you have many active BT devices around you this address will help you find your Arduino in the pairing list.
Now let’s look at the dark side. The following terminal output is typical for an incompatible dongle:
SPP Bluetooth Library Started Unknown Device Connected - VID: 0CF3 PID: 3000 BTD Init Failed, error code: 209 |
Here is another one:
SPP Bluetooth Library Started getConf BTD Init Failed, error code: 13 |
You may also receive an output which is even less informative. Sometimes, only the first line is printed. Sometimes, some random garbage is printed. And sometimes, no output is given at all. All this mean your dongle is incompatible with library code and you need to find a new one. Here’s some closeups of my bad dongles.
A little ASUS dongle has downloadable firmware. When used on Windows machine, a dongle appears on the bus as a proprietary device, the driver detects it, loads the firmware and resets the dongle. After reset the dongle comes up as a typical Bluetooth. Due to the limited resources this process is difficult to implement on Arduino therefore this dongle is not supported.
Other two dongles are equipped with strange controllers which don’t like MAX3421E for some reason. I have several others packaged in similar cases. There is a lot of dongles looking like this on eBay – don’t buy them, they don’t work very well with a PC either.
It’s now time to move to the part 2 – connectivity. Assuming that a compatible dongle is attached and sketch is displaying ‘Wait For Incoming Connection Request’ line it’s time to switch attention to the Android device. The steps and screenshots (click on them to make them larger) are enumerated below:
- Go to ‘Settings’ and make sure Bluetooth is turned on as pictured. It is also a good idea to check if any remnants from previous pairing attempts are present – tap on Bluetooth and see if any Arduinos are listed as paired and if so, unpair them
- Open Blueterm. The opening screen will say ‘not connected’ in the upper right corner. Go to ‘Settings’ (device dependent, mine has an icon under the screen, second from the left) and tap on ‘Connect device’. The next screen appears.
- Tap on ‘Scan for devices’. If you have made pairing attempts before, you will see the list of paired devices. You can try to connect to the device from the list, however, I found it less reliable so I suggest to start with a clean list (see 1.)
- After a short time the next screen pops up. This is pairing request sent from Arduino. Tap on the form field
- Type a PIN and press ‘Done’. On the next (or is it previous?) screen tap ‘OK’
- This is the final screen with ‘Hello from Arduino’ line transmitted via Bluetooth. It is now possible to type in an Android or Arduino terminal window and see letters appear in another terminal window
The following listing shows Arduino terminal output during connection negotiation phase. A lot of useful info can be extracted from it. If you’re having difficulties while connecting, please copy this output from your terminal and post it in the comments.
Thank you for your time!
Oleg.
Incoming Connection Request Remote Name: Nexus S Connected to Device: 94:63:D1:BC:DD:B4 Wait For Incoming Connection Request SDP Incoming Connection Request SDP Configuration Request SDP Successfully Configured Disconnected SDP Channel Bluetooth pin is set too: 1234 RFCOMM Incoming Connection Request RFCOMM Configuration Request RFCOMM Successfully Configured Received SABM Command Received UIH Parameter Negotiation Command Received SABM Command Send UIH Modem Status Response Send UIH Modem Status Command Send UIH Command with credit Received UIH Command with credit RFCOMM Connection is now established - Automatic SDP Incoming Connection Request SDP Configuration Request SDP Successfully Configured Disconnected SDP Channel HCI Disconnected from Device Wait For Incoming Connection Request |
Thanks for this tutorial! I got some n00b questions:
1. When you mentioned : “Hereโs how the terminal output looks like when compatible dongle is used” I’m not sure what you mean, does it mean Serial monitor on the arduino?
2. How did you type the pin? From where? Is this arduino Serial communication again?
I was hoping to use this to make my USB keyboard wireless using Bluetooth with an Arduino Due (I’m using a Micro right now but apparently it doesn’t have enough memory to store the libs.) But I think this may mean that I need two arduinos and two host sheilds. Any suggestions on what to try would be greatly appreciated.
Thanks in advance.
Terminal output means serial monitor or any other terminal program opened on Arduino serial port (i use putty).
I didn’t understand your second question.
Hi,can you help me ?
I got this: (picture ฤฑ uploaded to my face profile)
http://www.facebook.com/photo.php?fbid=10151492173800676&set=a.10151492173550676.549612.643125675&type=3&theater
you can send me message over facebook also. ฤฑt notivicates me ๐
Is there an updated list of compatible bluetooth dongles? None of the ones pictured exist anymore and everyone I’ve tried so far, other than an old iogear that is no longer sold, is unrecognized. The oldest one I could find was an iogear gbu321 (one model newer than one that works GBU221), but that was also unrecognized.
Here’s a couple -> https://github.com/felis/USB_Host_Shield_2.0/issues/41
There is a full list at the wiki as well: https://github.com/felis/USB_Host_Shield_2.0/wiki
Is it possible to use this board to push SMS messages from your android phone into the arduino and then display them on a small LCD display?
If this is not possible, how about over WiFi and when will this be possible?
whatever you can push into Bluetooth on Android is possible to display on LCD connected to Arduino. The limiting factor here is your coding ability, not hardware.
I’m finding I’m having an interesting problem. I have been able to get full communication between the Arduino and my Galaxy S3, but I have not been able to connect my Nexus 7 (says it pairs, but never connects). Strange since you confirmed it working on yours. Is this most likely a bluetooth dongle problem or something deeper?
They broke BT around 4.2. It is definitely not working in 4.2.1 on my N7. I recently upgraded to 4.2.2, have yet to test it.
Well, just went back to 4.1 …and its working.
i wanna buy a USB Bluetooth dongle or usb bluetooth adapter on Arduino to connect to Android phone
can u give me a link of one that can work ?
sorry for english it s not my native langage ๐
i will use the usb bluetooth adapter/dongle with ADK Mega to connect arduino with mobile …is it feasable ?
Yes it’s possible. See: https://github.com/felis/USB_Host_Shield_2.0#boards.
And here is a list of dongles that are confirmed working with the library: https://github.com/felis/USB_Host_Shield_2.0/wiki
I would also like to use the Mega ADK with 2.0 lib for this project but I don’t understand what avrpins.h#L25 is? The listing doesn’t look like a commented line.
What is the line? Also can I use the mini version (that I have) of the USB Host Shield for this project?
That comment was related to an old version of the code. Please read: https://github.com/felis/USB_Host_Shield_2.0#boards.
Yes you can use the mini version of the shield.
Hi.
I have a nexus 7 3G using android 4.22. I cannot go to 4.1.1 since this is not available for my device.
Can you please confirm if it is working with yours ?
Unfortunately Google broke something in the Bluetooth core in 4.2. I got a Nexus 7 myself, so I downgraded to 4.1.1 by installing Cyanogenmod. I recommend using the following tool: http://www.wugfresh.com/nrt/ to root your device.
Hi and thanks for your reply. Is your Nexus7 a 3G version ?
I checked for a 4.1.1 downgrade for the 3G version but it is not available
No I have the Wifi version. It doesn’t look like it has ever been available with Android 4.1: https://developers.google.com/android/nexus/images#nakasig. So you just have to wait for Google to fix the issue ๐
I solved the problem with Android 4.2, so it should now work with your device! ๐
Hello,
how can i modify the spp code so i don’t have to pair everytime when i connect with my android to the Arduino via bluetooth?
Just use createInsecureRfcommSocketToServiceRecord: http://developer.android.com/reference/android/bluetooth/BluetoothDevice.html#createInsecureRfcommSocketToServiceRecord(java.util.UUID) in your Android app instead.
Check out my Android app for my balancing robot: https://github.com/TKJElectronics/BalanduinoAndroidApp/blob/master/src/com/tkjelectronics/balanduino/BluetoothChatService.java#L301. I only pair once with the Arduino, so the phone remembers the device and then after that I simply connect using the createInsecureRfcommSocketToServiceRecord function.
Hello Lauszus,
not only did you answer my orginal question about bluetooth pairing but i coincidentally by looking in your code solved a problem i have been weeks struggling with which is using the message handler functions like “write” in many activites in bluetoothchat sample.
i’m really thankful and very happy to see you provide people your experience just on the shelf.
Thank you ๐
Wow! This is what I was looking for!
I’m testing it right now, my Samsung Galaxy Ace Duos (Android 2.3.6) “sees” the Arduino but cannot pair… ๐
On the serial monitor nothing appears only “Incoming Connection Request” (running the spp.ino sketch).
I’ll try with another dongle as soon as I buy one, maybe this is the problem.
Any suggestion?
Thanks!
I seems like you dongle is not working correctly. Try another one ๐
Hello, I was wondering how I would be able to send a message from my Arduino mega ADK with a bluetooth dongle to a cell phone without putting the pin in every time. Thus far I have downloaded the library and am able to connect and pair my arduino with my phone. I have even run the example code where it displays “Hello from Arduino”. Also, is there any way to send a message to the phone that is received by a different rF transmitter from the board?(from sensor based data)
See this reply: https://www.circuitsathome.com/mcu/using-usb-bluetooth-dongle-on-arduino-to-connect-to-android-phone/comment-page-1#comment-21079 – it answers your first question.
Yes of course simply receive the data using your Arduino and then send the data to your Android phone, or is this not what you mean? ๐
Take a look on how I send data to an Android phone on my balancing robot: https://github.com/TKJElectronics/Balanduino/blob/master/Firmware/Balanduino/Bluetooth.ino.
Greetings,
how can i modify the Bluetooth SPP.ino example to send long strings from the Arduino, where when i try to send long strings the programs seems to hangs and restart!
and i get a message at the serial monitor: “Error sending L2CAP message: 0x0E – Channel ID: 0 65”
i can add a delay in my code and send my strings by division but i prefer for some reason in my project to do this normally.
thank you
There shouldn’t be a problem with the newest version of the code. Please make sure you have the newest version from Github!
Hello again,
i have downloaded the latest code today from this this link: https://github.com/felis/USB_Host_Shield_2.0
but i still get the same error:
“Error sending L2CAP message: 0xD6 – Channel ID: 00 41” when i send long strings.
it’s better than the previous code but actually i’m sending a string of size about 300 characters or more and as i said prefer to send it as a block as it is.
any suggestions?!
Try to post your code somewhere like gist: https://gist.github.com/ and I will try to see if I can see what the problem is ๐
thank you very much for you help ๐
i will try to give my best shot and if i completely failed i will be posting my code.
Do we still need a USB shield if we’re using an Arduino Due? I believe that it has a host USB port built-in. That should mean that we could plug a Bluetooth dongle into that USB port instead of needing a separate shield. No?
Make sure DUE has a driver for your device. Last time I checked thy only supported HID boot.
Do it work for a smart tv that don’t have a Bluetooth for the headset.
it needs a bluetooth of some kind inside, not necessarily a headset.
Hello,
I have been able to detect the Arduino on my phone.
However when I try pairing with it, On the Serial Monitor, it says Incoming Connection Request and stops at that. And on the phone , it then says unable to connect to device.
Can somebody please help me out with this?
Thank You
Please uncomment the following line: https://github.com/felis/USB_Host_Shield_2.0/blob/master/SPP.cpp#L20 and send me the output.
If it doesn’t print anything after “Incoming Connection Request” then your dongle is unfortunately not supported.
Thank You for replying. I will try it out.
No there is no change in the output. This is what it says.
SPP Bluetooth Library Started
Bluetooth Dongle Initialized
HCI Reset complete
Write class of device
Local Bluetooth Address: 00:1B:10:00:2A:EC
The name is set to: Arduino
Wait For Incoming Connection Request
Incoming Connection Request
And on the phone, it says that it is unable to connect.
Try a different Bluetooth dongle ๐
I did try two other Bluetooth dongles, but I am getting the same error. If I am getting the first part of the output, i.e
“SPP Bluetooth Library Started
Bluetooth Dongle Initialized
HCI Reset complete
Write class of device
Local Bluetooth Address: 00:1B:10:00:2A:EC
The name is set to: Arduino
Wait For Incoming Connection Request
Incoming Connection Request”
doesn’t it mean that my dongle is compatible? Could there be a problem with the Arduino ? or anything installed on it?
I can’t say for sure why it’s not working. It has nothing to do with the Arduino. It has something to do with the specific chip inside the Bluetooth dongle. I will keep working on adding support for more and more dongles, but the truth is that some dongles simply doesn’t work. For now the easiest solution would be to get a new dongle.
Ok will try another one. Thank You.
I purchased some of the dongles from the wiki list and tried to use them, but keep getting “No response to HCI Reset” (continuously). I did some searching for anyone with the same problem, but cannot seem to find anything similar.
I’m using an external power source with the USB host shield. Any suggestions?
Outputs the following:
PS3 Bluetooth Library Started
Bluetooth Dongle Initialized
No response to HCI Reset
No response to HCI Reset
No response to HCI Reset
No response to HCI Reset
No response to HCI Reset
No response to HCI Reset
No response to HCI Reset
No response to HCI Reset
.
.
.
No sorry. You will have to try another dongle.
ok – thanks. Will try another.
I am using UNO board and iogear GBU521 dongle.
spp.ino compiles and uploads to the UNO board.
Only message is “OSC did not start”.
Does this mean the USB host chip did not start or the dongle (GBU521) did not start ??
don
It means that either USB host chip did not start or SPI interface is not working. Please run board_qc and post the results -> https://github.com/felis/USB_Host_Shield_2.0/blob/master/examples/board_qc/board_qc.ino
Thank You for your quick response.
Circuits At Home 2011
USB Host Shield Quality Control Routine
Reading REVISION register… Die revision invalid. Value returned: 00
Unrecoverable error – test halted!!
0x55 pattern is transmitted via SPI
Press RESET to restart test
Returned value shows that SPI is not functioning. Please check your soldering, especially 2×3 SPI connector.
I did not connect that connector. (blush)
I will do that now.
Thanks
don
Circuits At Home 2011
USB Host Shield Quality Control Routine
Reading REVISION register… Die revision 03
SPI long test. Transfers 1MB of data. Each dot is 64K……………. SPI long test passed
GPIO test. Connect GPIN0 to GPOUT7, GPIN1 to GPOUT6, and so on
Test failed. Value written: 00 Value read: FF
Press any key to continue…
OK, now the next step Bluetooth
Thank you
don
The library seems to be stuck:
SPP Bluetooth Library Started
hangs at this line.
Ideas ?
don
Try to enable debug.
OK, where is that found ?
Found it: message.h
// uncomment to activate
#define DEBUG_USB_HOST
SPP Bluetooth Library Started
Unknown Device Connected – VID: 0A5C PID: 21E8
BTD Init Failed, error code: D1
Another BT dongle:
SPP Bluetooth Library Started
Unknown Device Connected – VID: 0A5C PID: 4500
BTD Init Failed, error code: D1
The one above is a iogear GBU421
The last one was a iogear GBU521.
Hi,
in my output it only says: “PS3 Bluetooth Library Started”
That’s all. Is this an indicator for a bad dongle?
You need to enable serial debugging. See the readme: https://github.com/felis/USB_Host_Shield_2.0#enable-debugging.
Hi,
I am facing a very strange problem. I can connect to my dongle transfer data. everything seems to working perfectly, but after a while my android device loses connection to the bluetooth dongle. Does anyone know why this might the case?
Thanks
See my reply here: https://www.circuitsathome.com/mcu/bluetooth-rfcommspp-service-support-for-usb-host-2-0-library-released/comment-page-1#comment-22544.
Hello I have a dongle:
http://www.kensington.com/kensington/us/us/p/1505/K33902US/bluetooth%C2%AE-2-1-usb-micro-adapter.aspx
and when I run the application I get only this: Bluetooth Library Started
ย any solution?
and is there any dongle that supports class 1?
You need to enable serial debugging: https://github.com/felis/USB_Host_Shield_2.0#enable-debugging.
Hi,
I was wondering if there was a way to enable debugging without editing settings.h?
Let me elaborate:
I am working on a single sketch with a handful of people, who are all using different computers.
Is there anything that could be done within the individual sketch that would only enable serial debugging for that sketch?
Thanks,
Matt
Is this compatible with the Nexus 7 ~ JellyBean 4.3? I
It works on mine, gen1.
Hi Oleg,
I have the same problem like “donvukovic” , when i run “run board_qc”, i have following message:
Circuits At Home 2011
USB Host Shield Quality Control Routine
Reading REVISION registerโฆ Die revision invalid. Value returned: 00
Unrecoverable error โ test halted!!
0ร55 pattern is transmitted via SPI
Press RESET to restart test
I use TRENDnet BT Dongle TBW-107UB with Mega ADK board.
Do you have an idea ?
Thank in advance,
Mike
Have you remembered to activate the ADK, as described here: https://github.com/felis/USB_Host_Shield_2.0#boards?
Yes, working on nexus 7
Nice work, thank you for sharing it.
May question is: is it possible to use a wifi dongle following a similar approach?
Maybe the full protocol stack (implementing the TCP/IP stack) requires too much memory
Yes it is possible, but it will take a lot of work and I am not planning to do it anytime soon ๐
is it possible to control servo motor using USB Bluetooth dongle on Arduino that connect to Android phone?…
Hello,
Thanks for this excellent library and hardware, I’ve a few questions:
1) Using the SPP example is it possible to pair without entering any pin? even better just pair automatically when in range?
2) Can I adapt the SPP multi example to pair to a serial device (e.g. smartphone) and the PS3 BT object at the same time? Will that work? I’m using the following Android app. which sends bluetooth over serial (using voice input on the phone)
https://play.google.com/store/apps/details?id=robotspace.simplelabs.amr_voice
I’d like to talk to my robot and control via PS3 all over the same bluetooth!
Lastly, is it possible to use SPI on my Mega at the same time as your USB shield? I’m controlling some shift registers and the SPI is apparently the most efficient way (I’m using ShiftPWM library)… I can use different pins but the lib says SPI is fastest. http://www.elcojacobs.com/shiftpwm/
Thanks in advance!
Simon
1. You need to do that on the client side. The SPP library will never ask for a pin by it self. It will only ask for a pin if the client demands it. For instance you could use the “createInsecureRfcommSocketToServiceRecord” function if you are developing for Android: http://developer.android.com/reference/android/bluetooth/BluetoothDevice.html#createInsecureRfcommSocketToServiceRecord(java.util.UUID). Then it will connect without needing to enter a pin. The only downside is that the Android phone won’t remember the device for next time, so you will have to search for it every time. I work around this in the Android app for the Balanduino by creating a “secure” connection the first time, so they pair and then afterwards I connect using the insecure method. You should take a look at the source code for more information: https://github.com/TKJElectronics/BalanduinoAndroidApp/blob/master/src/com/tkjelectronics/balanduino/BluetoothChatService.java.
2. Yes the following example shows how to do that: https://github.com/felis/USB_Host_Shield_2.0/blob/master/examples/Bluetooth/PS3SPP/PS3SPP.ino, but note that you can only send seiral data using SPP. I have been experimenting with this as well: https://github.com/Lauszus/VoiceRecognitionService, but the latency is pretty bad, so it will only work for slow moving robots.
Yes that is differently possible! Oleg have written a 3-part guide on how to do this: https://www.circuitsathome.com/mcu/running-multiple-slave-devices-on-arduino-spi-bus.
Regards
Lauszus
Seemingly my arduino was able to connect with Xperia Z1, but I don’t know why it is not able to send messages to phone, I read in the monitor a message different from Oleg’s example, look here:
Wait For Incoming Connection Request
Incoming Connection Request
Remote Name: Xperia Z1
Bluetooth pin is set too: 1234
Connected to Device: 68:76:4F:DA:B4:37
Information request
SDP Incoming Connection Request
SDP Successfully Configured
Disconnected SDP Channel
SDP Incoming Connection Request
SDP Successfully Configured
Disconnected SDP Channel
Wait For Incoming Connection Request
HCI Disconnected from Device
Wait For Incoming Connection Request
Somebody could help me, my Sony Xperia has jelly beans 4.4.2?
Hi everybody, About my latest message I don’t know why but the blueterm/blueterm+ didn’t work in my android sony xperia z1, but I was able to test the connection using an app called Arduino Bluetooth Tether, it sent and received data from arduino.
Now I am trying to send messages with MQTT protocol from my arduino using the bluetooth tether in my android, I am just able to send messages to internet throughout bluetooth connection from my arduino to my android, but not in MQTT protocol, I found a MQTT library for arduino but it uses ethernet shield and wifi shield, Does somebody know any MQTT library for arduino that supports bluetooth connection?
Hello,
with the help of SPP.ino it runs on a Mega ADK (with an USB Bluetooth stick) and a Duemilanove and an USB Host shield (with the same stick).
But when i took the same shield and the same stick with a Mega 2560 the Bluetooth stick didn’t blink and there is no
Bluetooth device to detect.
Also i put the USB Host shield (with the same stick) on the Mega ADK and there the Bluetooth stick wasn’t blinking too.
(The same results were there when i tried to take another Bluetooth stick)
Any ideas why the USB Host shield (and the Bluetooth stick) is not working with the Megas?
Thank you very much in advance
Erik
which shield are you using?
Hello Oleg,
i solved the problem. Your question shows that your thoughts were right. ๐
The shield has a new design, so i thought that it is Rev. 2.
But i tried, after many fruitless attempts, to follow up a tip i read
in another forum. There it was said that for an old Rev. shield connections
should be maid with pins 50-53 to the pins 10-13. First i thought that 50 is
connected with 10, 51 with 11 … and so forth. But it failed.
On the Arduino SPI Reference page i found under connections the right assignment.
So it should be: pin 50 with 12, 51 with 11, 52 with 13, 53 with 10.
And it works. ๐
Best regards
Erik
Sorry i forgot to mention that i used every time external power (1,5A 7,5V).
(and i used the latest library with Arduino 1.0.6)
Best regards
Erik
Hi,
whenever I try connecting it to my Android phone it never connects . The Serial monitor shows the following messages.
SPP Bluetooth Library Started
Bluetooth Dongle Initialized
HCI Reset complete
Write class of device
Local Bluetooth Address: 00:1B:10:00:2A:EC
The name is set to: Arduino
Wait For Incoming Connection Request
Incoming Connection Request
Remote Name: XPERIA P
Connected to Device: 20:54:76:4A:DC:AB
Wait For Incoming Connection Request
SDP Incoming Connection Request
SDP Successfully Configured
Disconnected SDP Channel
After this it asks me for a pair code on my Android phone , when I enter the code the phone never connects to the arduino and it shows the following messages on the serial monitor.
HCI Disconnected from Device
Please help!!!
Hi everybody!
When running the program the only message I get is this: SPP Bluetooth Library Started
Then, I go to Blueterm but it doesn’t find the Arduino shield. What can be the problem?
I am using a Logistech bluetooth dongle, is it compatible?
Thank you
Hi Guys
Just wondering if its possible to create an instance of the device without giving it a passkey.
I’m trying to find a Class 1 (long distance) Bluetooth USB dongle that will work reliably.
I’ve tried this Azio one which doesn’t seem to work at all, and this Dynamode one that “kind of” works, but the connection is very flakey.
Has anyone found a Class 1 dongle that works well?
Actually, nevermind. Both of those class 1 dongles (the Asio and Dynamode ones on Amazon) work perfectly. My problem was I was powering over USB. Once I powered using a good external regulator everything works beautifully.
Thanks for all the work on this library!
Could you please post the links to the dongles that worked?
Hi, Thanks for your work on USB Host. I want to use Mega ADK to connect with a bluetooth dongle. then use bluetooth dongle to upload data to mobile. I have download USB HOST Shield 2.0 library. In file settings.h, change 0 to 1: #define USE_UHS_MEGA_ADK 1, compile and upload to Mega ADK, But got information “OSC did not start”, then I use board_qc.ino. Output is
“Circuits At Home 2011
USB Host Shield Quality Control Routine
Reading REVISION register… Die revision 03
SPI long test. Transfers 1MB of data. Each dot is 64K
Test failed. Value written: 01 read: 00
Unrecoverable error – test halted!!
0x55 pattern is transmitted via SPI
Press RESET to restart test”
So what is the real problem here๏ผ please help!!!
Please take a look at the issue tracker here -> https://github.com/felis/USB_Host_Shield_2.0/issues
hi there,
android 4.1.2
SainSmart UNO R3 Board ATmega328P ATmega16U2
usb host shield keynes
bt3.0 dongle broadcom 2070
SPP Bluetooth Library Started
Unknown Device Connected – VID: 0A5C PID: 4500
BTD Init Failed, error code: D1
BlueTerm&BlueScripts(http://teholabs.com/docs/bluescripts:overview)
no connection ๐ (I even know mac address and pin)(at blue Scripts I swap createRfcommSocketToServiceRecord with createInsecureRfcommSocketToServiceRecord)
but when I put dongle to win xp, I can do connect. do I have to buy new dongle or uhs? thx
ps:
Circuits At Home 2011
USB Host Shield Quality Control Routine
Reading REVISION register… Die revision 03
SPI long test. Transfers 1MB of data. Each dot is 64K……………. SPI long test passed
GPIO test. Connect GPIN0 to GPOUT7, GPIN1 to GPOUT6, and so on
Test failed. Value written: 00 Value read: FF
Press any key to continue…
GPIO test passed.
PLL test. 100 chip resets will be performed
Resetting oscillator
Reset number 0 Time to stabilize – 384 cycles
…….
Reset number 99 Time to stabilize – 384 cycles
Checking USB device communication.
Reset complete. Waiting for the first SOF…
Getting device descriptor
Descriptor Length: 12
Descriptor type: 01
USB version: 0200
Device class: 09
Device Subclass: 00
Device Protocol: 00
Max.packet size: 08
Vendor ID: 0A5C
Product ID: 4500
Revision ID: 0100
Mfg.string index: 01
Prod.string index: 02
Serial number index: 00
Number of conf.: 01
All tests passed. Press RESET to restart test
hi i’m trying tot connect tot the arduino using Android Phone as a first test using bleutooth. i can find the balanduino in my list and it is balancing fine . i do the connection request on my Phone but i have tot put in a pairing code i tried 0000 and 1234 but both give the same result. no connection ? cannot communicate to balanduino. how do i solve this ?
thanks