I try to upload something to an ArduinoBT. The bluetooth connection is succesfully established in the Windows control panel as ARDUINOBT 'Bluetooth on serial port' on COM15. In the settings file I had to place "serial.download_rate=115200" because ArduinoBT is said to work only with this baud rate. However, when I try to upload something, I get a "not in sync" error. The log screen also indicates "Overriding baud rate : 19200", not surprising because that is one of the options set for avrdude as I see in the same log screen. What goes wrong and how do I resolve this?
I have used my configuration successfully before with a normal Arduino over a USB cable. It is a Laptop PC with Windows XP and Arduino 0.0.17.
for the Arduino BT the baudrate of the PC bluetooth serial port doesn't matter. The only baudrate which is really important is the baudrate between the ATmega and the WT11 which must be set to 115200 baud.
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 upload.verbose=true in preferences.txt
Hi, I'm piggybacking on this post because I have the same problem. I have tried uploading code to the ArduinoBT many times now. Tried pressing the reset button during upload, before upload, after upload. Never works
The BT connection to the PC works, the PC indicates a bluetooth port at COM 40. But every time I push the reset button, the connection gets broken and I have to manually reconnect. The reset button is labeled "S1" right? So I'm wondering if the connection gets broken, how can the upload work?
Also, the upload process takes a very long time. It would frequently take 5 minutes to do the "[30][20]" thing and then fail. But if I push the reset button and thus terminate the connection, it fails right away.
The only other weird thing is that but default, port 13 fires randomly. I haven't uploaded any code to the BT but out of the box, if I put a LED on port 13, the LED flashes randomly. Is this supposed to happen? On the USB arduinos, I never encountered this behavior.
Anyway, if anyone knows how to solve this problem, I would be most grateful. I've spent hours on trying to figure it out and read a lot of similar problems about the BT, like this post, but no luck. Thanks for reading!
The BT connection to the PC works, the PC indicates a bluetooth port at COM 40. But every time I push the reset button, the connection gets broken and I have to manually reconnect.
The connection gets broken when you release the reset button too late because the bootloader resets the WT-11 bluetooth chip via the digital pin 7.
Also, the upload process takes a very long time. It would frequently take 5 minutes to do the "[30][20]" thing and then fail. But if I push the reset button and thus terminate the connection, it fails right away.
The PC doesn't recognise that the connection has been closed and hangs for a long time.
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. You can avoid this case by connecting a resistor (0 to around 100 Ohm) between pin 1 of connector SV2 and GND.
The only other weird thing is that but default, port 13 fires randomly.
This is the blink code of the bootloader.
Anyway, if anyone knows how to solve this problem, I would be most grateful. I've spent hours on trying to figure it out and read a lot of similar problems about the BT, like this post, but no luck.
It also took me a lot of time to figure out the behaviour. You can read my auto-reset solution here: http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1251415313
I think I might have done too much to suggest the solution to all other users, but I now have a well working auto-reset.
Thanks for the reply! I've seen your auto-reset post before but didn't get around to trying it because it's slightly out of my comfort range with the bootloader editing. But I'm very appreciatively of your work in the matter. Hopefully, they will incorporate your auto-reset in the future version.
So after reading your response, I was wondering if I can avoid the connection termination by always having a resistor connecting pin 1 of SV2 and GND. Then all I have to worry about is releasing too early, so I'll give it a good minute or so. Would that work?
Also, when should I start pressing the reset button?
I didn't get a chance to play with the BT today but I'll try again tomorrow.
Indeed, my problem had somenthing to do with the reset operation. I can now upload my program. I push the reset button first, and start uploading immediately afterwards. This works in 90% of the attempts. After successful uploading the program is indeed operational in the ArduinoBT and still works after reset or power down. Serial communication from the computer to the Arduino board works as well for sketches supporting that. What does not work is serial communication from the board to the PC during execution of a sketch. I will put some more effort in it.
there is a "known issue" documented in the iWRAP3 User Guide:
If HW flow control is not used and iWRAP buffers are filled
either in data or command mode, the firmware will hang
and needs a physical reset. This is a bug in the CSR
firmware.
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.