Tuesday, September 27, 2011

HC05 Firmware


Hello,

Let's take a look to the HC05 firmware.
This one offers a wider range of AT command set.
With these AT commands you can set the module to master or slave devices.
I will not describe all the AT command since you can refer to online documentation.

Before going on, you had to know that entering in the AT mode is a bit more difficult with HC05 firmware.

This firmware provides 2 ways to activate AT mode :
The first way is described as below :
    • set low level on PIN34
    • Supply power to the module
    • set high level on PIN34
Then the module will enter on AT mode without your configured baud rate (default : 9600 8N1)

The second way :
    • set high level on PIN34,
    • Supply power to the module
The module will ALWAYS enter in AT mode with a 38400 baud rate (8N1).

The second way is kind useful if you don't remember your configured baud rate.

As you probably notice, AT mode can be reached only when PIN34 is high.

Moreover sending AT commands is different from the HC06 firmware (Linvor). In HC05 firmware you have to send CR and LF after each command.

For your information, here comes some useful AT commands :
    • AT\r\n AT test command should respond OK\r\n
    • AT+ROLE=1\r\n Set master mode
    • AT+ROLE=0\r\n Set slave mode
    • AT+VERSION?\r\n Get the firmware version
    • AT+UART=115200,1,2\r\n Set the baud rate to 115200 (8E2)
    • AT+PIO=10,1\r\n Set PIO10 to high level

Further information can be found in this documentation.

That's it for now...

The next article will answer this question : Can I upload a HC05 onto a linvor module ?



42 comments:

  1. Do you know if hc05 fw have more serialpins connected/programmed as tx and rx ?

    ReplyDelete
  2. there's only one UART port connection... it's due to the CSR chip not the firmware version.

    Why do you want more serial pins ?

    ReplyDelete
  3. well i mean DSR, DCD and DTR serialport signals,

    ReplyDelete
  4. Where can I find the HC05 FW to download?

    ReplyDelete
  5. Ay the end of the following post :
    http://byron76.blogspot.com/2011/09/i-hope-you-have-good-time-soldering.html

    ReplyDelete
  6. Could you say, where did you get HC05 version? :-)

    ReplyDelete
  7. in the "Flashing a new firmware" post

    ReplyDelete
  8. Sorry for the last answer, but the has been extract on board from suntek, website. See my second post

    ReplyDelete
  9. Byron would like a help!

    I upgraded the firmware hc05, I think we've succeeded! But now I'm able to send any AT command! When I turn on the module, the LED blinks, detect the bluetooth module for the PC! I'm sending the command AT \ r \ n, it returns nothing!
    I noticed something when I turn on the module with the pin 34 high LED flashes more slowly! Can you help me?
    Thank you!

    ReplyDelete
    Replies
    1. If you want to enable AT mode, your module must not be paired with another Bluetooth device.

      Delete
  10. Hi Byron,

    Thank you for your great work with this Bluetooth module.

    I have a (maybe silly) question:

    - Is it possible to pair with PC via Bluetooth and use AT commands to control GPIO (PIO pins) remotely?

    I'm asking it because I don't want to use it just like a BT/Serial interface, if I have remote GPIO access I can control external things directly from an Android phone without using a microcontroller in the other end to control devices.

    In fact the CSR chip is already an uC, then I can use its GPIO to control anything, but I don't know if the firmware allow me to do it remotely. I think these AT commands to control PIO pins needs to be executed locally (over serial), but maybe I can control it over BT connection as well.

    Could you please confirm or not if it is feasible?

    Best Regards,

    Alan

    ReplyDelete
    Replies
    1. hai..... i am using this module for my BE final year project...

      i need to use GPIO pins or CTS,RTS pin with matlab....how can i read or put a bit(high/low) through this pins......Tx, Rx fine no problem.

      why i am asking this because,when GPIO pin is set high/low, i need to start data acquisition from my ADC.Please need idea.

      Thanks & Regards

      Ikram khan
      ikramkhan11692@gmail.com

      Delete
  11. Nop !

    Since AT mode could not be enable when your module is paired it is not possible !

    But... you can make your own firmware if you have some basic C/C++ skills ... This is the subject of the next post... don't expect it soon !

    ReplyDelete
    Replies
    1. hai..... i am using this module for my BE final year project...

      i need to use GPIO pins or CTS,RTS pin with matlab....how can i read or put a bit(high/low) through this pins......Tx, Rx fine no problem.

      why i am asking this because,when GPIO pin is set high/low, i need to start data acquisition from my ADC.
      please Tell me how to activate this pin to read with matlab?
      Thanks & Regards

      Ikram khan
      ikramkhan11692@gmail.com

      Delete
  12. Hi Byron,

    Thank you very much.

    I'm also an embedded system developer with Linux (uClinux) background and a little bit of RTOS (mainly NuttX). I just received my Bluetooth module (from dealextreme) yesterday night.
    I read the manual but didn't see nothing about remote AT commands.

    Did you already compile some code and put it in our flash device?

    Best Regards,

    Alan

    ReplyDelete
  13. Do you really need to fiddle with pin 34 to change the Radio name? I've got one from DX with male headerpins with heatshrink around it.

    ReplyDelete
  14. Hi!

    This link is no longer working:
    http://dl.free.fr/d8j4i42Wi
    Can you upload the HC05 firmware somewhere else? or send it via email ... you can send to: spam at croler net
    Thanks!

    ReplyDelete
  15. the link seems to work for me !!
    could you try this one and upload it somewhere for me ? http://dl.free.fr/dfcnuH9Wn

    ReplyDelete
  16. This comment has been removed by the author.

    ReplyDelete
  17. Hi Byron, thanks for your blog, I was able to flash HC05/linvor firmware to the module.

    SPI link over LPT works all right. Settings for UART is 38.4/1806 (default) [im]https://lh6.googleusercontent.com/-qwGVHOkG5uI/T2tU1PW-TYI/AAAAAAAADdI/gLrtQ43o_TY/s800/terminal.jpg[/im]

    Module pulls TX down for 500ms from time to time not accepting AT+ROLE=1 etc. TX does not react on RX whatsoever.

    I've using RS232 communication accordingly to datasheet.
    That's the signal on RX pin [im]https://lh3.googleusercontent.com/-xf2HtrwsUSw/T2tVGt1l-VI/AAAAAAAADdY/nG5wkqxCKdk/s800/RX-Bluetooth.jpg[/im]

    RX pin gets valid UART 3.3v incoming signal from MAX3232 chip.


    What can be wrong, why it does not answer UART connection?

    ReplyDelete
    Replies
    1. Short links for images - Blogspot does not allow to include it in comments
      http://goo.gl/eOOXp
      http://goo.gl/o57uy

      Delete
  18. Hi Byron, great work. Just a question. You say: "Then the module will enter on AT mode without your configured baud rate" (regarding the first way to get into AT mode)
    I understand from the datasheet however that if you choose that option you actually get in on AT mode WITH the configured baudrate.
    Am I wrong or is it just a type?

    ReplyDelete
    Replies
    1. it seems to be a typo, I've noticed it too

      Delete
  19. hi Byron
    i have a module blue tooth, when i power it, it automatic into work mode, pin32 high level before paired, after paired, it get low level. i can't force it into AT command mode although i did 2 way u decribed. i don't receive "OK" when i send AT\r\n command
    Thanks

    ReplyDelete
  20. Hello,
    kinda new to this, not sure what you mean by "set low level and high level" ? Is that GND and the 3.3V cables ?
    So i touch pin34 with ground cable, keep it there, bring power to the chip, then touch pin34 with a 3.3 V ?
    Won't that make an electric short circuit?
    thanks

    ReplyDelete
    Replies
    1. This comment has been removed by the author.

      Delete
  21. Hi Byron,

    How can I know if the module is HC-06 or HC-05? Because I couldn´t enter in the Master Mode ever.

    I am affraid my module is not HC-05.

    Thank you!

    Alexandre.

    ReplyDelete
    Replies
    1. Use AT+VERSION the response OKlinvor1.5 means it's HC-06
      The other difference is that the HC-06 dosen't need \r\n in the end of AT commands.

      Delete
  22. 1) at some point in the communication process the HC-05 is "INQUIRING". I thought I could stop this mode with the command "AT+INQC" but when I check the state, I am still inquiring. 2) the only way I can leave that mode is to "pair" the HC-05 with my PC. I am able to "pair" the HC-05 with my PC (running window 8)I check the state and it confirms they are paired. I belive I need to connect next. So I issue the command "AT+LINK=". I get FAIL. I can't get past this point. Can you help? provide some step by instructions (along with when I should or should not key the HC-05) to help me get connected? Is there a potential problem Windows 8? Thoughts on why I continue to receive the "FAIL" message? Thanks...

    ReplyDelete
    Replies
    1. Try to reset to factory settings perhaps or check this http://goo.gl/5tZr1 may help

      Delete
  23. Hi, Byron,

    I looks as if you are not following this blog very closely, but just in case you come back or another reader has info:

    Is there any way to send commands or serial data to and from the module using the SPI port rather than the UART? The reason is that in some applications it is not possible to match higher async baud rate, eg: for ATMega chip at 16 MHz the highest standard UART rate which works may be 115,200 bps, tho the module is capable of much more. So if I could send/receive serial data via the SPI port, it would be very helpful.

    ReplyDelete
    Replies
    1. For that you have to change the firmware

      Delete
    2. This tiny thing has a USB Interface... but still as stated, need a custom firmware (BlueLab / XIDE)

      Delete
    3. Hi Hillel,

      I think you aware of https://github.com/pfalcon/blutunode since I can see your comments at author blog: http://pfalcon-oe.blogspot.com.br/2012/04/opensource-sensor-node-firmware-for.html

      This is an open-source firmware for BlueCore4-Ext chip.

      I think original author has not more interest/time to keep working on this REALLY NICE project.

      Delete
  24. Developing a wireless Audio or Data accessory can become a tedious, expensive and risky project. By offering a fully integrated solution with certifiedBluetooth Module the associated development kits and Smart Phone Apps

    ReplyDelete
  25. hi guys i have HC-05 bluetooth. i wanted to control device. i check HC-05 that connect to PC by USB serial converter. i can send AT in command mode and return ok and i did the set. it is okey. BUT i can't return to DATA mode. i did disable key pin and reset power. did things i could . spent many time over that. pls help me

    ReplyDelete
  26. hi, can i can make module bluetooth for standart printer with HC-05?

    ReplyDelete
  27. I want to send the RSSI value continuously from the HC-05 to the connected phone over the SPP. Can anyone help???

    ReplyDelete
  28. Hi, Does anyone know how to get the 'connected' LED to go on? I don't need to communicate at all - all I want to do is to detect that someone has connected to the HC-03, and turn a light on. I can do that with the 'connected' light, but it never goes on. I've got it upgraded, and can see the 'paired' LED go on when I pair with it. My android also never goes into 'connected' mode either. Do I need to put a ucontroller on the serial line? And/or what does it need to do?

    ReplyDelete
  29. i want to set up 3 HC-05 module as picconet connection..please guide me hwo to do it?

    ReplyDelete
  30. thank u very much it really helped

    ReplyDelete