Hello.
I have two HC-05 modules, one as slave, another one as master.
They are successfully connected.
If master send for example println("L"), slave successfully receive "L\r\n" and turn on LED.
Oposite communication is not working - if slave successfully receive "L\r\n", it sends back println("ACK").
Master receives something, but it;s not readable. It looks like different baud rate is set, but both modules, master and slave has set uart to - AT+UART=38400,1,0.
Could you please help me, why master module does not receive correct response?
ondrejtomcik:
Hello.
I have two HC-05 modules, one as slave, another one as master.
They are successfully connected.
If master send for example println("L"), slave successfully receive "L\r\n" and turn on LED.
Oposite communication is not working - if slave successfully receive "L\r\n", it sends back println("ACK").
Master receives something, but it;s not readable. It looks like different baud rate is set, but both modules, master and slave has set uart to - AT+UART=38400,1,0.
Could you please help me, why master module does not receive correct response?
Thanks
physical Connection?
Swap the two modules, see if the problem follow a specific module.
void loop() {
if (BT.available()) {
if (BT.readStringUntil('\n') == "L\r") {
BT.println("ACK"); // I also tried simple BT.write(1);
// some action
}
}
}
Slave module always correctly receive "L\r\n". Response to master always comes but it's invisible, or E character, or question mark in box, dunno where could be problem.
Master hc-05 is connected to arduino nano, slave to uno.
I used different BT module and it's working. Maybe it's broken.
But I have another question please. Can slave module print address of master module, which is establishing the connection and stop it? Or does it have some in-build allow / block address list?
I read it already, but did not find any information regarding my question.
Allow / block list is maybe not there, but there should be the way to get address of connected/connecting device.