Go Down

Topic: HM-10 no AT but serial fine (Read 143 times) previous topic - next topic

mortonc

Hi,

I've been playing around with my new HM-10 connected to a nano. Using the following code I am able to communicate backwards and forwards between the arduino IDE serial monitor and the HM-10 (via an ios BLE serial monitor).

Code: [Select]


#include <SoftwareSerial.h>

SoftwareSerial mySerial(3, 2); // RX, TX

void setup() 
{
  // Open serial communications and wait for port to open:
  Serial.begin(9600);
  while (!Serial) {
   
  }

  mySerial.begin(9600);


}

void loop() // run over and over
{
  if (mySerial.available())
    Serial.write(mySerial.read());
  if (Serial.available())
    mySerial.write(Serial.read());
}



However if I try to send AT commands to the unit either by typing into the arduino serial monitor or the app I do not receive any response. I have tried with carriage return, line ending, both and none but no repsonse from any.

I have also tried it while the unit is connected to my phone and while it is disconnected.

Does anybody know what might be causing this issue?

Nick_Pyner

I am able to communicate backwards and forwards between the arduino IDE serial monitor and the HM-10 (via an ios BLE serial monitor).
This confirms your wiring and procedures are kosher
Quote
However if I try to send AT commands to the unit either by typing into the arduino serial monitor or the app I do not receive any response.
You cannot do it from the app. You can only send AT commands when Bluetooth is not in communication mode. Do it from the serial monitor.

mortonc

You can only send AT commands when Bluetooth is not in communication mode. Do it from the serial monitor.

I Nick thank you for your response. I have tried it while the bluetooth is not connected and sent AT commands through the arduino IDE serial monitor but received no reply.

Nick_Pyner

This might be just a matter of terminating the commands. I'm not familiar with HM-10
http://www.martyncurrey.com/hm-10-bluetooth-4ble-modules/

Go Up