1

Device: Laptop, HC-05, Resistor 2.2k and 4.7k, Arduino Uno R3

So im trying to rename and change password of my HC-05. for full detail schematic diagram. Here(the difference is, i also used the STATE Pin from HC-05 then connected it to Pin 9 since according to Instructubles it is used for activating AT Mode): enter image description here

Now for coding, i got it from Instructables.com and here: https://www.instructables.com/Modify-The-HC-05-Bluetooth-Module-Defaults-Using-A/ or

#include <SoftwareSerial.h>
SoftwareSerial BTSerial(10, 11);
#define Key 9
void setup()
{
  pinMode(Key, OUTPUT);  // this pin will pull the HC-05 pin 34 (key pin) HIGH to switch module to AT mode
  digitalWrite(Key, HIGH);
  Serial.begin(9600);
  Serial.println("Enter AT commands:");
  BTSerial.begin(38400);  // HC-05 default speed in AT command more
}

void loop() {
  // put your main code here, to run repeatedly:
  if(BTSerial.available()){
    Serial.write(BTSerial.read());
  }

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

The problem: i tried to follow the instructuble's instruction. but it didnt work. then i tried doing my own from what several tutorials i have read: for the details,

  1. i set my circuit and do the necessary wiring as shown in the picture + STATE Pin -> Arduino Pin 9.

  2. I then connected my Arduino Uno to my Laptop, the HC-05 is blinking per half second, if you need the detail. Then uploaded the code...then finally, I opened the Serial Monitor(note that my HC-05 is not Paired to any devices in the first place. i "Forgot" them just incase).

  3. then go to 9600 Monitor and enter simple command like AT, AT+NAME? or AT+PSWD? but nothing appeared in my terminal.

  4. i also checked the 38400 monitor and did the same things. nothing happened.

  5. then just maaaaybe it was just not showing but actually working, I tried AT+NAME=JULIE trying to rename my HC-05 to JULIE for each Terminal, going back and trying at 9600 then 38400. nothing happened at any Terminal. my HC-05 is still HC-05 name and the LED in my HC-05 are still blinking per half sec.

  6. Then a bit annoyed, i then do a try-and-error. i tried to upload the code, then Paired it now, this time with my Phone. Then enter AT Commands in my Bluetooth Terminal App(from Playstore) and try to AT Command there. but still, nothing works.

My HC-05 is working as intended when i used it a simple LED on and off, and Servo using my Phone wirelessly few hours ago. But when i tried to do AT Command codes, nothing appears in my Serial Monitor such as the OK() or other AT Command replies.

so i would like to know where i did go wrong and why i cant use AT Command whether 9600, 38400 or even trying to do AT Command in my Phone's BT Terminal App? if you think i have missed an important details that i should mention, feel free to let me know.

3
  • 1
    check the connections ... on transceivers the TX is usually the outgoing data being transmitted over the air, not transmitted to the controller over the wires connection
    – jsotola
    Commented Feb 1, 2023 at 15:48
  • Take a look at this blog post I did on this some time ago. I think it will answer most of your questions.
    – starship15
    Commented Feb 7, 2023 at 21:47
  • I know the topic is a bit old, but I'm curious to know the version of your BT module: AT+VERSION? I have often used the EN pin for AT mode but putting it to ground, not to the most!
    – Pascal
    Commented Apr 1 at 15:26

1 Answer 1

1

Ok, MAYBE I solved it^^ so the thing is, i noticed that my LED is still blinking intense instead of 2 sec light off and on. which means that i am still not in AT Mode.

but the thing is if i followed Instructables and other website tutorial. I SHOULD be able to be in AT Mode. im not exactly sure why im still not in AT Mode. So tried something:

the wiring/circuit is still THE SAME. but add something: I took another wire, connect the EN Pin of HC-05 -> 5V of Arduino. since days ago i was trying to do tinker my HC-05 here and there and i remember that i tried to put EN in 5V then it start blinking differently. so i tried the same thing today. then i went back and Forget Paired Device, connect my Arduino to my Laptop, then reupload my code, then go to Serial.Monitor 9600 set No Ending Line -> Both NL & CR. then i reenter the AT Commands.

AT+NAME? then AT,then AT+PSWD? all worked. the AT+Name shows the name of my HC-05, and the AT+PSWD shows the password. so then i decided to finally rename my HC-05. AT+NAME=USER_FAIZ and AT+PSWD=ARDUINO individually in the Serial Monitor...and now my HC-05 has different name which is USER_FAIZ and password which is ARDUINO. i then went to my Phone, scan for bluetooth device and there it is. USER_FAIZ and password is ARDUINO.

^^what im not really sure if it is the solution im searching for. i searched some tutorials again but none of them mention of using EN Pin and most of them use STATE Pin of HC-05.So because of that, i wont "Check" this Answer as maybe this is not the best solution out. maybe just not yet. but it did solve MY problem so it may solve other users problem too so ill add it here to inform.

2
  • 2
    please do not post pictures of text ... some people cannot view images ... copy the content of the serial monitor and paste it into your answer ... there is a button in serial monitor for the copy function ... format text as code
    – jsotola
    Commented Feb 1, 2023 at 17:58
  • i have deleted the photo instead. just a screenshot/visualize example of my solution and i closed my IDE few hrs ago so i cant copy it back now. i have written the result anyway and the point that it shows a proper response such as Bluetooth Module's name and password is written anyway so wont really affect if i keep i there or not. anyway, the point is there and it is now working as intended. will follow what you just said nextime if i will make a post here thumbs up
    – FaizTact
    Commented Feb 1, 2023 at 18:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.