Transparent link using two HC-05’s

Configure one as the slave, by following the instructions on our other page over here.

Configure the other as master, using these config commands:

Return the HC05 to its default manufacture settings (hold button when sending): AT+ORGL\r\n

Set role to Master: AT+ROLE=1\r\n

Change comms settings: AT+UART=115200,0,0\r\n

Changes the baud rate to 115200 baud, 1stop bit, no parity (or whatever setting you want).

Cycle the power.

Hey presto, the modules will connect when both are powered and pass data as a seamless bridge in both directions.

Pairing

By default the master HC-05 will connect to any device in its transmission range, but of course that isn’t what you want to have happen in real use. Instead do this to configure the master to pair with only the specific HC-05 slave you are using:

Slave HC-05

Read the Bluetooth address: AT+ADDR?\r\n

You will get back an address like this:

+ADDR:98D3:51:F63A39\r\n
OK\r\n

Master HC-05

Change the HC-05 to fixed address mode: AT+CMODE=0\r\n
So it won’t auto-connect to any other device in range

Set the address of the slave to pair with: AT+BIND=98D3,51,F63A39\r\n
Note that you need to use commas instead of colons here.

Connected

Connecting seems to take approx 4 seconds from when the master is powered up, it’s not instant.

When using a pair of HC-05’s, the connection remains made even when no data is passing (the STATE pin changes to connected at the slave a few seconds after the master is power on and doesn’t release until a few seconds after the master HC-05 is powered down.

USEFUL?
We benefit hugely from resources on the web so we decided we should try and give back some of our knowledge and resources to the community by opening up many of our company’s internal notes and libraries through mini sites like this. We hope you find the site helpful.
Please feel free to comment if you can add help to this page or point out issues and solutions you have found, but please note that we do not provide support on this site. If you need help with a problem please use one of the many online forums.

Comments

Your email address will not be published. Required fields are marked *