Hello,
I am working on making a tiny hotwheels rc car (first-ish arduino project) and wanted to have a bluetooth controler through my phone. i was following a basic tutorial on connecting the HC-05 module to my nano and communicating with it through the arduino IDE serial monitor which worked perfectly fine where i managed to change it's name and see the bluetooth PIN but when i try to pair a device with it, it fails. tried with google pixel, samsung and my laptop's bluetooth none would work.
If someone has any ideas what is happening pls help me.
Thanks!
Is the HC05 set to slave mode? If it is a master it will not be seen by the phone.
To do this, you were in AT mode. Did you exit this mode and go back to communication mode?
With just power applied to the HC05 module you should see the red light flashing rapidly and should be able to find it with your phone and then pair.
My phone does detect the board just won't connect.
How do you set it to communication mode? Just disconnect the board from the ide?
Connecting requires an application, and the phone needs to be paired first. The pairing is done in the Connections in Settings.
Cycling power to the HC05 should get you to the situation where the red light is flashing rapidly and it ready to be detected and paired or connected to an app once paired.
yh sorry that is what i meant , it is not pairing. When you mean rapidly, is tha fast or just flashing every seconds?
Fast. I believe the unconnected and communication mode default flash is 2X per second.
The 3 flash patterns of HC05 modules are:
- rapid on, off flash (2 Hz ish) = communication mode, not connected.
- rapid flashes (on, off, on, off, takes ≈ 1 second) then a pause (off) of ≈ 2 seconds >> communication mode, connected.
- slow flash, ≈2 seconds on, ≈2 seconds off = AT mode
What are you seeing?
i am seeing repetitive 1 sec on, off but no pauses.
Maybe it would help to define some things.
One pairs the HC05 with the phone in the Bluetooth settings. The phone sees the HC05 and asks the user to enter the passcode (PIN).
One then connects the paired HC05 to an app that can talk with the HC05. I really like the Bluetooth serial terminal app.
That sounds like pattern #1 and the module should be seen by the phone, shown as an available device, and then can be paired to the phone when selected and the 1234 or 0000 password is entered.
Yes that is what i was trying to say, sorry to be unclear. i do see the module on my phone, try to pair it, it asks or the password i enter it then t say : "Can't comunicate with module".
I tried the password the module gave me in the AT mode : 123456 and tried 1234 and tried 0000.
Also to note : when i enter the right password and it fails pairing the led stops on "on" unlike when i enter the wrong password where it flashes again. (maybe this helps)
When you had the HC05 in AT mode, did you make any other changes? I don't see an answer to my question in post #2, are you sure that the HC05 is a slave.
If you put it in AT mode be putting 3.3V on the EN pin and powering up the module, power down the module and disconnect the 3.3V from the EN pin. Then when powered back up it will be in communication mode.
If you put it in AT mode by holding the button, just power the HC05 down and back up and it should be in communication mode.
This just confuses me more.
I would go back into AT mode and use AT+ORGL to reset to factory defaults. The password should be 1234 or 0000 and the communication baud rate 9600.
I am not sure if it is a slave.
ok now it should be in communication mode i think.
ok i will try that but got to go.
Thank you two for your help i will let you know i it works.
thank again
gives me "error" when i enter AT+ORGL.......
Please describe how you put the HC05 into AT mode.
If that is so, I think your device is BLE, not HC-05. This is further suggested by you getting an error from AT+ORGL, which is an illigitimate command for BLE.