Forums

bluetooth->RS232

Started by Unknown January 24, 2005
My company makes an embedded device which normally is controlled by a
wintel host via RS232. The communication method is 8-bit binary, packet
based, with no hardware flow-control (3-wire interface).

I now have a new requirement: My device must communicate with a
bluetooth enabled wireless host. The host may be either a bluetooth
enabled wintel box(running winxp) or a PocketPC(windows CE).

I gather I should use a "dongle" to convert Bluetooth to RS232 and use
the RFCOMM bluetooth layer for host-side programming. I have two
questions:

a) Which dongle should I use to convert Bluetooth to RS232? I have
found several vendors which sell cable-replacement type devices (using
the RFCOMM protocol) which convert RS232 to bluetooth or visa versa.
Any ideas which device I should choose? Quantity is low so I'm looking
for reliability over price for now...

b) How to do the host-side programming. I'm familiar with the basic
win32 api+Microsoft 6.0 c++ tools, but not with networking or the
bluetooth api(s). Which API to use? Can the RFCOMM protocol be used
from win32? and wince 3.0?


Any help is greatly appreceated

<sgordon@mich.com> wrote in message
news:1106606272.456698.69730@f14g2000cwb.googlegroups.com...
> My company makes an embedded device which normally is controlled by a > wintel host via RS232. The communication method is 8-bit binary, packet > based, with no hardware flow-control (3-wire interface). > > I now have a new requirement: My device must communicate with a > bluetooth enabled wireless host. The host may be either a bluetooth > enabled wintel box(running winxp) or a PocketPC(windows CE). > > I gather I should use a "dongle" to convert Bluetooth to RS232 and use > the RFCOMM bluetooth layer for host-side programming. I have two > questions:
You want to use the Serial Profile which is meant to replace serial cables. Most cheap BT dongles that go into the USB port are useless for you device since they need a USB host and a large portion of the BT stack as well. Go for a complete module, either a boxed (=expensive) serial-BT converter or a PCB module. I have very good experience with the BLU2i modules from Ezurio (former TDK). They are class 1 and have all necessary stuff inside. Once you have configured the module over it's serial port with AT style commands, it can automatically come "online" with a computer with BT or another BLU2i modules, creating a completely transparent wireless serial channel.
> b) How to do the host-side programming. I'm familiar with the basic > win32 api+Microsoft 6.0 c++ tools, but not with networking or the > bluetooth api(s). Which API to use? Can the RFCOMM protocol be used > from win32? and wince 3.0?
Using the serial profile gives you a virtual COM port which behaves just like a real one. Meindert
<sgordon@mich.com> wrote

> a) Which dongle should I use to convert Bluetooth to RS232? I have > found several vendors which sell cable-replacement type devices (using > the RFCOMM protocol) which convert RS232 to bluetooth or visa versa.
That's the ticket. Make sure it is for 'drop in' cable replacement - these devices have uP's in them that talk to each other in Bluetooth and use this information to do remote control of the '232 lines: DTR goes up at one dongle - data is transmitted RF -- and CTS (?) goes up on the other dongle, just as if they were connected with wire. If you can get this sort of dongle (and I don't know if it even exists, you _can_ get them for IrDA) then you should have no programming changes at either end. -- Nicholas O. Lindan, Cleveland, Ohio Consulting Engineer: Electronics; Informatics; Photonics. To reply, remove spaces: n o lindan at ix . netcom . com psst.. want to buy an f-stop timer? nolindan.com/da/fstop/
"Meindert Sprang" <mhsprang@NOcustomSPAMware.nl> wrote

> Using the serial profile gives you a virtual COM port which behaves just > like a real one.
That is another way to do it, and at least it is available. You will have to tell your software to use COMM3 rather than COMM1 for instance. This is probably the most reliable and transparent method. The 232-IrDA-232 dongles I know of plug in to the same 232 port as the cable and the software talks to the same old serial controller. Some of this is coming back now. You may have to send escape sequences to the dongle via the '232 port to set baud rate and such... -- Nicholas O. Lindan, Cleveland, Ohio Consulting Engineer: Electronics; Informatics; Photonics. To reply, remove spaces: n o lindan at ix . netcom . com psst.. want to buy an f-stop timer? nolindan.com/da/fstop/