Go Down

Topic: Uno and HC-10 Bluetooth refuse to talk (Read 4971 times) previous topic - next topic

rosscopicotrain

Hi,
I picked up a HC-10 BLE 4.0 module and set to work playing with it. The module I got has level shifters so that I can use it with a 5V Uno.

I quickly realised that the numerous tutorials for the HC-05 will not work with the HC-10 since it is Bluetooth 4.0, not 2.x.

I have connected from the HM-10 to the Uno as follows:
    HM-10                       UNO
     Vcc---------------------Vcc       (My HM-10 came with level shifters on Vcc as well as Tx and Rx)
     GND--------------------GND
     Tx ----------------------Rx (D0)
     Rx ----------------------Tx (D1)

I then uploaded the following code:
Code: [Select]
#include <SoftwareSerial.h>

SoftwareSerial BTSerial(0, 1); //RX|TX


void setup(){
  Serial.begin(9600);
  BTSerial.begin(9600); // default baud rate
  while(!Serial); //if it is an Arduino Micro
  Serial.println("AT commands: ");
}

void loop(){
  //read from the HM-10 and print in the Serial
  if(BTSerial.available())
    Serial.write(BTSerial.read());
   
  //read from the Serial and print to the HM-10
  if(Serial.available())
    BTSerial.write(Serial.read());
}


I then open my Serial Monitor and see "AT Commands:" (Serial baud is set to 9600)
When I type "AT" and click send I get no response. To be sure I did it several times.

Additionally when I try to connect to the HM-10 from my Android phone (Nexus 5) I can see a HMSoft device. When I enter the password from the HM-10 datasheet (000000) (datasheet here -  HM-10 datasheet) I am told that it is the wrong password.

At this point I don't know what else to try. I have done some searching and found some people were having similar problems, but I'm not finding much on how they got past these problems.

Any and all advice would be most welcome!

rosscopicotrain

Got it sorted out now.
For anyone else having similar problems with HM-10 modules, check out the following Instructable:

Control RGB LED from Android with Arduino BLE

Go Up