I have two HC-05 modules the first one's role as a Master and the other is a slave one. I've done some AT commands to set up each HC-05 module
= Master's configuration has to be like that: name=Master, Password=2021, only accept connection from one HC-05 module only (for privacy purposes) via the Slave's Address, Baud rate = 9600,0,0.
= Slave's configuration has to be like that: name=Slave, Password=2021, Baud rate = 9600,0,0.
The AT command I used to set this configuration like that:
Slave:
/*Set Slave mode.*/
AT+ROLE= 0
/*Setting up Baud rate (The same as the Master Baud Rate to proper connection).*/
AT+UART= 9600,0,0
/*Rename the module.*/
AT+NAME=Slave.
/*Get the Slave address to save it for Master*/
AT+ADDR?
(The response will be the module Address, I will save it for Master configuration) let it = 98d3:a1:fd7a0f
Master:
/*Set master mode.*/
AT+ROLE= 1
/*For secured connection make Master accept only one module via its unique Address.*/
AT+CMODE=0
/*Setting up Baud rate (The same as the Master Baud Rate to proper connection).*/
AT+UART= 9600,0,0
/*Save salve address*/
AT+BIND=98d3,a1,fd7a0f
/*Rename the device.*/
AT+NAME=Master.
/*Change Password.*/
AT+PSWD= 2021
I saw a lot of videos the result of all of them is: the two modules are automatically connected to each other when power is on. but mine is not!
Were I make any mistake!? these are some videos that I've watched to achieve my goal: https://www.youtube.com/watch?v=DgFZE16UKTM&t=31s https://www.youtube.com/watch?v=BXXAcFOTnBo&t=222s
note:
wiring when AT command was Tx->Tx, Rx->Rx, EN->3v3, GND->GND, VCC->VCC.
wiring when normal condition was Tx->Rx, Rx->Tx, EN->(not connected), GND->GND, VCC->VCC.