Groups | Blog | Home
all groups > dotnet compact framework > january 2007 >

dotnet compact framework : Multiple Bluetooth Serial Connections (C#/.NET)



Dan.Bulwinkle NO[at]SPAM gmail.com
1/11/2007 7:00:12 PM
I've been searching and researching for the past several days for ways
to have multiple virtual serial port connections via bluetooth, but I
have yet to find a decent solution. It seems most people are asking the
same question but no one has an answer.

I have two devices from which I want to send and receive data (GPS &
Printer). Individually I can connect to each device in .NET, so I was
much disappointed when I realized both devices couldn't be connected at
the same time. I have Windows Mobile 5.0 running on an iPAQ. Basically
long story short I am wondering if anyone knows how to access both
devices using Bluetooth in .NET?

-Dan
ctacke/
1/11/2007 10:33:07 PM
The serial protocol just isn't built for that. It just doesn't work that
way. It's desinged to talk to one device at a time, and really onl from one
app. There are drivers that can virtualize the port so multiple apps can
receive data from one port (like GPS data), but even those are limited in
utility, as if you send to the device, a response will make sense to only
the sending app.

In your case you should disconnect from one, then connect to the other.
There's just no way around it.


--
Chris Tacke
OpenNETCF Consulting
Managed Code in the Embedded World
www.opennetcf.com
--



[quoted text, click to view]

Peter Foot [MVP]
1/12/2007 10:26:06 AM
Pretty much every implementation of virtual COM ports for Bluetooth has a
tight restriction on the number of virtual ports available. However it is
possible to open outgoing connections to 2 different devices using Serial
Port profile. For the Microsoft stack you would do it using the Sockets
support, for the iPaq you'll need to use the Broadcom SDK (native code only)
or a third-party wrapper such as the one from www.high-point.com

Peter

--
Peter Foot
Device Application Development MVP
www.peterfoot.net | www.inthehand.com



[quoted text, click to view]
Markus.Humm
1/13/2007 10:10:38 AM
Hello,

is it possible to create a outgoing COM port for each of the devices?
e.g. the printer gets COM5 and the GPS COM6 (or something other
available) and you app. simply opens both?

Greetings

Dan.Bulwinkle NO[at]SPAM gmail.com
1/20/2007 12:17:13 PM
I have found the solution; or rather, a solution which is easier than
learning the Broadcom API (C# has spoiled me!). Here's what you do:

1) Return your HP iPAQ
2) Order a Dell Axim

The Axim uses the Windows Mobile native bluetooth utility which allows
two serial ports two be used at the same time. Good luck.
Markus.Humm
1/24/2007 9:56:53 PM
I've recently found out that all pocket pc's I've seen so far with the
MS BT stack don't offer ANY services, is that right? So you can't e.g.
transfer contacts from one PDA to another.

The devices with Broadcom Stack always offered at least SPP if not more.

Greetings

AddThis Social Bookmark Button