HM-10 Bluetooth Not Responsive

Hello,

I'm pretty new to Arduino and I'm trying to get two HM 10's to pair on a mega 2560, (I also have other R3 UNO's laying around), circuit and code are posted, serial monitor is set to no line ending at 9600 baud, it accepted AT and then AT+ROLE1, but then i was told to also do AT+IMME and AT+RENEW and it's now only solid red and not accepting AT commands at all. My 2nd one I tested and it's accepting AT commands and blinking normally. Also I'm not great with circuits but I think that's correct? Not too sure what to do, any help would be great.

Thanks!


No, that’s not how to do it.

Please read and use the link How to get the best out of this forum - Development Tools / IDE 1.x - Arduino Forum

Martyn Currey's site has excellent tutorials on how to use HM-10 with Arduino. Study them carefully.

void setup() {
  Serial.begin(9600);    // USB serial monitor
  Serial1.begin(9600);   // HM-10 on pins 18/19
  Serial.println("HM-10 ready on Serial1");
}

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

  if (Serial.available()) {
    Serial1.write(Serial.read());
  }
}

The code you posted is not the problem. See post #3 above.

And schematics look like?

I'm not too sure how to draw a schematic for it but this is best I could do, receiving end will be identical. I tried on tinker cad but they don't have bluetooth modules on there to simulate it or make the circuit clearer.

Thank you for the link, I'll give it a good read through but at the moment it doesn't seem to say anything for an unresponsive module, I tried some of the variations of different baud rates in case it's one of the newer firmware variants but nothing seems to help.

I submit your code IS a problem, and the above line is both meaningless and dangerous. You are trying to use a BLE device as a drop-in replacement for a classic Bluetooth HC-05 - which it really isn't. For starters, I recall HM-10s come by default at 115200 baud. Have you configured yours to 9600?
Check (again) Martyn Currey. I think he will point you to a library for BLE devices.

Also, consider what you really need Bluetooth for. If it's just sending data to the outside world, I submit an HM-10 is more trouble than it is worth, and you are better off with an HC-06.

If you want to get to into some BLE fancy operations, you need to ensure that your HM-10 is up to the job. Most are not, they are just crippled junk. You might be better off using an ESP-32. They, or some, have a more sophisticated BLE on board.

It's for a school engineering project, basically just want to be able to control some joysticks from one breadboard to move two DC motors on another, I do also have some older HC-05s which I was able to pair (however they aren't sending a signal properly so that's another issue entirely). I do not know much about Arduino so I don't know what are the pros and cons of each generation of bluetooth. The manual that came with the HM-10s from DSD tech said they are set to 9600 as far as baud rate goes.

The module is very likely not set up properly. If you carefully follow the instructions on the Currey site, there is at least a chance that you will succeed.

What you posted about the AT command setup does not make sense, and you may even need to do a factory reset.

Could you tell me how to do a factory reset? I said earlier I had a 2nd HM 10 that is working fine and receiving commands, I put both through the same circuit so I think the setup should be okay, the issue is that after doing AT+IMME1 and AT+RENEW it went into a state of being unresponsive to any AT commands, so it just stays solid red and no longer accepts any AT command, and unlike the HC-05s it doesn't have a manual button i can hold down to put it into AT mode again.

A web search for "factory reset HM-10" turns up useful information.

HM-10 is in AT mode by default on power-up. It stays that way until you send a Serial. command.

Is it? Martyn Currey also has everything you need to know about HC-05 to HC-05 comms!

I'm not too sure what the issue is then because it if it's in AT mode by default on power up then it should accept AT commands? But it is not responsive at all to any AT commands, while the other one on the exact same circuit, baud rate, etc... takes them fine. Either way I have another HM-10 coming today so I'll mess around with it more, and I did get the HC-05s to pair at least

That rather suggests a mechanical connection problem.

After you've read up on Martyn Currey.