The board has the pinout printed on it. Connect 3.3V to the VCC pin and GND to the GND pin. The red LED should turn on. Hooray!
At this point, you won’t be able to see the module over Bluetooth. It starts up with the Bluetooth interface disabled. You need to send it some commands to get it started.
I connected my module to my PC with a SparkFun RS232 Shifter board. You can then use a HyperTerminal (Windows) or minicom (Linux) to type commands directly to the module. Link the RTS/CTS pins on the module together while you’re at it. I connected all of this up with little IC test clips.
The terminal settings are 9600bps, 8N1, no flow control. Type ‘+++’ quickly to get to command mode on the module.
As a quick sanity check, type
The module should reply with:
1SPP - Ver: 1.2.5 OK
and you should be able to pair with the module and send serial data through it.
Read on for more advanced usage.
The wonderful thing about standards is that there are so many to choose from.
In an interesting tip of the hat to history, the module uses AT commands for control, just like a serial modem. After you send an AT command to a modem, it will always end its reply with OK or ERROR. You can send an empty command (‘AT’) to confirm that the modem is responding as expected.
Every Bluetooth serial modem has a different command set. The BlueSMiRF Silver V2 uses the one for the Philips/NXP BGP203. NXP appears to dislike money and won’t give you programming info for their chips, even if you beg for it. To save us the hassle, SparkFun has dug up the programming info.
You can also get the BGB203 ‘datasheet’ from NXP, but it’s useless. Even after a few hours on the phone and offers to buy a lot of silicon, they wouldn’t give me anything better.
You want to read the User Guide backwards. It has:
The interesting commands are:
Get information on the firmware in the Bluetooth module:
ATI 1SPP - Ver: 1.2.5 OK
Get the Bluetooth display name:
AT+BTLNM +BTLNM: "SparkFun-BT" OK
Get the Bluetooth MAC address:
AT+BTBDA +BTBDA: 031F08071729 OK
Get the UART parameters:
AT+BTURT +BTURT: 9600, 8, 0, 1, 0 OK
Start the Bluetooth server on channel 1:
Ultimately, you’re probably going to want to write a program to set all of this up automatically. The script that I use goes something like:
+++ AT&F AT+BTLNM="somename" AT+BTAUT=1, 0 AT+BTURT=115200, 8, 0, 1, 0 AT+BTSEC=0 AT+BTFLS AT+BTSRV=1
with appropriate checks to make sure commands are actually executing properly.
Any Bluetooth activity (querying, scanning, etc) seems to block the AT command interface.
If you’re typing commands by hand, don’t hit backspace. The command will be rejected. I recommend typing commands into a text editor and copy/pasting them into the terminal window so that you don’t make mistakes.
The module doesn’t appear to be case-sensitive to the AT commands, so you can type in lowercase and probably eliminate some errors that way.