2
\$\begingroup\$

Hi I have the sparkfun bluetooth mate silver. I am trying to start working on control via bluetooth for my Arduino. Only thing is I need to set the baud rate for the bluetooth mate, all guides I can find on the net show how to change it via pc. I do not have bluetooth connectivity on my PC. Is there a way to do it via the Arduino?

\$\endgroup\$
  • 2
    \$\begingroup\$ I suppose that obtaining a $2 USB Bluetooth radio is not an option? \$\endgroup\$ – AndrejaKo Jun 5 '11 at 14:04
  • \$\begingroup\$ not today. I will eventually \$\endgroup\$ – Mark W Jun 5 '11 at 17:09
4
\$\begingroup\$

To change the Baud rate on the BlueSmirf, you will need to enter Command mode. To enter Command mode, you need to send "$$$" through the serial port connection. This can be done from a PC using a terminal program or from the Arduino.

Since you want to do this from the Arduino, you will need to write a little bit of code to parse the responses from the BlueSmirf so you can automate the steps necessary to change the Baud rate.

  1. Send "$$$" - Enter Command Mode
  2. Wait for "CMD" - Acknowledge in Command Mode
  3. Send "SU,96" - Change Baud rate to 9600
  4. Wait for "AOK" - Acknowledge command
  5. Send "R,1" - Reboot device to use new setting

All the commands are documented in the RN-42 AT Command Set

| improve this answer | |
\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.