0
\$\begingroup\$

I'm programming an Arduino to use an HM-10 BLE device in Central mode to read a BLE Peripheral. I'm able to discover and establish a connection with the Peripheral (via AT+CONnnnnnnnnnnnn command) but once the connection is established (received OK+CONN), the HM-10 does not respond to any further AT commands (including "AT") until the peripheral times out and I get an OK+LOST from the HM-10.

Can anyone shed any light on what I'm doing wrong? I've searched all over and can't find a reference that details this low-level procedure.

Thanks for any help!

asked Feb 20, 2019 at 0:58
\$\endgroup\$
1
  • \$\begingroup\$ I should note that I'm programming at a low level, I couldn't find a library that worked for this. \$\endgroup\$ Commented Feb 20, 2019 at 1:00

1 Answer 1

1
\$\begingroup\$

Assuming you send AT commands via UART to the HM-10 module it's programmed not to receive them while it's connected by default. This is described in the datasheet http://www.jnhuamao.cn/bluetooth40_en.zip enter image description here

Mode 0:

  • Before establishing a connection, you can use the AT command configuration module through UART.
  • After established a connection, you can send data to remote side from each other.

If you send an AT command in Mode 0 you will make the module disconnect and then it's gonna be ready to receive AT commands. You can program it to not do this and receive them but not execute them until you send a command to do so.

The datasheet also describes mode 1 and mode 2 where you can also send AT commands over bluetooth from the connected device and it will not disconnect.

Mode 1:

  • Before establishing a connection, you can use the AT command configuration module through UART.
  • After established a connection, you can send data to remote side. Remote side can do fellows:

Send AT command configuration module.

... more cool stuff

answered Mar 8, 2019 at 2:35
\$\endgroup\$
0

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.