Arduino BT connection problems

Hi,
I am working on a project that involves Arduino BT-V06. The big problem is I can't upload ANYTHING to my arduino using bluetooth.

After searching a while in this forum I came to understand that this is a known issue and there are multiple solutions for it but none of them seem to work for me or I simply don't understand them. Here is a little overview what I found (also handy for people who search this forum in the future):

Arduino BT Upload Help
14.11.2009 at 08:13:21
http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1258182801/0#0
(It seems marcocp007 has the same problem but nobody answered his topic)

Probably a baud rate problem on ArduinoBT
05.11.2009 at 09:48:14
http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1257410894/7
(this was the most useful topic, read more later on).

Auto-Reset for Arduino-BT
28.08.2009 at 00:21:53
http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1251415313

Solutions I found for this problem:

The Arduino BT requires a manual reset via the reset button before downloading a sketch to activate the bootloader, because it doesn't support the auto-reset feature. The timing is a bit critical, the best way is to hold down the reset button and release it just after starting the download in the IDE. To get some feedback when avrdude really starts, you can set
Code:

upload.verbose=true

in preferences.txt

I added the upload.verbose=true in the preferences.txt and now I can see when the avrdude starts. More in the next solution.

When you release the reset button too early, the bootloader starts the currently loaded sketch and avrdude complains about unexcpected responses.

When you release it too late (after the connection from the PC has been already been established), the existing connection gets terminated.

It seems supernatural timing is required for this trick cause I tried it over 20 times now but I still can't upload my program.
I tried:

  • disconnect power -> hold reset -> connect -> upload -> when avrdude starts release reset
  • Hold reset -> upload -> when avrdude starts release reset
  • Hold reset for 10 secs -> release reset -> upload program

You can avoid this case by connecting a resistor (0 to around 100 Ohm) between pin 1 of connector SV2 and GND.

I tried that but it made no difference for me, maybe I got the wrong pin? (to explain in n00b terms I put a 120 ohm (had no 100 around) in the second pin counting from the right top (the one where TX stands) to the ground).

When your sketch is filling up the receive buffer of the WT-11 bluetooth chip, you will run into this problem. This means you need some kind of handshake to avoid this case.

Yep, that's it. The handshaking suggestion solved the problem. Thanks.

I read that Geert had the same problem and seemed to have fixed it with the handshake thing, the sad thing is he didn't explain how he did it.

It can be easily done by setting the iWRAP parameters to configure a WT-11 GPIO pin as DTR (e.g. PIO7) and connecting it to the ATmega reset pin using a little curcuit. The curcuit is needed because the WT-11 DTR signal is not inverted (this could be configured) and because the WT-11 uses 3,3V logic.

I read the entire topic 3 times and I was still like LOLWUT?!?!?? I really don't understand a thing of how that auto-reset works.

I hope anyone can help me (and others) further with this problem.

is there nobody who can help me? :-[

Hi Mister Waldo,

You might have run in this problem:
http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1259564390/3#2

Please try the following sequence:

  1. disconnect power of Arduino-BT
  2. hold reset of Arduino-BT
  3. connect power of Arduino-BT
  4. start download in the Arduino-IDE
  5. wait until you see the following message in the output window:
    Using Port : \.\COM21
    Using Programmer : arduino
    Overriding Baud Rate : 115200
    now release the reset button. You might have to release it some hundred milliseconds earlier or later.

When it takes too long to open the bluetooth connection, you will never succeed. It may depend on your Bluetooth driver if this works at all.

Do you have a ISP programmer, so you can burn a modified bootloader?

You can avoid this case by connecting a resistor (0 to around 100 Ohm) between pin 1 of connector SV2 and GND.

I tried that but it made no difference for me, maybe I got the wrong pin? (to explain in n00b terms I put a 120 ohm (had no 100 around) in the second pin counting from the right top (the one where TX stands) to the ground).

That was the wrong pin. Connector SV2 is the row of holes above the WT-11 chip, the label "SV2" is directly beneath pin 1.

MikeT

Hi Mike,

Thanks for your reply I will try your suggestions tomorrow and post the results then.

I think I will have to burn the modified bootloader, I don't have a ISP programmer, do you have a link to a tutorial or something?

Hi,

modifying the bootloader means: make the timeout larger so you have more time between the reset and actually starting the sketch.

Do you have an Arduino Duemilanove which can be used as ICSP programmer? Then these two links might be helpful:
Arduino Playground - AvrdudeFTDIBitbang and http://www.geocities.jp/arduino_diecimila/bootloader/index_en.html#top

Instead of connecting the FTDI pins to the local ICSP header of the Arduino Duemilanove, you have to use the ICSP of your Arduino-BT. Additionally, you need to connect GND between the Arduino boards.

MikeT

hello

i'm very interrestd xith your topic because i have the same problem and i can't find any eficient solution:

i succed just one time to upload but now no way to do it again

i tried several time between releasing reset buton and upload,
i tried a resistance between pin 1 on SV2 and groud.

It seems you have a working way but i have a very por english (i'm french) and it seems to be quite technical way so i didn't understand how you did !!

Could you try to explain me with very basic explaination and may be photos.

it would be great and i think helpfull for other.

thanks

Hi jml,

I have not found the solution to the problem yet, I have not tried the resistor yet since its not my arduino BT, tomorrow (friday) I am going further with it and post the results of my further tests.

Good luck :slight_smile:

OK

it seems that lot of people have this problem (i found many topics) but no solution found

I hope you will have more chance !

Well it took some time but I found a solution, its more of a mix of solutions already posted on this forum:

A friend of mine came over and he experienced the same problem I will try to post my solution as clear as possible.

The problem:
As stated above the problem is I couldn't upload anything to my arduino BT board. Most of the time the arduino software kept saying it was uploading for 5 minutes or so and after that the bluetooth connection is lost.

The solution (as it worked for me and my friend):
We did a number of things to eventually get it to work.

- when the arduino software takes a REALLY LONG time to upload before giving the error its most likely not the arduino software but your bluetooth drivers, when I used bluesoleil I noticed the uploading time is a lot shorter before the arduino software gives an error (note: the demo version of bluesoleil only allows 2 MB transfers but that's more than enough for Arduino scripts).

**-**my friend had an avr writer (this model to be exact:http://uk.farnell.com/atmel/atavrisp2/programmer-avr-mcu-isp/dp/1135517). With this we burned a new bootloader to the arduino BT (we used avr studio to write the bootloader http://www.atmel.com/dyn/Products/tools_card.asp?tool_id=2725). You can find the new bootloader in your arduino folder (arduino-0017\hardware\bootloaders\bt).

At first I had the problem that every time I pressed the reset button the bluetooth connection also resetted. Burning the new bootloader fixed this problem for me.

  • I also made some adjustments in preferences.txt and boards.txt:
    Boards.txt:
    scroll down to bt.name=Arduino BT and change bt.upload.speed=19200 to bt.upload.speed=115200

Preferences.txt
set upload.verbose=true

This will give you feedback on what the avrdude is doing, this helps your timing for pressing the reset button.

- Pressing the reset button right on time. When you want to upload your code you need to reset the arduino BT RIGHT ON TIME. Like Mike T stated earlier timing is crucial. When you set upload.verbose=true in preferences.txt you can see when the avrdude really starts uploading. Thats the moment you gotta hit the reset button.

For me that didn't really work (Probably my timing was a bit off or something).

What DID work for me was counting: When I made a program I hit the compile button and start counting the seconds it takes to compile the program (depending on the speed of your computer and the size of your program the time differs, with me it was about two seconds).

After that I pressed and holded the reset button before uploading, then I hit the upload button and count the seconds again, when I reach the time it took to compile I released the reset button.

I found out this solution worked best for me, it works 2 out of 3 times.

When it isn't working for you your timing is probably off, just keep trying!

The only problem I have left now is that every time I want to upload a new program to my arduino I have to do the reset trick. But at least I can upload again ^^.

Well so far my solution to the arduino BT uploading problem, thanks to Mike T for his help and I hope this topic will help other people who have the same problem.

Good luck!

PS: I hope a mod can change the title to Arduino BT connection problems [solved] for better finding in the future.

but, the problem remains...

My PC: DELL LATITUDE D820, OS XP SP3.

Boards.txt:
scroll down to bt.name=Arduino BT and change bt.upload.speed=19200 to bt.upload.speed=115200

Preferences.txt
set upload.verbose=true

I have the newest bluetooth driver instaled for my PC (Bluetooth Stack for Windows by Toshiba V7.10.04), I count the time before release the reset button, etc... etc... now, the uploading time is a lot shorter before the arduino software gives an error, but the problem remains...

How is it possible to sell Arduino BT hardware in such conditions?

IT WORKS!!!!!

today I put the resistor 100 homs between SV2 and ground... and it works!!!

it completely fixes the problem? Maybe i should try it to, what else did you do?

Hi all,

I had the exact same problem with my Arduino BT. I must have tried 4 different systems and 3 different OS (including XP, OSX, and WIN7).

Finally fixed the issue by pulling down the reset pin on the WT11 to GND, which prevents the WT11 from going into reset. Then you can reset the ATmega168 to get access to the bootloader and load your sketch.

The problems I see with the design of the BT:

  • if you hit reset on the board the, bootloader resets the WT11 which kills your link to your PC.
  • you cannot load your sketch without resetting the ATmega168 to get access to the bootloader.

This board should be called the "Catch22" because the reset you need to load the sketch kills the link you needed for the IDE to send the sketch to the board!

Either I'm missing something or the logic totally escapes me.

-A

Posted by: Mike T Posted on: 13.12.2009 at 12:20:51
Hi Mister Waldo,

You might have run in this problem:
http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1259564390/3#2

This worked for me. However, just before this I found new 'driver's for my PC's WIN7 bluetooth. Thanks for this link.

I agree with the "catch 22" statement (although being a rookie at this, I don't fully understand it). Is this truely a BLUEGIGAWT11 Bug? and can it fixed (in theory) with flashing the WT11's firmware?

akormendy

Hi

Is this truely a BLUEGIGAWT11 Bug? and can it fixed (in theory) with flashing the WT11's firmware?

No, it's not a Bluegiga bug, it's actually an issue of the Arduino-BT bootloader which tries to work around another Bluegiga bug (which is actually a CSR bug): The WT11 will crash when its input buffer overflows. This is cured by resetting it during startup of the bootloader...

With the 100Ohm resistor you can choose between the two problems. :-[

The iWrap 3 Firmware doesn't fix the original CSR bug, but i don't know about the iWrap4 beta firmware.

MikeT

Hi, I have just spent all evening trying to upload and, thanks to all your help, finally it works. What I did...

I changed the Boards.txt file bt.upload.speed to 115200.

I loaded a sketch (in this case, it was blinkm communicator - I also changed baud rate in the sketch to 115200).

Power up the arduinoBT, wait around 10 seconds until it loads the boot sequence (i.e. pin13 LED is flashing in triplets).

Hold down reset button for ~2 seconds, release, wait 1 or 2 seconds for pin13 LED to flash a couple of times, and just after as it goes out, upload the sketch.

Hope the rest of you manage to get it working, the bluetooth connectivity is a dream!

Hello patrickscotland,

what system and OS are you using? what IDE are you using?

I am having problems with Vista32 and IDE 0011...

Much appreciated.

The IDE is up to version 18. Is there some reason you are running such an old version?

arduino 0011 release notes:

  • Improved reliability for uploading to Arduino BT.

I have also been using Arduino 0018, but still no luck :frowning:

I am able to successfully pair with the ArduinoBT using a Belkin Mini Bluetooth Dongle and set up a COM port, but occasionally the Serial list from the Tools drop down menu is greyed out, and I have selected ArduinoBT from the boards list.

thank you patrickscotland

ArduinoBT users that have problems:

  • i used a Mac and had no problems... seems like macs have a better serial port manager.

good luck to you all.