Pages: [1]   Go Down
Author Topic: bluetooth communication between two arduinos using two BlueSMiRF silver modules?  (Read 6172 times)
0 Members and 1 Guest are viewing this topic.
Camisano Vicentino (VI), Italy
Offline Offline
God Member
*****
Karma: 5
Posts: 956
ƎR like no other.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

i have two BlueSMiRF silver modules and i should get a bluetooth communication between my 2 arduinos, for example an arduino send a message to the other using bluetooth and after this one send a message to the other one. ok do you understand my project? (maybe my english is not perfect, sorry i'm italian)
i know that i should use TX and RX and the serial communication to control them using an arduino, but now my problem is that i can't understand what i have to do to set a module as master and the other one as slave  smiley-confuse
and how can i associate these modules together? smiley-confuse
is there anyone that have already done something similar?
help me please smiley-cry
thanks in advance!
Logged

Riccardo Ertolupi of the Vicenza Thunders Team: http://www.VicenzaThunders.com

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

Looks like someone figured this out: http://phillipecantin.blogspot.com/2012/01/arduino-bluetooth-link.html

If you look at the example code for the master, it appears that you need to specify the MAC address of the slave with the "C" command.

I think the default mode is slave, so only the master would need to be told which mode to use, but I am not sure about that.  Hope that helps!
Logged

Camisano Vicentino (VI), Italy
Offline Offline
God Member
*****
Karma: 5
Posts: 956
ƎR like no other.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

oh, thanks but i've already solved that problem smiley it was pretty difficult at the beginning but it's actually easy to do! i just watched their datasheet smiley-wink
http://www.sparkfun.com/datasheets/Wireless/Bluetooth/rn-bluetooth-um.pdf
but if someone has the same problem, he can ask me anything, no problem, you are welcome!
Logged

Riccardo Ertolupi of the Vicenza Thunders Team: http://www.VicenzaThunders.com

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

Hi Camisano,

     I read the sparkfun datasheet. My doubt is that whether i have to connect bluetooth to computer and set the master or slave. otherwise, i have to write instructions in the code to link the key. Please help me.

thanks.

 
Logged

Camisano Vicentino (VI), Italy
Offline Offline
God Member
*****
Karma: 5
Posts: 956
ƎR like no other.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi Camisano,
hi, camisano is the name of my city smiley-razz

     I read the sparkfun datasheet. My doubt is that whether i have to connect bluetooth to computer and set the master or slave. otherwise, i have to write instructions in the code to link the key. Please help me.
if you want to connect your bluetooth modem to a computer you can set it as a slave, you only need to set as master when you want to connect 2 sparkfun bluetooth modems, one will be master and the other one the slave
and you don't need to write anything in your code for the key because that is made by the modem
Logged

Riccardo Ertolupi of the Vicenza Thunders Team: http://www.VicenzaThunders.com

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

Is the bluesmirf different from other bluetooth devices or could I do this with any bluetooth module.
Logged

Camisano Vicentino (VI), Italy
Offline Offline
God Member
*****
Karma: 5
Posts: 956
ƎR like no other.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

maybe i didn't understand your question, what do you mean with "other bluetooth devices"? a computer? a mobile? if yes the difference is that you can't directly manage their settings, anyway they do about everything by default
Logged

Riccardo Ertolupi of the Vicenza Thunders Team: http://www.VicenzaThunders.com

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

I mean something like this http://www.ebay.com/itm/Arduino-Wireless-Bluetooth-Transceiver-Module-Slave-4Pin-Serial-DuPont-Cable-/160879748403?pt=LH_DefaultDomain_0&hash=item25752e2533

Would that device function the same way as the BlueSmirf?
Logged

Dee Why NSW
Offline Offline
Edison Member
*
Karma: 48
Posts: 2313
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Note that that device is an HC-06 which runs as a slave. To do what you want, you need a master as well as a slave. You need to use an HC-05 for that, and configure it as a master. The HC-05 looks the same and costs about the same as an HC-06.
« Last Edit: January 20, 2014, 10:44:30 pm by Nick_Pyner » Logged

Camisano Vicentino (VI), Italy
Offline Offline
God Member
*****
Karma: 5
Posts: 956
ƎR like no other.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

i totally agree with Nick_Pyner, maybe you should use HC-05 which is about the same of BlueSMiRF but it's cheaper
Logged

Riccardo Ertolupi of the Vicenza Thunders Team: http://www.VicenzaThunders.com

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

Hi,
I am starting the project to connect two Arduino via Bluetooth.
can you help me for that?
how can i send data from one of them and the second one will respond and send back data to the first one?
may i have a code?
thanks
Logged

Dee Why NSW
Offline Offline
Edison Member
*
Karma: 48
Posts: 2313
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

There is bluetooth and there is bluetooth. This thread is about Bluesmirfs. If that is what you have, here is a link specifically for that.

http://phillipecantin.blogspot.com.au/2012/01/arduino-bluetooth-link.html

Most bluetooth interest is in the HC-0x family, where the situation is a bit different and possibly not so easy. AgentNoise and Hiptex are two gurus who are getting results and can actually talk about it.

http://forum.arduino.cc/index.php?topic=209363.msg1555477#msg1555477
http://forum.arduino.cc/index.php?topic=223938.15

In both cases, the bluetooth module needs to be programmed, and in both cases the connection is automatic.

Bluetooth<>Bluetooth is not that common. This might be because using NRF24 is easier and even cheaper than HC-0x

Logged

0
Offline Offline
Newbie
*
Karma: 1
Posts: 3
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I have made a similar post about the HC-05 modules
http://phillipecantin.blogspot.ca/2014/01/hc-05-bluetooth-link-of-2-arduino.html
I kept this example more simple by not including the auto-detect.  It would be possible to recreate an auto-detect with HC-05 since all the necessary functions are also there.
Logged

Dee Why NSW
Offline Offline
Edison Member
*
Karma: 48
Posts: 2313
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I'm really glad you have done this taking the HC-0x into account. There was a time when I thought that that couldn't be done!

The picture at the head of your page looks like something around here, but I suppose it isn't.
Logged

0
Offline Offline
Newbie
*
Karma: 1
Posts: 3
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I just posted a procedure to setup 2 HC-05 so that they connect automatically without code: http://phillipecantin.blogspot.ca/2014/08/hc-05-bluetooth-link-with-zero-code.html

Hope this can help
Logged

Pages: [1]   Go Up
Jump to: