Pages: [1]   Go Down
Author Topic: Uploading via bluetooth (serial port not listed)  (Read 3824 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 13
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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!
Logged

Fort Lauderdale, FL
Offline Offline
Faraday Member
**
Karma: 71
Posts: 6144
Baldengineer
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Run the IDE as root (or with Sudo).

Does the Serial Port appear then?
Logged

Capacitor Expert By Day, Enginerd by night.  ||  Personal Blog: www.baldengineer.com  || Electronics Tutorials for Beginners:  www.addohms.c

Offline Offline
Newbie
*
Karma: 0
Posts: 13
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
« Last Edit: June 19, 2012, 05:06:49 am by Scratchy » Logged

Delray Beach, FL USA
Offline Offline
Full Member
***
Karma: 0
Posts: 113
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged


Offline Offline
Newbie
*
Karma: 0
Posts: 13
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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!
Logged

Delray Beach, FL USA
Offline Offline
Full Member
***
Karma: 0
Posts: 113
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged


Offline Offline
Newbie
*
Karma: 0
Posts: 13
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Thanks! Ohh, thats quite hard way. Yesterday I was trying with avrdude. I ran
Code:
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
Code:
avrdude: ser_recv(): programmer is not responding
Any suggestions?
Logged

Slovakia
Offline Offline
Newbie
*
Karma: 0
Posts: 33
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 13
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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!
Logged

Slovakia
Offline Offline
Newbie
*
Karma: 0
Posts: 33
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 13
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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! smiley
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
Code:
rfcomm bind 0 00:12:02:10:79:36
and ran avrdude
Code:
avrdude -c arduino -p m328p -P /dev/rfcomm0 -U flash:w:/home/tadas/Desktop/Blink.cpp.hex -v -v -v -v -b 57600
« Last Edit: June 28, 2012, 11:12:55 am by Scratchy » Logged

Slovakia
Offline Offline
Newbie
*
Karma: 0
Posts: 33
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I'm glad it worked smiley. 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 smiley-grin
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 13
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I'm glad it worked smiley. 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 smiley-grin
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. smiley 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?
Logged

Slovakia
Offline Offline
Newbie
*
Karma: 0
Posts: 33
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I don't know I'm typing commands old style, I'm using PuTTY even on my Windows mobile phone smiley-grin
Logged

Pages: [1]   Go Up
Jump to: