0

Iam working with gyroscope and Iam trying to send its values from one bluetooth(HC-05) module to another bluetooth module but the data exchange is not happening and I have used 2 arduino boards to do it.

Is there a simple way to do it?

1

1 Answer 1

1

I think there is no simple answer for that. First you have to pair 2 HC-05 modules. To do so, you have to configure one HC-05 as slave, and other HC-05 as master.

Steps for SLAVE:

  1. Be sure to select correct Baudrate in your Terminal Emulator (Arduino IDE or Terraterm etc.) for your module. There is no default baudrate... Different manufacturers set the baudrate on their HC-05's differently... 9600 and 38400 are good starting points.
  2. Enter AT mode, by providing high level(3.3V or 5V) signal on KEY pin(PIO11)
  3. Note the values of AT+PSWD?, AT+NAME? and AT+ADDR?(let's say 1111:22:123456) commands. You might set the password to 1234 for easy remembering. Issue AT+PSWD=0000...
  4. Be sure to set the module to slave mode by issuing AT+ROLE=0 command.

Steps for MASTER:

  1. Be sure to select correct Baudrate in your Terminal Emulator (Arduino IDE or Terraterm etc.) for your module. There is no default baudrate... Different manufacturers set the baudrate on their HC-05's differently... 9600 and 38400 are good starting points.
  2. Enter AT mode, by providing high level(3.3V or 5V) signal on KEY pin(PIO11)
  3. Reset the module to its original state by issuing AT+ORGL command.
  4. Remove the previous parings(if any) by issuing AT+RMAAD command.
  5. Set same password as slave by issuing AT+PASSWD=0000 command.
  6. Change the role to master; AT+ROLE=1
  7. Set connecting mode to any address it sees; AT+CMODE=1
  8. Initialize the SPP profile lib ; AT+INIT
  9. Be sure that you see the slave HC-05 module, AT+INQ command will list the modules you see.
  10. Be sure that you see address of the slave module(1111:22:123456).
  11. Last of all enter AT+LINK=1111,22,123456(note the commas).

With these steps you should exchange data...

1
  • Sure @szahin will try to do it Apr 20, 2016 at 2:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.