2
\$\begingroup\$

I've got a problem with my HC-05 BT module. I'm talking to it from my PC via USB/UART converter. When it's in slave mode I can link it with another device, send data using module's and converter's virtual COM ports. But some AT commands seems to be not working. For example, I can't check the module's name. Inquiring also does not work. Here is a sample "chat" I'm having with HC-05:

AT
OK
AT+VERSION
+VERSION:2.0-20100601
OK
AT+UART
+UART:38400,0,0
OK
AT+UART=115200,0,0
OK
AT+UART
+UART:115200,0,0
OK
AT+NAME //No respond to this command
AT+NAME=HC-05
OK
AT+CLASS //No respond
AT+ROLE
+ROLE:0
OK
AT+ROLE=1
OK
AT+INQM
+INQM:1,1,48
OK
AT+STATE
+STATE:PAIRABLE
OK
AT+INQ //My phone has BT and visibility on, so I can test this It didn's find any devices, no "OK" message is shown neither
AT+INQC //About 5 minutes later, I want to cancel inquiring, no respond to this command too
AT+STATE
+STATE:INQUIRING
OK

When I turn the power off and on, it's still inquiring, the only way to stop it is to change it back to slave. Am I doing something in the wrong way? Or my module is simply broken? I'll just mention that it's new, I've unpacked it like 2 days ago. Anyway, thanks in advance

\$\endgroup\$
3
  • 1
    \$\begingroup\$ I have the exact same problem (AT+INQ not responding) with my HC-05 modules (I have bought three to test this). Have you found any answer? I have an SO question open on it: stackoverflow.com/questions/23221336/… \$\endgroup\$
    – Houen
    Commented May 1, 2014 at 7:39
  • \$\begingroup\$ If you have not found the answer yet, and still want to work on it, I would be happy to pool our efforts on both fronts. I suspect that the two things are related... \$\endgroup\$
    – Houen
    Commented May 1, 2014 at 7:40
  • \$\begingroup\$ Have you setted PIN34 (KEY) properly like on page 4 of this document. I am also trying to figure out AT communication puzzle and might be I am having a non-working HC-05, coz mine does not responds to any AT communication at all. \$\endgroup\$
    – Asad
    Commented Jul 3, 2014 at 11:57

6 Answers 6

6
\$\begingroup\$

The answer is in the HC-05 documentation: you have to make sure the Key34 is connected to Vcc when sending some AT Commands. simply hold your button down while pressing ENTER in your terminal. http://www.instructables.com/files/orig/FKY/Z0UT/HX7OYY7I/FKYZ0UTHX7OYY7I.pdf

\$\endgroup\$
1
\$\begingroup\$

Not a complete answer, but the closest I have found to a "reason" comes from the discussion these guys here are having: http://www.homeautomationhub.com/content/bluetooth-presence-hc05-and-jeenode#comment-form And they eventually found out that their code was failing due to faulty components, unfortunately:

Well blow me down with a feather!!

Garry kindly sent me his module which was proven to work with his and bretts code above

and it worked first time!!!

incredibly frustrating that my two modules both dont respond but hey ho! atleast i now know it wasnt a ID10T error :)

\$\endgroup\$
1
\$\begingroup\$

To add something to the correct answers by urbanist and it9dpx,

Some AT commands work fully if you have entered into the AT mode by connecting the Key34 to VCC after powering the HC-05 even if you later have disconnected the Key34 from VCC.

Some other AT commands work only partially or not at all if that connection does not exist when giving the command. E.g. the AT+NAME does not reply anything in the TX pin nor does the AT+NAME=MyBTName while it still does in fact change the name as commanded.

\$\endgroup\$
0
\$\begingroup\$

There seem to be many variations of the HC-05 bluetooth module which runs different software. Some variants do not respond to all the AT commands, it seems. One way to "standardize" your modules is to build a programmer and flash your module with the firmware posted here.

\$\endgroup\$
0
\$\begingroup\$

For the needs of project I replaced the small button located on my hc-05 with a switch, and I noticed that the problem referred to in the previous post disappears; in other words, closing the switch in place of the small button, the command AT+NAME? now it accepted and properly respond. greetings by it9dpx.

\$\endgroup\$
0
\$\begingroup\$

The possible reasons why you do not get response on some AT commands:

  1. Baudrate disagreement
  2. Not all the AT command based modules have implemented all the commands in their firmware
\$\endgroup\$

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