HC-05 "CONN" Command?

So im trying to connect an HC-05 (M) I have to an HC-06 (S), and I successfully got the address of the HC-06 (I think) and now I'm trying to pair them. I read online that I can use commands like LINK, BIND, and PAIR to connect, but it seems that the HC-05 doesn't recognize any of those commands (according to AT+HELP). It does, however, have a command listed under AT+HELP called "CONN", but I can't find documentation for this command anywhere.

Is there a way for me to connect my modules together? Do I need to use the "CONN" command? Any help would be much appreciated

AT+HELP listed commands (sorry for formatting):


  • Command Description *

  • ---------------------------------------------------------------- *

  • AT Check if the command terminal work normally *

  • AT+RESET Software reboot *

  • AT+VERSION Get firmware, bluetooth, HCI and LMP version *

  • AT+HELP List all the commands *

  • AT+NAME Get/Set local device name *

  • AT+PIN Get/Set pin code for pairing *

  • AT+BAUD Get/Set baud rate *

  • AT+LADDR Get local bluetooth address *

  • AT+ADDR Get local bluetooth address *

  • AT+DEFAULT Restore factory default *

  • AT+RENEW Restore factory default *

  • AT+STATE Get current state *

  • AT+PWRM Get/Set power on mode(low power) *

  • AT+POWE Get/Set RF transmit power *

  • AT+SLEEP Sleep mode *

  • AT+ROLE Get/Set current role. *

  • AT+PARI Get/Set UART parity bit. *

  • AT+STOP Get/Set UART stop bit. *

  • AT+INQ Search slave model *

  • AT+SHOW Show the searched slave model. *

  • AT+CONN Connect the index slave model. *

  • AT+IMME System wait for command when power on. *

  • AT+START System start working. *

  • AT+UUID Get/Set system SERVER_UUID . *

  • AT+CHAR Get/Set system CHAR_UUID . *

  • -----------------------------------------------------------------*

  • Note: (M) = The command support master mode only. *

This is a pretty good tutorial about how to get the HC05 into the role of master device.
https://howtomechatronics.com/tutorials/arduino/how-to-configure-pair-two-hc-05-bluetooth-module-master-slave-commands/

The HC06 should not need any configuration.

And rightly so.....
AT+CONN is a full-bottle Bluetooth4 command. It seems that the first thing you need to do is to clearly ascertain what you are holding in your hand - and then enlighten us.....

HC-0x is identifiable by two large chips on board., while I believe all BT4 devices have only one. If your master turns out to be an HM-10, it is not compatible with HC-06, and I don't think it has that CONN command either.

Master/Slave Pairing of two Bluetooth Modules
Follow these steps: (tesed using UNO-1/Master-BT(HC05) and UNO_2/Slave-BT(HC05 of Fig-1)


Figure-1:

1. Check that UNO-HC06 is working by pairing HC06 with your Android Phone's Bluetooth.
2. Unpair your Phone and BT.
3. Upload the following sketch in the UNO with which HC06 is connected.

#include <SoftwareSerial.h>
SoftwareSerial SUART(A2, A3); // SRX = 2, STX = 3

void setup()
{
  Serial.begin(9600);
  SUART.begin(38400);
}

void loop()
{
  if (SUART.available())
  {
    char x = SUART.read();
    Serial.print(x);
  }

  if (Serial.available())
  {
    char ch = Serial.read();
    SUART.print(ch);
  }
}

4. Bring HC06 into AT Command Mode.
5. Get the Password issuing this command: AT+PSWD (my one is: 1234)
6. Get the Address issuing this command: AT=ADDR (my one is: 21:13:A36B)
7. Make HC06 as a Slave by issuing this command: AT+ROLE=0
8. Establish Slave Connect Mode issuing this command: AT+CMODE=1
9. Upload the sketch of Section-3 into Arduino UNO with which the Master HC05 is connected.

10. Bring HC05 into AT Command Mode.
11. Get Password of Master BT (HC). If it is not same as Slave, then set it at 1234 (Section-5) with this command: AT+PSWD=1234

12. Get Address and record it.
13. Make HC05 as a Master by issuing this command: AT+ROLE=1
14. Establish Master Connect Mode issuing this command: AT+CMODE=0
15. Bind Slave with Master issuing this command: AT+BIND=21,13,A36B
(note that colons are replaced by comma (,))

16. Remove Vcc-pin and EN-pin supplies from both BTs.
17. Connect 5V supply at Vcc-pin of both BTs.
18. Wait for a while.
19. Check that both BTs are paired. It is indicated by repetitive consecutive two blinks and then a 5-sec pause.
20. Change SUART.begin(38400); to SUART.begin(9600); in the sketch of Section-3 and upload it into Master UNO that is connected with HC-05.

21. Change SUART.begin(38400); to SUART.begin(9600); in the sketch of Section-3 and upload it into Slave UNO that is connected with HC-06.

22. Open Serial Monitors of both UNOs at Bd = 9600.
23. In the InputBox of Master Serial Monitor, you enter Hello Slave and then click on the Send button. Check that the message has appeared on the OutputBox of the Serial Monitor of Slave.

24. In the InputBox of Slave Serial Monitor, you enter Hello Master and then click on the Send button. Check that the message has appeared on the OutputBox of the Serial Monitor of Master.

25. This is my Output when checked using Master-BT(HC05) and Slave-BT(HC05). I don't have HC06.

Output: (Fig-2)
SMBTx
Figure-2:

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.