Welcome to the TRCY.org Bluetooth Experiments Page
Previous Home Next
Overview Big Trouble One Last Try
Get the GBS301 to work out of the box Where to Buy Downloads
About HyperTerminal Older PDA’s Alternative Power USB Bluetooth Dongle
For those that may not know Bluetooth is an industrial specification for wireless personal area networks (PANs). Bluetooth provides a way to connect and exchange information between devices such as mobile phones, laptops, PCs, printers, digital cameras, and video game consoles over a secure, globally unlicensed short-range radio frequency. The Bluetooth specifications are developed and licensed by the Bluetooth Special Interest Group.
With that being said, Bluetooth is a short-range wireless network link that can be used as a remote control or wireless data link between a robot and a PC (or robot to robot). Currently there are several Bluetooth devices available which are either specifically made for or can be adapted to robotics or other embedded applications.
Currently the most popular for robotics is EmbeddedBlue Tranciever AppMod from Parallax, Inc. (The second most popular is probably the Zigbee modules from http://www.maxstream.net.) It sells for about $70. This link is designed to plug into a special port on many of the Parallax control boards. You can then link to a Bluetooth enabled PC (or PDA) or another robot via another EmbeddedBlue AppMod. This link uses several of the Basic Stamp II series micro-controller I/O lines.
For my own robotic application I did not want to use up so many of the I/O lines for a remote link. I wanted something I could plug into the Serial port on my Basic Stamp controller board and take advantage of the hidden I/O pin 16. The Basic Stamp II has 16 regular I/O lines labeled as pin 0 through 15 in the program code. Pin 16 is the line usually reserved for the serial programming interface.
So I needed some sort of Bluetooth to Serial link. There are several devices that do this, but I decided to experiment with an IOGEAR Bluetooth to Serial Adapter model GBS301.
Retail price is $59 to $120. I do not know why the price varies so much. I purchased mine on e-bay for about $60 with shipping.
The GBS301 is said to be a "direct cable replacement for RS232 serial devices". It implements the FULL RS232 specification (this is import later on). It runs on an external 5-volt wall-wart for power, which should be easy to replicate to go wireless.
to say when I got the devices I plugged one into my robot and one into my PC and
I bought two of them for a direct cable replacement. I wanted to send commands to my robot and receive data remotely. I also wanted to be able to program my robot wirelessly. What I liked about the GBS301 is they do not need any PC setup. In theory you can plug them into a PC or PDA and you don't need configuration software because they can do most of their own configuration.
Security features such as encryption of data and key exchange authentication are also built into these devices.
The GBS301 Manual shows you how to pair and unpair the devices. You can also access the devices configuration menu via HyperTerminal to adjust more settings. The dipswitches on the outside of the unit allow you set the device as a Master or Slave and the baud rate. The HyperTerminal link will let you access more features including Encryption and Authentication.
Master will always be the PC
will always be the Robot
Both Slave and Master offer a 2way send/receive link but you still have to set them as Master/Slave.
I experiment for months with these devices. I tried them as a pair and individually link to a USB Bluetooth dongle connected to my Laptop or PC. I searched the net and found others (even in the Parallax support forum) that bought the devices to connect to their Basic Stamp but it didn't work for them either and no one knew why.
I contacted IOGEAR support 3 times and never heard back from them. From the Parallax forum I learned as far as programming goes, the Stamps (and many other micro-controllers) use special bit toggling to get code to load. Because of this wireless links do not currently offer proper signaling to allow for remote programming. But, they should not stop remote data to and from the Basic Stamp via a wireless serial link.
I found another experimenter who said pins 7 (RTS) and pin 8 (CTS) had to be jumped together on the Basic Stamp II serial port side for the communication to sink up properly for data to be sent to the Stamp. This is because the GBS301 implements the FULL RS232 SPECIFICATION. In layman’s terms full spec calls for a bunch of lines to go high and low to communicate a device is online, ready to receive, data was received, etc. But most RS232 devices I work with, including the Basic Stamp rely on 3 lines. Transmit, Receive and Ground. In other words, the Stamp link does not uses the extra pins to single it’s ready for data.
So jumping pin 7 and 8 on the serial link to the GBS301 tricks it into thinking it has all the information it needs from the device to allow data to go through. Again, this is only needed on the Basic Stamp (Slave) side.
In another Forum I found Dennis Clark had problems with a similar link to his OOpic boards. His fix was also to jumper pins 7 and 8, but he was not using a GBS301.
With no pins jumped I could get data from the Basic Stamp but I could not send data to it. With the pins jumped nothing worked. I soon discovered when the pins were jumped and everything turned on the GBS301 Slave was not syncing with the Master.
One Last Try:
What I did was solder in a 2 pin connector so I could jump and un-jump pins 7 and 8 on my Basic Stamp carrier board (mine is a J2 Rev2 board). When I program the Stamp with a wired link I remove the jumper. Also I have to remove the jumper to get the GBS301 to sync with the master Bluetooth device.
The Master Bluetooth device can be any other Bluetooth enabled PC, PDA, USB Bluetooth dongle or another GBS301. Once synced, I place the jumper over pins 7 and 8 and all is well.
I was used the Command Console program from Roger Arrick as my sample code to test a remote command link. The code called for a baud rate of 300bps. The lowest I could set the GBS301 too was 9,600 so I changed the baud rate in my program code to match the GBS301 and bingo-bango it worked!!
The Baud rate setting in the Basic Stamp program code MUST MATCH what the GBS301 is set to.
Also if using the Windows Basic Stamp Editor, make sure your Debug settings are also set to what the GBS301 is set for.
the GBS301 to work out of the box:
Pre-modify your Basic Stamp (or other microcontroller) board with a removable jumper between pins 7 and 8 of the serial interface.
Set the dipswitches on the GBS301 for 9,600 baud and Slave.
Connect the GBS301 through the included Null Modem Adaptor to your PC serial port.
Open a HyperTerminal session to connect to the configuration menu of the GBS301
Turn off Authentication and Encryption
Remove the GBS301 and connect to a Basic Stamp controller board with the jumper removed from pin 7 and 8.
Connect a Bluetooth Dongle (or another GBS301) to your PC or PDA
Apply power to the Basic Stamp and GBS301
Sync up with the Bluetooth device connected to your PC or PDA
Add a jumper to pins 7 and 8 on the Basic Stamp board.
Open a HyperTerminal Session with virtual serial port for the Bluetooth link
Bingo-Bango you can send commands to your robot and see data sent from your robot
The range should be about 330 feet or 100 meters.
Where to Buy GBS301:
ANT Online has them for about $60 currently at:
www.ebay.com Search E-bay for GBS301
Online stores like www.newegg.com, www.amazon.com and www.tigerdirect.com had carried the GBS301 in the past at a higher price.
.Zip with HyperTerminal config for GBS301 Configuration, Robot Console and Robot Console Basic Stamp II test program
TeraTerm – A freeware HyperTerminal program for PDA’s and Handheld PC’s
GBS301 Manual - GBS301 Manual
For custom Robot Command and Control software check out J2R Scientific.com for a free download.
For those that don’t know HyperTerminal is a neat little communication application built into most versions of Windows. It allows you to connect to other devices via any of the available ports on your PC or PDA. Included are .Zip of the downs are HyperTerminal configurations you can use on your PC. Here are a few additional notes:
You’ll usually find HyperTerminal under Start/Programs/Accessories/Communication/HyperTerminal.
With my HyperTerminal open if I click on File then select Properties I can see the setup of the terminal session. When I click on the Settings tab you see I have it set for Terminal Keys, Emulation is ANSIW and Telnet terminal ID is VT100. These settings worked best on my laptop.
You’ll also want to check the Com port settings; mine was set to Com Port 2 when I used another GBS301 and Com Port 40 when I used a Bluetooth USB dongle.
Newer PDA’s or Smart Phones with built in Bluetooth should (or might) be able to detect the GBS301 and connect to it. The next step would be accessing a terminal program from your PDA.
I had an IBM Z50 Workpad hand held PC. It’s an oldie but a goodie. It featured a large LCD screen and a nearly full size keyboard. It looks like a tiny ThinkPad. It ran a version of WinCE 3.0. It had a built in serial port, but the HyperTerminal program under its version of WinCE only allowed for access to the Modem port.
I found a freeware Terminal program called TeraTerm. You’ll find it under the download section or here. It has a couple of different version for different PDA processor types. For the Z50 the Teraterms Mips.exe worked.
I used another GBS301 connect to the serial port of the Z50, but because the end of the serial dongle for the Z50 was female I did not need the Null Modem adaptor I could plug straight into the serial cable of the Z50.
A 6-volt external wall-wart (AC to DC) power adaptor powers the GBS301. For mobile application you’ll need an alternative power source. The adaptor plug is a size “A” from Radio Shack. You’ll also need an adaptor cord to for the “A” plug. I used a 6’ extender cabled from Radio Shack with plugs on both ends. I just cut and spliced the cable as needed.
The GBS301 will run from 5 volts DC. Just make sure the polarity is correct; the center or tip should be positive. From there I wired in an extra power plug on my J2 Rev2 board to power the GBS301.
You could just cut the included power adaptor cable to make a power interface, but I recommend buying the correct plugs to make your own cable.
For Mobile PDA or Laptop application I would make a battery pack and use a 7805 to regulate 5 volts to the GBS301. A 9-volt and a 7805 should be easy to wire-tie around a GBS301 if you are connecting it to a PDA or Laptop.
For my laptop and PC testing I used the Zoom brand, model 4310B USB Bluetooth dongle. You should be able to pick up a dongle like this or any other Bluetooth dongle from any computer store like Best Buy or on the net for about $25. It’ll sync up with any other Bluetooth devices.
Dongles like this are typically self-powered via the USB power. On my XP machine I had to reload the driver because I let Windows pick the drivers the first time around. I recommend reading the directions for the USB Bluetooth dongle you purchase and if it recommends installing the software first then plugging in the device, you’ll need to do that.
I found the driver Windows loaded did not allow access to the full feature of the dongle. The Toshiba drivers it came with wanted to make Bluetooth the default gateway to the Internet…watch out for some of those “extra” features!!