Skip to content

Adventures in Bluetooth

2009 February 25

For our NetObjx Espionage class project, I am initiating a chain of data transfer with a collaborative “blow” interface that transmits over Bluetooth.So far my Bluetooth partner and I have managed to get our BlueSMiRF modules to pair (albeit over a short distance since we’re not using external antennae) and we even managed to get terminal-to-terminal bidirectional communication working!  Video here:

We’ve got our BlueSMiRFs connected to the TX and RX pins of some simple USB-to-Serial FTDI chips.  In order to get the modules to pair, I had to configure my BlueSMiRF module to use “Autoconnect Master” mode and set the destination address, which in this case was Adam’s module, which stays in its default mode of “slave.”  To configure a module, you can connect directly to it over Bluetooth with your computer.  Your OS should have some kind of Bluetooth utility that will detect nearby devices and allow you to connect to them.  Once you find yours (I’m not sure what the default names of these BlueSMiRFs are, mine was BlueRadios), try to pair with it.  It will ask for a password, which by default is, amazingly, “default.”  If it works, the utility will give you a serial port that allows you to talk directly to the Bluetooth module.

Now you need a terminal with which to talk and listen to the serial port (this is both similar and different to the “Terminal” program you have in OS X). I used ZTerm for this; with ZTerm you have to hold <shift> as it starts to select which serial port to talk to.  You can also use the “screen” shell program on *nix systems.  First list your serial connections and pick out the one that sounds right, i.e.:

ls /dev/tty.*
screen /dev/tty.BlueRadios-COM0-1

Once you’re talking to your module, you can try typing “AT<cr>” to test your connection, if it responds with “OK” you’re in command mode.  In my experience all commands are followed by a carriage return, so from now on I’ll leave that out.  You may have to type “+++” to get into command mode first.  The command references I looked at claimed the command mode string is “$$$” but none of the modules we used responded to this, weird.  Anyway, to get your module’s address, enter:


It should hit you back with an address like this: 00A0961B284D.  If you want to set your module to Autoconnect Master mode, first you set the startup address and then set your startup mode:

ATSMA,&lt;destination address&gt;,1101

The “1101” specifies serial communication.  You can change your startup mode back to the default with:


Once you’ve entered these commands, restart your circuit, and the module will begin trying to connect to the destination address you specified.  During this time your BlueSMiRF should be blinking green.  If you are monitoring it over serial you will see “CONNECT,<addr>”.  Once both modules pair, they will turn to solid red.  Without antennae, the RP-SMA modules will need to be within 2 feet or so of each other.  The silver and gold modules use better on-chip antennae so they’ll have much better range.

Now if both modules are being monitored with a terminal, you should be able to talk to each other!

I’ll follow up with video of my blow interface and hopefully soon we’ll get serial bluetooth data transfer working!

Related Posts:

No comments yet

Leave a Reply

Note: You can use basic XHTML in your comments. Your email address will never be published.

Subscribe to this comment feed via RSS