bluetooth communication between two arduinos using two BlueSMiRF silver modules?

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 :~
and how can i associate these modules together? :~
is there anyone that have already done something similar?
help me please =(
thanks in advance!

Looks like someone figured this out: Phillipe Cantin: Arduino Bluetooth Link

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!

oh, thanks but i've already solved that problem :slight_smile: it was pretty difficult at the beginning but it's actually easy to do! i just watched their datasheet :wink:

but if someone has the same problem, he can ask me anything, no problem, you are welcome!

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.

davidhaye1:
Hi Camisano,

hi, camisano is the name of my city :stuck_out_tongue:

davidhaye1:
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

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

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

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?

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.

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

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

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.

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

I have made a similar post about the HC-05 modules

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.

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.

I just posted a procedure to setup 2 HC-05 so that they connect automatically without code: Phillipe Cantin: HC-05 Bluetooth link with zero code

Hope this can help

Hi,
I have an easier way to use AT commands with HC-05 etc. See:
http://arduino-info.wikispaces.com/BlueTooth-HC05-HC06-Modules-How-To
and the command sketch here:
http://arduino-info.wikispaces.com/BlueToothCommandUtility

How can we change the Master or Slave Status in Sparkfun Gold Bluetooth Modems, in order to communicate between two arduinos through those bluetooth modems

How can I change the Master or Slave state of the Sparkfun Gold Bluetooth Modem in order to communicate between two arduinos through those modems