[HM-10]Can't get ANY reply from AT Commands

Hello !
I have big problem with communication to my HM-10 module. First, before I bought orginal I bought AT-09/MLT-BT05 clone. I had big issue - My arduino MEGA 2560 using SoftwareSerial cannot communicate with module. Tried commands like “AT+NAME” ← sometimes it was worked ! Now, I bought orginal HM-10 Module, and situation is the same. When I type command simple “AT” ← there’s no reply. What’s wrong with this ? Tried a lot of samples to communicate via SerialPort. Connected TX<->RX, RX<->TX and 5V[I have converter built-in module) GND.

Bertek:
← sometimes it was worked

I submit either this is not true, or you have an intermittent wiring problem

Wiring problem you think ? Maybe you can help when I post sample code and image with connection.

#include <SoftwareSerial.h>

SoftwareSerial mySerial(2, 3);

void setup()
{
  mySerial.begin(9600);               // the GPRS baud rate   
  Serial.begin(9600);                 // the GPRS baud rate
  Serial.println("Konsola odpalona");   
}

void loop()
{
  if (mySerial.available())
    Serial.write(mySerial.read());
  if (Serial.available())
    mySerial.write(Serial.read());  
}

and … IMG’s:



darmowe hostingi serwerów minecraft

Instead of code just use the Serial Monitor first.
Get that working!

#include <SoftwareSerial.h>

SoftwareSerial mySerial(3, 2);

void setup()
{
  Serial.begin(9600);
  mySerial.begin(9600);
  Serial.println("Konsola odpalona");
}

void loop()
{
  if (Serial.available())
    mySerial.write(Serial.read());
  if (mySerial.available())
    Serial.write(mySerial.read());
}

Still nothing …
Bluetooth RX —> Arduino 2 PIN
Nluetooth TX —> Arduino 3 PIN

Wrong baud rate.

My or bluetooth ? Which rates should I use when default is 9600 ?

http://www.martyncurrey.com/hm-10-bluetooth-4ble-modules/

Nick_Pyner: I submit either this is not true, or you have an intermittent wiring problem

Code cannot work "sometimes". Nobody can spot an intermittent wiring problem from a picture, one can only have suspicions. Check the breadboard.

It is good practice to have a 1k/2k voltage divider in Arduino Tx line. Its absence is probably not the cause of your problem.

Hello again.
I know that site, I readed it before I made this thread. Now, i tried everything baud rates on Serial Monitor & BT - still no luck. Tried also connect it into arduino with female-female + male-male cables, still get nothing.

When I enable BT in phone I cannot connect to module because it reject connections.

What should I do ? :frowning: It’s second module which I can’t get working …

If it may have something diffrent to get it working, when I use sample code:

#include <SoftwareSerial.h>

SoftwareSerial mySerial(15, 14); // RX, TX  
// Connect HM10      Arduino Uno
//     Pin 1/TXD          Pin 7
//     Pin 2/RXD          Pin 8

void setup() {  
  Serial.begin(9600);
  // If the baudrate of the HM-10 module has been updated,
  // you may need to change 9600 by another value
  // Once you have found the correct baudrate,
  // you can update it using AT+BAUDx command 
  // e.g. AT+BAUD0 for 9600 bauds
  mySerial.begin(9600);
  Serial.println("Start konsoli !");
}

void loop() {  
  char c;
  if (Serial.available()) {
    c = Serial.read();
    mySerial.print(c);
    Serial.print("Komenda: ");
    Serial.print(c);
  }
  if (mySerial.available()) {
    c = mySerial.read();
    Serial.print(c);    
  }
}

I get something that:

With that instruction I get it working !

https://github.com/4ntoine/mega-to-hm10/blob/master/readme.md

Bertek: With that instruction I get it working !

https://github.com/4ntoine/mega-to-hm10/blob/master/readme.md

There is nothing magical about those instructions which leads me to think you had incorrect connection all along. ::)

I really want to think the same as you … But really, I tried port 2,3; 7,8; 12,13; 10,11 ← Inverted them, diffrent sample code’s. It really didin’t work before this sample and connected to port 18,19[RX1, TX1]. Now I have all what I want. But thanks for help, I’m really happy now when It’s working.

Bertek:
I really want to think the same as you … But really, I tried port 2,3; 7,8; 12,13; 10,11 ← Inverted them, diffrent sample code’s. It really didin’t work before this sample and connected to port 18,19[RX1, TX1]. Now I have all what I want. But thanks for help, I’m really happy now when It’s working.

So pins 18, 19 are the magical pins? LOL.

Maybe Yes? :D

Bertek: Maybe Yes? :D

Yeah, right.

Just am I sure there is a Easter bunny.

Em, if can we stop laughing for my dummy starts, May I ask how I can enable connections with my module? Which AT Command? :D

Bertek: Em, if can we stop laughing for my dummy starts, May I ask how I can enable connections with my module? Which AT Command? :D

You seem dead seat on following the Martyn Currey tutorial, so I leave it as a Google exercise for you.