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 ?
Do you know if hc05 fw have more serialpins connected/programmed as tx and rx ?
ReplyDeletethere's only one UART port connection... it's due to the CSR chip not the firmware version.
ReplyDeleteWhy do you want more serial pins ?
well i mean DSR, DCD and DTR serialport signals,
ReplyDeleteWhere can I find the HC05 FW to download?
ReplyDeleteAy the end of the following post :
ReplyDeletehttp://byron76.blogspot.com/2011/09/i-hope-you-have-good-time-soldering.html
in the "Flashing a new firmware" post
ReplyDeleteSorry for the last answer, but the has been extract on board from suntek, website. See my second post
ReplyDeleteByron would like a help!
ReplyDeleteI 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!
If you want to enable AT mode, your module must not be paired with another Bluetooth device.
DeleteHi Byron,
ReplyDeleteThank 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
hai..... i am using this module for my BE final year project...
Deletei 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
Nop !
ReplyDeleteSince 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 !
hai..... i am using this module for my BE final year project...
Deletei 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
Hi Byron,
ReplyDeleteThank 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
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.
ReplyDeleteHi!
ReplyDeleteThis 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!
the link seems to work for me !!
ReplyDeletecould you try this one and upload it somewhere for me ? http://dl.free.fr/dfcnuH9Wn
links do not work:(
DeleteThis comment has been removed by the author.
ReplyDeleteHi Byron, thanks for your blog, I was able to flash HC05/linvor firmware to the module.
ReplyDeleteSPI 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?
Short links for images - Blogspot does not allow to include it in comments
Deletehttp://goo.gl/eOOXp
http://goo.gl/o57uy
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)
ReplyDeleteI 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?
it seems to be a typo, I've noticed it too
Deletehi Byron
ReplyDeletei 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
Hello,
ReplyDeletekinda 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
This comment has been removed by the author.
DeleteHi Byron,
ReplyDeleteHow 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.
Use AT+VERSION the response OKlinvor1.5 means it's HC-06
DeleteThe other difference is that the HC-06 dosen't need \r\n in the end of AT commands.
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...
ReplyDeleteTry to reset to factory settings perhaps or check this http://goo.gl/5tZr1 may help
DeleteHi, Byron,
ReplyDeleteI 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.
For that you have to change the firmware
DeleteThis tiny thing has a USB Interface... but still as stated, need a custom firmware (BlueLab / XIDE)
DeleteHi Hillel,
DeleteI 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.
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
ReplyDeletehi 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
ReplyDeletehi, can i can make module bluetooth for standart printer with HC-05?
ReplyDeleteI want to send the RSSI value continuously from the HC-05 to the connected phone over the SPP. Can anyone help???
ReplyDeleteHi, 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?
ReplyDeletei want to set up 3 HC-05 module as picconet connection..please guide me hwo to do it?
ReplyDeletethank u very much it really helped
ReplyDeleteHi Byron,
ReplyDeleteThanks for the extremely informative pages. My question, though not related to the module's firmware, is somewhat related.
Is there any way to increase the range of these modules? For example, would soldering a piece of wire as an antenna onto the trace antenna on the pcb help?
I've tried to find an answer to this all over the net, with no success. I'm hoping either you, or someone reading this would have some information to share in this regard.
I also need answer....Is there any way to increase the range of these modules?
DeleteHello Everyone,
ReplyDeleteCan someone tell me, if i can control a led without using any external microcontroller and only with hc 05, as this also has CC2540.
how to set the pin 34 low or high?
ReplyDeleteI have purchased some inexpensive hc-06 modules from Aliexpress. They are advertised as hc-06, and the PC detects it as the name hc-06. I can pair and connect to the module over bluetooth (using the default 1234 pin). I can the send data in both directions, at 38400 baud. While it is connected, the red led goes off for 2 seconds, then does 2 quick flashes, then off for 2 seconds, and this repeats.
ReplyDeleteWhen not connected over bluetooth, the red flashes rapidly. My problem is that I cannot get any of the AT commands to respond. I type AT and I never get the OK response. I have tried different baud rates. I'm not sure what else to try. Has anyone gotten a module with firmware like this, that blinks the red led while in bluetooth connection? I need to figure out how to configure these modules.
This comment has been removed by the author.
ReplyDeletehi, do u have any adapter/base/station/breakout board schematic / pcb diagram for hc05. because I bought one of hc05 that dose not have any one of that board, whatever they call it.
ReplyDeleteWHEN I AM ENTERING AT COMMAND AT+INQ AND GETTING ERROR 1F
ReplyDeleteSO WAT I M DOING WRONG
ReplyDelete