Although I have had Bluetooth working with my project for sometime, recently some new Bluetooth modules I ordered have not been working. This meant, that only 2 of the 4 jerseys I have would have worked - not good. So for the past 2 weeks I have been trying to figure out a way to get these new modules working.
After many hours spent tonight I have managed to get Bluetooth up and running again. I am now posting this at 4am so I do not forget the process. Here is a brief description of how to get connected to BlueSmirf Bluetooth Modules using a computer. This process works for both old and new BlueSmirfs:
- Connect your Bluesmirf module to the Ground/Power/Rx/Tx pins of Arduino microcontroller. Connect the Arduino to AC power or battery power.
[please note: your Arduino board will need to be pre-programmed to receive data and do some action based on this. I suggest a simple program which turns and LED on/off. You can use pin 13 of Arduino for this, just plug a LED into pin 13 and into the GND pin next to it (you will not need a resistor)]
- Plug in USB Bluetooth adaptor into your computer or laptop (I use cadmus micro model)
- Install the Toshiba Bluetooth Software or here (under GUBTCR41A-BT Win 2K/XP). Reboot after install
- Open up newly installed Bluetooth Settings. Click ‘New Connection’. Select ‘Custom Mode Setup’ and click next. It will search for devices, and it should detect BlueRadios (which is the BlueSmirf), select this then click next. I did not need to enter a passkey, but if it asks you, the passkey for BlueSmirf is ‘default’. It will then register a COM port. NOW, uncheck the tick box at the bottom, and then next to the drop down menu displaying the COM ports, uncheck the box which says ‘auto connect’. Then click next. The BlueSmirf is now added.
- Now it should appear in your Bluetooth Settings window. Right click on it and click connect - nothing will happen to the BlueSmirf but the computer will establish a link. If you highlight it and click the ‘detail’ button, it will remind you which COM port its using under the settings. In my case its COM40.
- Now open up Processing (I use processing to talk to BlueSmirf/Arduino wirelessly). I have attached a zip file to this post containing the processing program I use to send data. You will need the MyGUI class to run this, because I have created buttons using this. You can download MyGUI here. This program simply sends numbers when the buttons are clicked. And as mentioned above, I have preprogrammed my Arduino to turn pin 13 ON and OFF based on this data.
[please note: the reason there is two sets of buttons is because I use this program to connect to TWO seperate BlueSmirfs. This is also why there is two Serial port connections.]
- The line println(Serial.list()); will print all the COM ports on your computer. You will need to change the line port1 = new Serial(this, Serial.list(), 9600); where  represents the COM port in the list that corresponds to your BlueSmirfs COM port. COM40 was 9th in the array (remember array starts at 0, so its actually the 10th in the list). You can alternatively use something like this: port1 = new Serial(this, “COM4″);
- Then run the processing program, and a red LED should now light up on the BlueSmirf - you are now connected! And if you have programmed the Arduino right, when you click the buttons to send data, the LED should turn on and off.
These instructions are more for my benefit than anyone elses, but I have noticed that other people are having similar Bluetooth problems. Thanks go to Pavel in Norway who has been helping me out. Toshiba Bluetooth Software + Four Hours + Help from Norway = Bluetooth Problems Solved!
Attached Processing File