0

Does any one know what AT+CMODE=2 "slave loop" used for. As I try to connect one HC-05 master to two slaves using it, but it didn't work. i donot know if AT+cmode=2 is used for connecting to multiple slaves or not as i want to know what is used for , i tried to understand what it do from the HC-05 datasheet but i didnot find anything useful about it excpet for what is this image

  • 2
    why do you think that AT+cmode=2 is used for connecting to multiple slaves? .... please provide a link to the source of your information – jsotola May 14 '18 at 0:26
  • 1
    HC-05 CANNOT connect to more than one slave at a time. This wouldn't even make sense, since this is a bluetooth to serial/UART module. UART can only work between two devices, not more – chrisl May 14 '18 at 11:44
0

AT+CMODEis mainly used for setting the address pairing purpose. What chrisl stated is exactly true, you cannot connect more than 1 slave to the master at a time. When you set the parameter as 2 you actually set a passive connection, a connection between master and slave to receive the remote Bluetooth master device data and send it back to the master device. It is like a feedback-loop, and is mainly related for testing the connectivity and other features of the PAN (Personal Area Network). So actually whatever is received from the master, is sent back again to the master by the slave.

0

Based on the documentation :

Slave (slave role)----Passive connection;

Slave-Loop----Passive connection, receive the remote Bluetooth master device data and send it back to the master device;

Master (master role)----Inquire the near SPP Bluetooth slave device, build connection with it positively, and build up the transparent data transmission between master and slave device.

More info here : http://www.linotux.ch/arduino/HC-0305_serial_module_AT_commamd_set_201104_revised.pdf

So if you want your HC-05 master send : AT+ROLE=1

If you want it to connect to a device safely send : AT+CMODE=0 but you have then to specify what address ( AT+BIND= )

If you want it to connect to all devices available send : AT+CMODE=1

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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