hi all i am using hc-05 Bluetooth module but i can pair with it i but 0000 and 1234
but still not working

this is the module
thank you
⚠ DO NOT CREATE TOPICS IN THIS CATEGORY ⚠
To help you in the best way we need some info.
- What is your code?
- What do you want to build?
You probably mean the password to pair, right?
Thank you very much in advance,
cloudDev
thank you but i didn't made any code yet i just want to pair with the Bluetooth module
Then I unfortunately also do not know.... But there is a tutorial inside how to reset it. Maybe that helps?
OK, no code needed, you just need power and see the LED flashing. Clearly, the phone can see HC-05, so I assume it is an Android, and one of those passwords should work even if it is really an HC-06. How is Bluetooth powered?
I conect vcc to 5 volt and gnd to gnd and EN TO PIN 9 ,I give 5 volt in pin 9 ,and use pin 10 ,11 as rxd and dxd
Nowu bay a new one and i use this code
#include <SoftwareSerial.h>
SoftwareSerial BTSerial(10, 11); // RX | TX
void setup() {
pinMode(9, OUTPUT); /* this pin will pull the HC-05 pin 34 (KEY pin) HIGH to switch module to AT mode */
digitalWrite(9, HIGH);
Serial.begin(38400);
Serial.println("Enter AT Commands:");
BTSerial.begin(38400); // HC-05 default speed in AT command mode
}
void loop() {
//The code below allows for commands and messages to be sent from COMPUTER (serial monitor) -> HC-05
if (Serial.available()) // Keep reading from Arduino Serial Monitor
BTSerial.write(Serial.read()); // and send to HC-05
//The code below allows for commands and messages to be sent from HC-05 -> COMPUTER (serial monitor)
if (BTSerial.available()) // Keep reading from HC-05 and send to Arduino
Serial.write(BTSerial.read()); // Serial Monitor
}
I
And as i sied i conect EN TO PIN 9 ,TXD To pin 10 and RXD to pin 11
Theat command start corectly when i press the AT and enter gives me OK but anather it gives me error 0
and still didnt paierwith my phone what could be th proplem ![]()
Your problem, as demonstrated by your code, is that you are putting Bluetooth into AT mode, and probably succeeding, thereby destroying all chances of pairing with the phone.
You have to come to terms with the fact that you cannot communicate while in AT mode and therefore you must make up your mind about what you want to do do.
See post #6.
thank you i was written a false statement for At mode
I have deleted your other overlapping posts on this subject @ahmadalbaridi. Since the subject is already under discussion here, those are considered "cross-posts".
Cross-posting is against the Arduino forum rules. The reason is that duplicate posts can waste the time of the people trying to help. Someone might spend a lot of time investigating and writing a detailed answer on one topic, without knowing that someone else already did the same in the other topic.
Repeated cross-posting can result in a suspension from the forum.
In the future, please only create one topic for each distinct subject matter. This is basic forum etiquette, as explained in the "How to get the best out of this forum" guide. It contains a lot of other useful information. Please read it.
Thanks in advance for your cooperation.
I also had a little trouble with an HC-05 module. I was expecting my phone to "report" it was connected or paired. I tried a few thing but nothing changed, untill I used the app I programmed to connect via phone to the module.
It just worked! phone did not say or indicate it was paired but the app worked perfectly.
Maybe this will also help you:
As indeed you should...
I submit that the only way this can happen is that your HC-05 is not actually an HC-05, it is in fact a BLE device, which is working normally.
We find code that is junk. It clearly states that 38400 is the default baud rate for communications, which is untrue, thereby rendering the the rest of it not worth reading.
While the wiring diagram is not unreasonable, it is hardly the smartest way to connect to a Mega and it would be better to use one of the other serial ports. Yes, there is comment to that effect in the article but it is still baloney as the author does not realise that the "other serial ports" are actually hardware serial ports, just like pins 0,1, and clearly has no idea of what he is doing.
The default baud rate for comms is 9600, and you do not use software serial on hardware serial pins.
MY PHONE or any another phone gives me it cant be paired so this is the problem
and if you please is it necessary to put a voltage divider with RXD I see many videos and tutorial didn't use it
I think you can be sure arneko is lying, or kidding himself, or is actually using a BLE device, so nothing is relevant to your problem. It won't be the first time somebody thinks they have a HC-05, but they don't.
In post #6 I assumed you are using an Android phone, but you have made no comment. It won't be the first time somebody has inflicted themselves with a iPhone.
If you google images, you will see that about half of them don't have the divider. If you look at the back of the breakout board, you will see that it clearly states that the signal lines should be 3.3v., and this is clearly the proper practice. Only a fool will tell you not to bother with the divider, but I am not aware of anybody who didn't, actually frying their Bluetooth. There is no need for you to be the first.
thank you for your information so i think i broke my hc05 because i didn't use the divider or what you think
yes i use an android phone and i need a new hc05
and if you can help me please i have another hc05 both red and blue led keep blink
I am not aware of anybody actually frying their Bluetooth because they didn't use a divider.
I have never heard of an HC-05 with two LEDs or a blue one. I rather suspect it is not an HC-05. Please show pictures and links.
I recall the pic in post#1, which looks asbolutely normal!
To pair and connect, to establish 'viability', all you need is +5V and GND connected (nothing else, and leave 'EN' alone).
If the '05 has been configured as 'master' then it cannot pair with your mobile.
Yes, looks like an HC-05 alright. You might like to explain in detail the rest of your adventure. I realise that, while the author shows a Mega in the article, he may have actually been referring to a Uno etc when talking about software serial.



