Bluetooth for Arduino: can i use master?

Hi, i have a module with IMU (or MARG: acc,gyro,mag) which uses bluetooth and i connect it to my desktop pc using a dongle. So..(tell me if i am wrong..) this module is the slave and the dongle is the master...isn't it?

Now..i'd like to pilot an arduino robot like this one http://blog.miguelgrinberg.com/post/building-an-arduino-robot-part-i-hardware-components

but i want to use the module with the IMU to pilot it. I want to use the IMU as an inclinometer and when i tilt my head forward the robot must go forward, when i tilt my head backward the robot must go backward..etc...right and left.

The module is a bluetooth slave...what have i got to use in arduino to make it communicate with the module? This is not the right one... http://www.amazon.com/gp/product/B006RBK9ZW?tag=thirdwish-20 confirm it? what have i got to use?

thanks in advance..

k0ral: which uses bluetooth and i connect it to my desktop pc using a dongle. So..(tell me if i am wrong..) this module is the slave and the dongle is the master...isn't it?

Yes. But the module could be a master too. It's just a matter of configuration

Now..i'd like to pilot an arduino robot like this one http://blog.miguelgrinberg.com/post/building-an-arduino-robot-part-i-hardware-components

but i want to use the module with the IMU to pilot it. The module is a bluetooth slave...what have i got to use in arduino to make it communicate with the module?

A master is needed in order to establish a connection. This would normally go in the controller, whatever that is. Your intentions are far from clear but it appears that the essential function of your bluetooth device is changing and therefore you have to change the duty of the bluetooth module. If it is an HC-05 (master) this may be no more than a matter of configuration. Here is some stuff on Arduino to Arduino comms http://phillipecantin.blogspot.com.au/2012/01/arduino-bluetooth-link.html

This is not the right one... http://www.amazon.com/gp/product/B006RBK9ZW?tag=thirdwish-20 confirm it?

Who knows? Who can tell? If they won't tell you, don't buy it. Who cares? It's too expensive anyway.

Just get an HC-05 off eBay for about $7

Nick_Pyner:

k0ral: which uses bluetooth and i connect it to my desktop pc using a dongle. So..(tell me if i am wrong..) this module is the slave and the dongle is the master...isn't it?

Yes. But the module could be a master too. It's just a matter of configuration

I read in the comments of the link you gave me "I say 'similar' because if you use some 'Slave Only' modules (EGBT-04S), you won't be able to run the same code on those. So, I would suggest using only the Master-Slave modules (EGBT-045MS) which will resemble the BlueSmirf behavior."

So..i know that my module is a RN-42 and the firmware is configured as slave. I can configure some parameters and i can tell to it to start to stream data from the IMU. What it is not clear to me is...can i use an HC-05 as master? According to the link you gave me i think the answer is yes..BUT...in that project it is used the Bluesmirf and the authors talks about some commands which are not AT commands (used in HC-05). So..what would it happen if i buy HC-05 with RN-42? I'm so confused..

k0ral: I read in the comments of the link you gave me "I say 'similar' because if you use some 'Slave Only' modules (EGBT-04S), you won't be able to run the same code on those. So, I would suggest using only the Master-Slave modules (EGBT-045MS) which will resemble the BlueSmirf behavior."

So..i know that my module is a RN-42 and the firmware is configured as slave. I can configure some parameters and i can tell to it to start to stream data from the IMU. What it is not clear to me is...can i use an HC-05 as master? According to the link you gave me i think the answer is yes..BUT...in that project it is used the Bluesmirf and the authors talks about some commands which are not AT commands (used in HC-05). So..what would it happen if i buy HC-05 with RN-42? I'm so confused..

OK maybe Cantin is a bit confusing but he appeared to have the best presentation. I think I now understand the problem, and I'm afraid it looks like I sowed some of the confusion. The bluesmirf he uses has a different command set. It doesn't use the standard AT serial commands. Nonetheless the basic principle is the same. He has one in master mode and one in slave mode. You don't need two masters. He only has identical units with, I understand, identical code, so that he can reverse roles with a jumper. There is no good reason to do this.

I don't know what an IMU is or an RN-42, and the EGBT codes are meaningless, although I can guess that S means slave and MS means master/slave. I'm afraid I don't know anything about Bluesmirfs either - other than the above command stuff.

What I do know is three clear things

  1. There is no need to know about anything other than the HC-05 and HC-06. An exception to this may be when you need to work over a greater distance than they are capable of.

  2. The documentation for HC-0x is pretty crappy, but that isn't a good enough reason to defect to something else.

  3. that you CAN use the HC-05 as a master.

Bluetooth is bluetooth and the HC-05 should work fine with the slave device you have, you just need to ensure that it is a master.

I only use my HC-05s as slaves. I understand they are slaves by default, but you can configure them by sending the appropriate AT signals when they are not paired.

Nick_Pyner: 3. that you CAN use the HC-05 as a master.

Bluetooth is bluetooth and the HC-05 should work fine with the slave device you have, you just need to ensure that it is a master.

I only use my HC-05s as slaves. I understand they are slaves by default, but you can configure them by sending the appropriate AT signals when they are not paired.

First of all thanks for your patience..:) Now, the next step is that i need to know how to setup the HC-05 as master. I'll look for some documents. Just a final question..to configure HC-05 as master i have to code the AT commands inside the code that i write with arduino IDE. Am i right? Thanks 4 all!

k0ral: Just a final question..to configure HC-05 as master i have to code the AT commands inside the code that i write with arduino IDE. Am i right?

I believe that is correct. As I said, I only use mine as slaves. This is for datalogging.