Tuesday, December 18, 2007

Back to Bluetooth

I spent a couple days trying to get the BlueSmiRF to work. Two very frustrating days.

First it didn't work with the Monski Pong. It did connect with the bluetooth on my PC but it would drop the connection and was generally not working at all as a serial port. I then went into troubleshoot mode and the first suspect was the bluesmirf module itself. I had the sparkfun.com Bluetooth Modem - BlueSMiRF (SKU#: WRL-00582) that "Making Things Talk" specified, that should be good. (not so, but it should work out anyway)

Next, I setup the FT232R USB to RS232 converter with the bluetooth to see if I could get some assurance that the bluesmirf was working by going through the AT commands from a terminal program. That wasn't working either for the reasons I'll get into shortly.



As it turned out the AT commands that "Making Things Talk" has in their walk through of the bluesmirf did not work! After trying it various ways, many various ways I decided to go back to the beginning. I started looking over the spec sheet on the sparkfun site and realized that the part about "new Roving Networks bluetooth module. The command set is not compatible with the previous Mitsumi module" was perhaps important! Shame on me for not reading the details.

I still have not tried the bluetooth serial port but have just now been able to communicate with the bluetooth via the FT232R! Basically from reading the Roving Networks documents on the bluesmirf. In hindsight I should have done it at the beginning, but the book walk throughs were going so well! Once you have it working it is quite talkative!

Next step is to go back and get it to work with the monski pong program and finish of the setup from the terminal.

So be warned, if you are using the bluesmirf the new command set is different.

This is what worked for me to communicate with the bluesmirf through the FT232R USB to R232 converter. (sparkfun Breakout Board for FT232RL USB to Serial (SKU#: BOB-00718)

Step 1: Hook up the bluesmirf and FT232R board as shown on pg 76, Fig 2-9. (exception I attached the 3.3v power to the bluesmirf.)
Step 2:
1. Open HyperTerminal.
The "Connection Description" Window will appear.
2. In the Name box, I typed j, you can type whatever you want, mostly.
3. Click OK.
The "Connect to" window will appear.
4. In the Connect to window, pick the com port for the FT232R.
The "COM Properties" window will appear.

5. In the Bits per second dropdown, select 115200. The 9600 baud selection didn't work for me and the Roving Networks docs mention 115200 as the desired baud.
6. In the Data bits entry, select 8.
7. In the Parity entry, select None.
8. In the Stop bits entry, select 1.
9. In the Flow control entry, select None.
10. Click OK.



This will connect to the COM port, but you must not have any other application using that COM port. Only one application can use a COM port at at time.

12. On the main hyperterminal window click on disconnect so you can change the settings.
13. go to File, Properties.
This will show the "Properties" window.
14. Select "Settings" tab, click the "ASCII setup" button.
This will show the ASCII window and options.
15. Check the Send line ends with line feeds.
16. Check the Echo typed characters locally.
17. Check the Append line feeds to incoming line ends.
18. Check the Wrap lines that exceed terminal width.
19. Select OK.
You will be back on the Properties window.
20. Select OK.
You will be back on the main hyperterminal window.
21. Click Call (the phone), (you should be on the main hypertermial window.
This should connect you to the port, look at lower lefthand corner for "connected".
22. Type --- then carriage return and first time it does nothing, or replies END.
23 Type $$$ then carriage return and it should reply CMD.
24 Type --- then carriage return and it should reply END.
Try the other commands you need according the the Roving Networks documentation (assuming you have the bluesmirf with the Roving Networks bluetooth)
H puts a lot of stuff up, it stands for Help.

4 comments:

Unknown said...

Just got my own BlueSmirf v.2 the other day. I was upset to see that the new module had the same name, but it looks to be a better module in the long run. I hope to re-work the BT examples from the book sometime soon and get them up on the makintghingstalk.com site.

S_A_S_O said...

Hello
really i'm very happy that i found your blogger talk about bluetooth because it's my project in the faculity "bluetooth broadcasting msg "
and i buy this module from sparkfun and not working untill now
i want to know why u use FT232RL USB to Serial ??
in my project i want this module connect to mobile device

Rohit said...

Have you managed to get flow control working? RTS and CTS don't seem to be working for me.

The module works just fine as a simple serial pass-through. I'm using Realterm as the serial terminal. However I can't get the RTS pin on the module to toggle (or even to change states). Also, changing the state of the CTS pin on the module is not reflected back on my terminal.

I've tried changing modes from SPP to MDM, but still no luck.

Unknown said...

I think bluetooth is a great technology which has made cell phone easier, sometimes it turns difficult to configure but the experience from others that handle those phones is very helpful. this is a very great material, as similar as when you realize after Purchase Viagra about the benefits it has. Generic Viagra Cheap Viagra