SparkFun Forums 

Where electronics enthusiasts find answers.

All things pertaining to wireless and RF links
By alkopop79
Had troubles setting up my Bluesmirf but finally it's working. If you're on Mac OS X (Snow Leopard) and have troubles setting it with Arduino, you might find this tutorial useful. Setting up Bluesmirf:

1. Wiring the Bluesmirf to Arduino: GND to GND, VCC to 3V3, TX to RX, RX to TX
2. Make sure your Arduino sketch is set to the same Baud rate as the BT module. 9600 is the safest.
3. Once the Buesmirf is plugged and the Arduino is powered externally, the red LED should blink.
4.Set up Bluesmirf in the Bluetooth Assistant (it should appear as Firefly). The passkey to pair is 1234.
5. Download and install ZTerm and go to Settings->Modem preferences ,choose the modem ("Firefly" or something).
5.Go to Settings->Connection and set the Baud-rate to 9600.
6.Restart both Zterm and the Bluesmirf. Make sure you restart Zterm within 60 seconds after Bluesmirf restarted! The green LED should be on.
7. Command+K (keyboard buffer) allows you to enter commands (within 60 seconds after Bluesmirf restart!!!!!!!!). Enter $$$ first. That switches the modem to command mode. The terminal should return CMD? Next enter SU,96 to set the Baud rate of Bluesmirf to 9600. The terminal should return AOK. Then enter --- (minus three times) and press return. The command mode exits.
8. Exit Zterm. Red LED on, green LED off. By now your computer recognized the Buesmirf, the Baud rate is set to 9600. Try it with Processing or Max MSP! Don't forget to set the Baud-rate in both programs! In Max the serial object should look like this "serial a 9600", where the first argument ('a') is the port. It can be different, however the Baud rate should be the same.
In Processing you should have something like this in the setup function:

void setup(){
arduino = new Arduino(this, Arduino.list()[4], 9600);

...where [4} is the number of the port (the println function print the available ports). You might want to choose Firefly....tty. If it doesn't work, restart your computer.
This method worked for me. Good luck!

By alkopop79
Addendum: had lot of trouble using Bluesmirf in Max for Live and Max/MSP. The serial object tended to crash both Max and Ableton Live. Finally I set the profile of Bluesmirf to '1' (slave) instead of the default '0'. The command is: S~,1
I also set the Baud rate to 115200 on both Bluesmirf and Max and since then it connects and closes fine. Again: start ZTerm right after Bluesmirf is powered, enter command mode with $$$ then set the profile and the Baud rate (see previous post).
By karmakazi_
THANK YOU! This post probably saved me giving up on the blueSmirf altogether.

I have to add one additional hurdle I had. When I first tried to pair with my computer it reported the device as unknown. When I tried to connect it it failed no matter what I did. Nothing I tried worked until I rebooted my computer.

After rebooting it saw the device name correctly but it failed on the passcode attempt. I had to switch to manual to enter 1234. Everything after that worked exactly as you described... you weren't kidding about the 60 seconds!

I am using 10.6 snow leopard and I have noticed some funkiness with the BT. I hope this is fixed in future updates.
By alkopop79
Addendum: had lot of trouble with the Bluetooth connection. Any attempt to establish a connection left the software (max msp, arduino, pure data, coolterm, zterm, etc.) hung/freeze. The solution:

go to HD/Developer/Applications/Bluetooth/Bluetooth Go to the Utilities and chose Modify Device and Software Configuration, tick all boxes and click on Perform. Apparently this erases the BT settings. After the reboot everything worked fine.

Also, purchased a Roving Networks RN-42. Without the breakout board it costs third of the Bluesmirf and does the job well.
By firestarter
Alko I ran the fix on the bluetooth setting and never got an improved response after reboot. Any other suggestions? When it comes to electronics I am not as experienced with computer related devices as I am with moisture meters, etc. Have you guys heard of wagner meters?
By Cranky-9
I’m having difficulty getting this to work correctly on my Mac. I have done the above steps, can set the baud rate, and put it into Data mode. Though what’s odd is that despite whatever baud rate I set it to, I can still do AT in any other baud rate set in ZTerm.

Anyways, I then Hang-up and quit ZTerm and open the RoombaMidi. It connects, but when I try to get sensors, RoombaMidi complains “couldn’t read Roomba. Is it connected?”.

It’s an older Discovery with firmware upgraded with the scheduler upgrade kit. All the lights come on the Roomba when I plugin the RooTooth, so the firmware should be good enough as Historic Mainstreet Inn

Any ideas?
Last edited by Cranky-9 on Wed Jun 05, 2013 5:23 am, edited 1 time in total.
By adrianrdzv

I'm having problem also with my mac. In step 5, I cannot see listed the FireFly module even that I'm connected to it. It's the same problem if I use the arduino software, I can't see it listed in the serial ports. I have a BlueSmirf HID but I think it should anyways still work like a normal BlueSmirf, or is there any other procedure for it?
By grunewolke
thanks alkopop !
Everything is ok now and you're solution works for bluetooth mate gold too. I succeed to connect my lilypad and make it talk to max5 (my OS is leopard). I just change the serial.begin in the firmata standard code from 57600 to 9600 and change the baud rate of the serial object in the maxuino object.
now it's time to play guys !
By balam
Hi Guys
I just got my bt module
going to use Max to get the serial

what serial set up you use ?
I am not clear about the serial speed
do you use plain or the software serial
I tried the spf sample file and does not work
but using ... orial.html

I get the info in arduino serial

any advice for max msp will be great!