HC-05 At+Bind Error(7) Trouble linking/Binding Master HC-05 with Slave HC-05

I Figured maybe I could find a fix to my problem on the net (google/Arduino forums) but it seems I can’t find anyone with a fix to this problem :o

Layout master:
– 5V to Arduino 5V
– GND to Arduino GND
– TX to Arduino D10
– RX to Arduino D11 through a voltage divider (3.3V)

Slave:
– 5V to 5V
– GND to GND
Master current settings: Cmode=0, Role=1, AT+INQM=0,5,9, uart Baudrate:38400, pass:1234, Pair=21:13:11DE
Slave: Cmode=1, Role=0,uart Baudrate:38400, pass:1234

I am able to pair the slave to the Master using AT+PAIR=21,13,11DE,9.

But if I try to to do a AT+Bind with 21,13,11DE I get an error(7), and if I try to use Link it always fails?

I Configured the slave on the same arduino, and just power it without the tx or rx connected. is this maybe my problem? I’m going to try to connect it to a pro Micro(since I will be using a couple for the native hid) If anyone can help guide me through this problem and get at least some communication going this will be great to use. I’m still learning the bluetooth module but from both sniffing out the addr of the slave with another HC-05, and inquiring it what its addr is that they both return 21:13:11DE.

This probably isn’t the issue with the code uploaded to the arduino but it is the code by Hazim Bitar

/*

AUTHOR: Hazim Bitar (techbitar)
DATE: Aug 29, 2013
LICENSE: Public domain (use at your own risk)
CONTACT: techbitar at gmail dot com (techbitar.com)

*/


#include <SoftwareSerial.h>

SoftwareSerial BTSerial(10, 11); // RX | TX

void setup() 
{
  //pinMode(9, OUTPUT);  // this pin will pull the HC-05 pin 34 (key pin) HIGH to switch module to AT mode
  //digitalWrite(9, HIGH); 
  Serial.begin(9600);
  Serial.println("Enter AT commands:");
  BTSerial.begin(38400);  // HC-05 default speed in AT command more
}

void loop()
{

  // Keep reading from HC-05 and send to Arduino Serial Monitor
  if (BTSerial.available())
    Serial.write(BTSerial.read());

  // Keep reading from Arduino Serial Monitor and send to HC-05
  if (Serial.available())
    BTSerial.write(Serial.read());
}

I’m kind of stumped… :confused: Note: My end goal is to make a bluetooth controller. but still trying to get the bluetooth part to work.xD

Same problem. Have you decided it?

Hi,

I too had the same issue when i changed my modules it was working,
the issue was that both module was of different version,so it will not support the mac address of another version.

1.Check the version of your module by AT+VERSION? in AT mode and verify both modules having same version or not.

  1. Get the current device address with AT+ADDR? and try Binding the same or similar address Like AT+BIND=00,00,0000

if step 2 is working then find 2 Bluetooth device with same version.

hi, had the same problem and saw this so i figured it out

the hc-05 wasn't showing the full address of my hc-06, it was showing 21,13,AD4E when the real was 0021,12,00AD4E

then i found out that after you set it to be master, first i set everything ok

AT+CMODE=0 allows the HC-05 to connect to any device
AT+INQM=0,5,9 set inquiry to search for up to 5 devices for 9 seconds
AT+INIT initiates the SPP profile. If SPP is already active you will get an error(17) which you can ignore.
AT+INQ searches for other Bluetooth devices.

and after that

AT+BIND=0021,13,00AD4E

AT+PAIR=0021,13,00AD4E,20

and everything was ok, i culd communicate and didn't need the link command at all

Yes the solution is leading zeros ...

see my post in this other thread on this topic for more details

Had a similar problem binding HC-05 modules as described above. The problem is determining the correct address of the slave HC-05.

Put the master HC-05 into AT mode(slow blinks) by powering it up while pushing the reset button on the HC-05.

You can view the address of the slave module using AT+INQ?

This works ONLY IF the slave module is in search mode (rapid blinks).

You may get an address like 10:4:48

48 is actually 400008- you need to insert 4 zeros for some reason.

The AT+BIND= 10,4,400008 should work.

For a recent project I followed this guide
http://www.martyncurrey.com/connecting-2-arduinos-by-bluetooth-using-a-hc-05-and-a-hc-06-pair-bind-and-link/
and had no troubles at all

This site is very helpful:HC-05 Bluetooth AT Command List | Microcontroller Tutorials