Hello,
I'm trying to upload code via bluetooth (Duemilanove 328 + BT module (http://www.ebay.com/itm/150763254858)). When I pair module with PC, serial port loads as /dev/rcomm0 and I can see what sends Arduino (Serial.print()) in serial monitor. But Arduino IDE doesn't see that serial port. I tried with symlink (link to /dev/ttyUSB4), but without success. Any ideas?
Thanks!
Run the IDE as root (or with Sudo).
Does the Serial Port appear then?
Thanks, I tried it before. Nope, serial port doesn't appear.
I think the IDE simply refuses to look for /dev/rfcomm0. I seem to recall I had to find the file where it stashes preferences and manually edit it to say /dev/rfcomm0. But I also had big problems timing the manual reset I had to do so the upload would work. See:
http://home.comcast.net/~tomhorsley/hardware/arduino/ITead.html
for some of my experiences with the ITead bluetooth shield.
Claghorn:
I think the IDE simply refuses to look for /dev/rfcomm0. I seem to recall I had to find the file where it stashes preferences and manually edit it to say /dev/rfcomm0. But I also had big problems timing the manual reset I had to do so the upload would work. See:http://home.comcast.net/~tomhorsley/hardware/arduino/ITead.html
for some of my experiences with the ITead bluetooth shield.
Thanks! But in which directory You ran make clean build commands?
Which parameter You changed in Makefile (I understanded that You changed bootloader Makefile?) ? Maybe ISPPORT?
Thanks, again!
Scratchy:
Thanks! But in which directory You ran make clean build commands?
The makefile thing only worked after I had completely removed the IDE from my workflow. If you are looking
at my software, the directory where I run make build and make upload is the "microcode" directory, and
the current state of the software is such that I'd need to uncomment the PORT=/dev/rfcomm0 line and
comment out the PORT=/dev/ttyACM0 line. Then after doing a "make build" I type a "make upload"
command in a terminal and try to hit return in the terminal at the same time I release the reset button
on the arduino (but the timing is still tricky). I pretty much decided it was easier to change the jumpers
and upload over the USB connection when I need to upload.
This web page for the teensy:
http://www.pjrc.com/teensy/jump_to_bootloader.html
implies that you can jump to the bootloader from your sketch (if you build a sketch that can take a command
to do that some way), but I haven't tried that yet with my Uno.
Claghorn:
Scratchy:
Thanks! But in which directory You ran make clean build commands?The makefile thing only worked after I had completely removed the IDE from my workflow. If you are looking
at my software, the directory where I run make build and make upload is the "microcode" directory, and
the current state of the software is such that I'd need to uncomment the PORT=/dev/rfcomm0 line and
comment out the PORT=/dev/ttyACM0 line. Then after doing a "make build" I type a "make upload"
command in a terminal and try to hit return in the terminal at the same time I release the reset button
on the arduino (but the timing is still tricky). I pretty much decided it was easier to change the jumpers
and upload over the USB connection when I need to upload.This web page for the teensy:
Jumping directly to the bootloader on the Teensy USB development board
implies that you can jump to the bootloader from your sketch (if you build a sketch that can take a command
to do that some way), but I haven't tried that yet with my Uno.
Thanks! Ohh, thats quite hard way. Yesterday I was trying with avrdude. I ran
rfcomm bind 0 00:12:02:10:79:36 (bluetooth module address)
avrdude -c arduino -p m328p -P /dev/rfcomm0 flash:w:home/tadas/Desktop/Blink_Test_Serial.cpp.hex -v -v -v -v -b 57600
,but then I got
avrdude: ser_recv(): programmer is not responding
Any suggestions?
What baud rate you have on your BT module ? because it has to be the same that the rate of which you're uploading with in this case 57600, and have you tried to reset the board manually just after you send that avrdude command ? Remember there is no autoreset feature when dealing with BT. I was programming my arduino via bluetooth on the windows 7, there were some issues with the timing of that reset. Haven't tried it on ubuntu yet, but I will look into it
legwinskij:
What baud rate you have on your BT module ? because it has to be the same that the rate of which you're uploading with in this case 57600, and have you tried to reset the board manually just after you send that avrdude command ? Remember there is no autoreset feature when dealing with BT. I was programming my arduino via bluetooth on the windows 7, there were some issues with the timing of that reset. Haven't tried it on ubuntu yet, but I will look into it
Yes, I tried reset board, but nothing happens. How to set BT module baud rate? In description it says that by default baud rate is 9600.
Thanks!
If you want to change baud rate on your bluetooth module you need to bring it to AT mode (there should be a switch or you need to pull some pin down check some datasheets) and then you need to connect it to the PC via FTDI and chanage it with AT commands.
legwinskij:
If you want to change baud rate on your bluetooth module you need to bring it to AT mode (there should be a switch or you need to pull some pin down check some datasheets) and then you need to connect it to the PC via FTDI and chanage it with AT commands.
Thanks! Oh, I thought that I need AT commands. Finally uploaded with bluetooth!
First I changed baud rate to 57600 via ttl to serial cable, because AT commands (AT+BAUD, AT+VERSION etc) via Arduino didn't worked (except AT, it returned OK). But first I suggest to try via Arduino, because for others it worked.
Then I binded BT module
rfcomm bind 0 00:12:02:10:79:36
and ran avrdude
avrdude -c arduino -p m328p -P /dev/rfcomm0 -U flash:w:/home/tadas/Desktop/Blink.cpp.hex -v -v -v -v -b 57600
I'm glad it worked :). To be honest for the purpose of changing baud rates and other AT commands I use PuTTY, because Arduino serial monitor doesn't work for me, so I reccomend you PuTTY, it's free, crossplatform and awesome
legwinskij:
I'm glad it worked :). To be honest for the purpose of changing baud rates and other AT commands I use PuTTY, because Arduino serial monitor doesn't work for me, so I reccomend you PuTTY, it's free, crossplatform and awesome
Yup, when I used Windows I always used PuTTY, but I thought that PuTTY for Linux doesn't exist, but I was wrong, so week ago I installed PuTTY. But it little sucks, because I can't do copy/paste, so with AT commands I needed use other serial terminal. If I remember, in Windows You can do copy/paste, right?
I don't know I'm typing commands old style, I'm using PuTTY even on my Windows mobile phone