Bluetooth master slave connection

Simple Bluetooth serial communications for your Arduino. Pair with your Mac, Linux, or Windows computer to send and receive messages using regular Serial.print() commands. [Product page]
Posts: 1
Joined: Sat Feb 06, 2016 6:59 am

Bluetooth master slave connection

Postby Icarus » Sat Feb 06, 2016 7:19 am

Hello there.
I have purchased two bluetooth shields from Freetronics as of last week and having some troubles. I am creating a project with two Eleven boards and two bluetooth shields. I am wanting the activation of a sensor on one board to trigger an alarm on another via a bluetooth link. Although I can set up the hardware my coding ability is limited and I do not know how to set up the bluetooth shields as a master and slave respectively, has anyone on here done this before and can give me some pointers, in particular how to dedicate one as a master and one as a slave?
Thank you in advance

Freetronics Staff
Freetronics Staff
Posts: 978
Joined: Sun Jul 14, 2013 7:06 am
Location: Melbourne, Australia

Re: Bluetooth master slave connection

Postby andrew » Sun Feb 07, 2016 11:14 pm

You need to use AT commands to set one module into master mode, and the other into slave mode.
Have at look at step 4 onwards of ... /?ALLSTEPS

noting you have a HC05 module.
You will need to change the digital pins used in the sketch to D7 or lower, see: ... tart-guide

Posts: 1
Joined: Tue May 17, 2016 4:12 am

Re: Bluetooth master slave connection

Postby vijays » Tue May 17, 2016 4:23 am

Hi there

I am trying to pair two HC-05 at 38500 baud rate. I configure them as master and slave and when used in normal mode they pair properly and i can transmit and receive data.

I use AT mode on master side to retrieve slave address using AT+INQ, i do get my address in the format 2015:4:90245 which is correct.

However when i try to retrieve name of the slave device using AT+RNAME ?2015,4,90245 nothings happens. The LED on the master board goes to slow blink .

same happens when i try AT+LINK=?2015,4,90245. Eventually i have to give up and send AT command again and redo AT+INIT and try again. The Password on both unit is 1234 and they are set to Original values by using AT+ORGL

any suggestions


Freetronics Staff
Freetronics Staff
Posts: 853
Joined: Tue Apr 09, 2013 11:19 pm
Location: Melbourne, Australia

Re: Bluetooth master slave connection

Postby angusgr » Wed May 18, 2016 7:20 am

Hi vijay,

Please only send queries via the forum or email, we read both. :)

I've replied to you via email, but I'm going to copy part of the response here for anyone who is interested:

Try swapping the position of the '?' and the ' ' ie:

AT+RNAME? 2015,4,90245

(If this doesn't work, try also omitting the space.)

> same happens when i try AT+LINK=?2015,4,90245

You don't need the ? for this command. Try the following:


Return to “BTSH: Bluetooth Shield”

Who is online

Users browsing this forum: No registered users and 1 guest