HC-05 Master / Slave Bluetooth Module (HCMODU0061)

Wireless and wired modules including Bluetooth, Ethernet, and IR kits.
admin
Site Admin
Posts: 748
Joined: Sun Aug 05, 2012 4:02 pm

HC-05 Master / Slave Bluetooth Module (HCMODU0061)

Post by admin » Wed Apr 02, 2014 10:50 am

Image

Order yours here

Description:

This class 2 Bluetooth module comes programmed with firmware that allows it to pass the output of a serial communications port (default is 9600 baud) over a Bluetooth wireless connection with no software configuration. The module is mounted on a convenient mezzanine adapter board providing an interface for power and Tx/Rx serial communication. Additionally the module, by use of AT type text commands issued via the serial interface can be reconfigured from its default Bluetooth slave state to a Master state. This means that module can not only communicate with Bluetooth master devices such as PC's and smart phones, but also when in master mode it can automatically pair with a second module in its default slave configuration allowing an end to end serial communication over Bluetooth. Please note that whilst in master mode the module can only communicate with another module in slave mode or one of our HC-06 Bluetooth slave modules (HCARDU0004).

Specification:

● Bluetooth protocol: Bluetooth Specification v2.0+EDR
● Frequency: 2.4GHz ISM band
● Modulation: GFSK(Gaussian Frequency Shift Keying)
● Emission power: ≤4dBm, Class 2
● Sensitivity: ≤-84dBm at 0.1% BER
● Speed: Asynchronous: 2.1Mbps(Max) / 160 kbps, Synchronous: 1Mbps/1Mbps
● Size: 28mm x 15 mm x 2.35mm
● Security: Authentication and encryption
● Profiles: Bluetooth serial port
● Power supply: +5V DC (5.5V max)
● Working temperature: -20 ~ +75 Centigrade


How to put the module into command mode:

By default when the module is first powered up, it will be in a slave communication mode. This will allow the module to communicate with most Bluetooth master devices supporting the Serial Port Protocol. Whilst in this mode any data sent to its serial interface, including AT commands, will be passed though to the end device. To allow the module to receive AT configuration commands the module must be placed in command mode. To do this please follow these steps:

1) Disconnect power from the VCC pin or pull the EN pin low.

2) Press and hold the push button on the mezzanine board.

3) Reconnect power to the VCC pin or pull the EN pin high.

4) Release the push button.

The on board LED will the change to a slower flash period. The module is now in command mode and AT commands listed below can now be issued to the module. Whilst in command mode the default communication speed is 38400 Baud. When issuing any AT command it must be followed by both a cartridge return [CR] and line feed [LF] escape code.


How to put the module back into communication mode:

Whilst the module is in command mode there are three ways to switch it back to communication mode:

1) Cycle the modules power

2) Pull the EN pin low and then release it

3) Issue the at command AT+RESET via the serial interface.


How to switch the module to Master mode:

To switch the module to master mode, whilst in command mode (see above), issue the following command via the serial interface:

AT+ROLE=1

Remember to also include a carriage return and line feed escape code. To switch the module back to slave mode issue the following command:

AT+ROLE=0


LED states:

Slow flash: Command mode

Quick flash: Communication mode (disconnected)

Double flash: Communication mode (connected)


Pinout:

STATE.....Device current state
RXD........UART Receive Input
TXD .......UART Transmit Output
GND.......0V
VCC.......+5V
EN.........Enable (Pull low to disable module)



Command List:

AT
AT+RESET
AT+VERSION?
AT+ORGL
AT+ADDR?
AT+NAME=<Param>
AT+ROLE=<Param>
AT+IAC=<Param>
AT+ IAC?
AT+INQM=<Param>,<Param2>,<Param3>
AT+ INQM?
AT+PSWD=<Param>
AT+ PSWD?
AT+UART=<Param>,<Param2>,<Param3>
AT+ UART?
AT+CMODE=<Param>
AT+ CMODE?
AT+BIND=<Param>
AT+BIND?
AT+POLAR=<Param1>, <Param1>
AT+POLAR?
AT+IPSCAN=<Param1>,<Param2>,<Param3>,<Param4>
AT+IPSCAN?
AT+SNIFF=<Param1>,<Param2>,<Param3>,<Param4>
AT+SNIFF?
AT+SENM=<Param1>,<Param2>
AT+ SENM?
AT+PMSAD=<Param>
AT+RMAAD
AT+FSAD=<Param>
AT+ADCN?
AT+MRAD?
AT+STATE?
AT+INIT

AT command instruction manual:

Please note that there may be some translation errors in this manual and that some instructions may incompatible with this version of module.
HC-0305_serial_module_AT_command_set.pdf
You do not have the required permissions to view the files attached to this post.

gromgsxr
Posts: 2
Joined: Wed May 07, 2014 7:52 pm

Re: HC-05 Master / Slave Bluetooth Module (HCMODU0061)

Post by gromgsxr » Wed May 07, 2014 8:09 pm

iv put the device in to command mode but don't seem to get a response from it, i have tried different baud rates i get a jumbled response to the AT+VERSION? command if i set it to 128000 but i don't seem to get any reply to just 'AT' on any baud i have tried.

andrew
Site Admin
Posts: 913
Joined: Sun Aug 05, 2012 4:15 pm

Re: HC-05 Master / Slave Bluetooth Module (HCMODU0061)

Post by andrew » Wed May 07, 2014 8:35 pm

Whilst in command mode the communication speed needs to be 38400 baud. The fact that you get a garbled response at other baud rates is a good sign as it's probably just an error response from the module which means it is at least listening. Are you sure you are correctly appending a carriage return and line feed after the command?
Comments made by this poster do not necessarily reflect the views of Hobby Components Ltd.

gromgsxr
Posts: 2
Joined: Wed May 07, 2014 7:52 pm

Re: HC-05 Master / Slave Bluetooth Module (HCMODU0061)

Post by gromgsxr » Wed May 07, 2014 9:41 pm

you are indeed correct 38400 baud, it turned out it didn't get on with the terminal program i was using ended up using the serial monitor in the arduino ide and got it working, have also been able to get it to pair up with my lm048 bluetooth adaptor already so hopefully should have a bluetooth serial link between my arduino mega and my cars ecu in no time. thanks

follytowers
Posts: 2
Joined: Thu Jul 03, 2014 8:02 am

Re: HC-05 Master / Slave Bluetooth Module (HCMODU0061)

Post by follytowers » Thu Jul 03, 2014 8:34 am

Is it possible to use this HC-05 module simply to send a series of high/low pulses? I have a little clock timer unit that uses the interruption of an infra-red sender & detector, to send a series of high & low pulses every second over a serial connection to a PC, where they are logged onto a graph. Obviously the clock timer unit can not issue commands to the module, but I am guessing that as any command is basically just a high /low pattern, and it defaults to slave mode at switch on, I should be able to send the detector data over raw.
The PC software successfully receives data from a Bluetooth GPS as a test, and it interprets the GPS commands as 'clock data' one second input pulses. It gives totally wrong results obviously, (it's looking for one second pulses, not the millisecond command pulses it is in fact receiving!) but as it is plotting (meaningless) data to the graph, it seems the software simply needs a high/low pulse coming in, and it will see that as a high low pulse of timing operation.

(I thought it best to add this onto this old thread as the module is the same)

Phil T

andrew
Site Admin
Posts: 913
Joined: Sun Aug 05, 2012 4:15 pm

Re: HC-05 Master / Slave Bluetooth Module (HCMODU0061)

Post by andrew » Mon Jul 07, 2014 12:46 pm

I'm afraid this wouldn't work, the module expects serial data at a particular baud rate. If it is not in the correct format and at the correct data rate it would just reject it as corrupted data. You'd need something like a Nano or Pro Micro to interpret the pulse and output it as serial data to the Bluetooth module. But then if you don't need the connection to your PC to be Bluetooth you could do this with just the Nano or Pro Micro on its own.
Comments made by this poster do not necessarily reflect the views of Hobby Components Ltd.

follytowers
Posts: 2
Joined: Thu Jul 03, 2014 8:02 am

Re: HC-05 Master / Slave Bluetooth Module (HCMODU0061)

Post by follytowers » Mon Jul 07, 2014 11:39 pm

Thanks Andrew. I've played with PIC micros in the past, so I will fire up my old grey memory cells, and use that approach
Phil

csict
Posts: 1
Joined: Tue Jul 22, 2014 3:36 pm

Re: HC-05 Master / Slave Bluetooth Module (HCMODU0061)

Post by csict » Tue Jul 22, 2014 10:27 pm

I need to connect my HC05 as master with an HC06 as slave on another arduino at 115200 baud rate. Would it be possible?
The HC06 is already configured. I have managed to change the name and baud rate of the HC05 but when I've tried the commands below, AT+INIT and subsequent commands give me no response, not even an error. If I switch off and put the module in command mode again, the first three commands give me "OK" but AT+INIT and what follows give me no response. AT+iINIT sets the LED on the HC-05 blinking but no response on Serial Monitor.

AT
OK
AT+CMODE=0
OK
AT+ROLE=1
OK
AT+INIT
OK
AT+INQ
+INQ:4D65:4D:CA6612,5A0204,7FFF
OK
AT+BIND=4D65,4D,CA6612
OK
AT+PAIR=4D65,4D,CA6612,30
OK

andrew
Site Admin
Posts: 913
Joined: Sun Aug 05, 2012 4:15 pm

Re: HC-05 Master / Slave Bluetooth Module (HCMODU0061)

Post by andrew » Wed Jul 23, 2014 10:58 am

Yes it is possible to pair a HC-05 master and HC-06 slave together. In fact when the HC-O5 is configured to pair with any address (AT+CMODE=1) it should do so automatically. I've had a look at the AT+INIT command but it seems that when the SPP stack is reset the module drops back into communication mode. This will be why you don't see a response and you cannot issue any further AT commands. At the moment the only way I can see from stopping it drop back into communication mode is to press and hold the push button.
Comments made by this poster do not necessarily reflect the views of Hobby Components Ltd.

ivan_pop
Posts: 1
Joined: Sun Mar 29, 2015 3:20 pm

Re: HC-05 Master / Slave Bluetooth Module (HCMODU0061)

Post by ivan_pop » Sat Apr 04, 2015 8:18 am

Hi!
I want to make a wireless connection with LPG ECU and PC.I want the connection to work with any LPG ECU.My HC-05 like this.
Image
With some models LPG ECU my laptop is connected through HC-05,some did not connected.
How do I know where is the problem?

Post Reply