BlueTooth <=> Microcontroller

Trying to replace a serial data wire (9-pin D connector) with a wireless bluetooth, and it will be used to communicate between a 8051 based micro-controller and a PC, so the PC can receive feedback or send data to micro-controller through bluetooth. Because I have no experience on Bluetooth technology. Can anybody suggest how can I achieve this? Purchasing a Bluetooth module, and connect it to the TX RX on the 8051-based micro-controller, will it work as simple as that?

Hi,

I think you can use any bluesmirf silver/gold. Only you can conect to Tx/Rx at your micro-controler and config de bluesmirf module to the correct baud rate. (the comunication micro/bluesmirf is TTL)

A few days i used one with my atmega 128 and he worked fine.

anjocama:
Hi,

I think you can use any bluesmirf silver/gold. Only you can conect to Tx/Rx at your micro-controler and config de bluesmirf module to the correct baud rate. (the comunication micro/bluesmirf is TTL)

A few days i used one with my atmega 128 and he worked fine.

Thanks for your solution :smiley: But how did you set up for the PC side ? Did you connect a USB dongle (or other bluetooth devices) to your PC and send/receive data using the USB dongle (devices) ?

I’ve done basically that using one of the older BlueSMiRFs (talking to an AVR, but I don’t think an 8051 would be any different). I talked to it from one computer using a cheap USB-Bluetooth dongle and from a laptop using the laptop’s builtin Bluetooth. And from a cell phone using J2ME.

The only tricky bit was configuring the computer to recognize that it can make a “serial” connection to the other device… in my case this was just a matter of finding the right “expert” or “advanced” options pane.

One thing to look out for is that Bluetooth batches up characters for transmission, so the timing of arrival won’t be precise.

Yes, is is that simple. I have Bluetooth modules from both Sparkfun (RN41) and Sena. I’ve used them with USB dongles purchased from OfficeMax and also with the built in Bluetooth in my laptop.

For basic serial-wireless connections, it’s very simple.

Lyndon,

Maybe your answers could help me get started with wireless.

I currently control some devices using the UBW, a pic-based device from Sparkfun. It essentially shows up as a COM port when connected to the host PC by USB. I then issue some string commands to the UBW and away I go …

I now want to replace the cable by a wireless link. My first step is to learn how to set up the wireless, using a USB dongle and a Bluetooth module. For these, I’m considering Sparkfun’s sku#s WRL-00150 (USB dongle) and WRL-08474 (RN41 module).

Will this hardware alone get me the ability to send data wirelessly? What would I need to do to “see” the data received by the RN41? What software support will this need?

I suppose I’ll need some hardware at the receiving end (perhaps the UBW, or maybe some pic-based circuit) to accept and use the data that is sent. Any comments on this?

Eventually, I’ll want several RN41 devices to receive and act on the same data sent by the host; are there ID/address things I’ll need to deal with to do this?

thx

– equipoise[/quote]

Assuming you’re using a Window OS, each RN41 will be detected by the OS and appears as a serial port (e.g., COM9) and you can communicate with it as if it were a physical RS232 port. A quick test can be done using Hyperterminal. There is also a .NET package from InTheHand.com that has lower level support for Bluetooth if you don’t want to use the serial port communications.

I haven’t tried using Bluetooth under Linux. Probably get around to it some day.

I don’t think you can have one Bluetooth device receive a broadcast message using the SPP (Serial Port Protocol) that these devices support, so you may have to find the port assigned to each device and write a software layer that sends the same data to each one.

hi there…

i would like to know if thw wrl-08332 (bluesmirf bluetooth modem) should be programed before it could comunicate with port txrx on the pic 16f877a? is there any comunication protocol that i should care so that those two could cominicate just fine?

thanx…