Lately we've been doing a lot of serial com port applications here at Spark Fun. More than that, we love to play with RF anything. Naturally, developing the SMiRF was pretty much play time for us. But we've also got these Bluetooth modules lying around. Hmm.... What would it take to set up a pair of Bluetooth modules as a serial link? We decided to find out.
We started out with a Bluetooth USB adapter.
To give a little background on the BR-SC11A, it normally operates by means of AT commands through a terminal program. All operational parameters are accessible via these commands. It also happens to default to 9600/8/1 for your terminal needs.
Let me start by describing some of the setup procedures with the USB module. After going through the manufacturer's setup, there will be a funny little blue icon in the lower right of the menu bar:
Right click on that, then left click on "Start Using Bluetooth". After a few generic prompts, you'll run into this one:
By default, "Bluetooth Serial Port" should come up with a check already in the box. But if there isn't one there, put one there before proceeding. Once that's done, the setup should finish within a few more prompts that you can just click through.
Once you're to that point, apply power to the BR-SC11A (3.3V only!). Power is the only connection you need right now. Then, right click on the little blue icon again and follow the menus like so:
"Quick Connect" to "Bluetooth Serial Port" to "Find Devices". After a minute or so of searching, you should see this:
If it comes up empty, hit "Refresh". Sometimes it takes a few tries to find the other module. When it does come up, double click on it to make a connection. Shortly thereafter, you'll see this:
This is where you enter the PIN of the BR-SC11A. In the datasheet, you'll find that the default value of the PIN is "default". That's handy. Put it in and hit "OK". The last prompt you'll see is:
Windows assigns a com port to your USB Bluetooth module (Com 20 in my case!). Open up Hyperterminal (or the terminal program of your choice) to the appropriate port, 9600/8/n/1, and you're good to go!
But what about the other end? How do I know I'm connected, or anything at all? This is where it gets fun. Remember that all I've done so far is to power up the BR-SC11A. Remember also that it defaults to 9600 bps. Now I'm going to hook up one of our serial LCD displays to the TX output of the UART on the BR-SC11A (same baud rate!). Ideally I would have had to do some level shifting between the LCD (5V) and the BR-SC11A (3.3V), but I'm in a hurry and want to see it work. And 3.3V (or thereabouts) is probably high enough for the LCD to read a logic high, so I'll run with it. Did it work?
That's what I like to see - minimum effort, maximum reward. The BR-SC11A has been fully configured to operate as a serial link remotely. I didn't have to mess with AT commands at all!
After some additional testing (increased distance and baud rates) with our Bluetooth modules, our official position is that...we like them a LOT! These things provide a VERY robust link, they work great indoors and you can configure them remotely. Don't be surprised when you see them implemented in other Spark Fun designs!