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
http://www.instructables.com/id/AT-comm ... /?ALLSTEPS
noting you have a HC05 module.
You will need to change the digital pins used in the sketch to D7 or lower, see:
http://www.freetronics.com.au/pages/blu ... tart-guide
Bluetooth master slave connection
Re: Bluetooth master slave connection
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
Thanks
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
Thanks
-
- Freetronics Staff
- Posts: 853
- Joined: Tue Apr 09, 2013 11:19 pm
- Location: Melbourne, Australia
- Contact:
Re: Bluetooth master slave connection
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:
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:
AT+LINK=2015,4,90245