Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Bluetooth - Discovering Devices

225 views
Skip to first unread message

Thiago Avancini

unread,
Aug 9, 2004, 4:35:00 PM8/9/04
to
Hi,
 
I am looking for a code sample that i can discover bluetooth devices around me.
My device isa Ipaq 4150 with bluetooth enabled.
 
I found a piece of code on the popular OpenNETCF library.
But it not works for me.
 
Anyone can help me?
 
thanks!
 

Paul G. Tobey [eMVP]

unread,
Aug 9, 2004, 4:45:43 PM8/9/04
to
And why does it not work for you?
 
Paul T.
 
"Thiago Avancini" <tava...@hotmail.com> wrote in message news:OxKtbBlf...@tk2msftngp13.phx.gbl...

Thiago Avancini

unread,
Aug 9, 2004, 4:57:48 PM8/9/04
to
i am using this piece of code:
 
============================================================
<........>
using OpenNETCF.Net.Bluetooth;
<.......>
private OpenNETCF.Net.Bluetooth.BluetoothDeviceInfo [] bdi = new BluetoothDeviceInfo[10];
<.......>
private void button1_Click(object sender, System.EventArgs e)
{
    OpenNETCF.Net.Bluetooth.BluetoothClient bt = new OpenNETCF.Net.Bluetooth.BluetoothClient();
 
    bdi = bt.DiscoverDevices();
 
    for(int i=0; i<bdi.Length; i++)
    {
        comboBox1.Items.Add(bdi[i].DeviceName);
    }
}
============================================================
 
 
and the code dos not return any devices around me. (i have another pocket pc with bluetooth enabled).
 
BUT, when i call this property, it returns that my bluetooth device is not present.
<.........>
Text1.Text = OpenNETCF.Net.Bluetooth.BluetoothClient.HardwareStatus.ToString();
<.........>
 
 

"Paul G. Tobey [eMVP]" <ptobey no spam AT no instrument no spam DOT com> wrote in message news:e4O1SHlf...@TK2MSFTNGP10.phx.gbl...

Peter Foot [MVP]

unread,
Aug 9, 2004, 5:03:18 PM8/9/04
to
The OpenNETCF library is built around the Microsoft Bluetooth Stack. The
iPaq 4150 uses the Widcomm stack and therefore we don't support it.
Unfortunately the licensing cost of the Widcomm SDK is fairly prohibitive.

Peter

--
Peter Foot
Windows Embedded MVP
www.inthehand.com

Do have an opinion on the effectiveness of Microsoft Windows Mobile and
Embedded newsgroups? Let us know!
https://www.windowsembeddedeval.com/community/newsgroups

"Thiago Avancini" <tava...@hotmail.com> wrote in message
news:OxKtbBlf...@tk2msftngp13.phx.gbl...

Paul G. Tobey [eMVP]

unread,
Aug 9, 2004, 5:15:37 PM8/9/04
to
OK, there are several things there that might easily be wrong.  I'm certainly no Bluetooth expert, either. 
 
Something is funny about how you are creating that array.  Why are you creating it first, then assigning it to the result of DiscoverDevices()?  That's obviously wrong.
 
As far as the device itself, *is* Bluetooth turned on?  It seems like *the* most likely cause of the problem is that it is off.  Does your other PPC device show this device when you browse the Bluetooth list?  Are you sure that the functions used by OpenNETCF correspond to the Bluetooth 'stack' actually used in your device?  This is covered in one or more of the comments in the source code.  If the device uses the Widcom stack, it won't work.  Only the MS stack is supported.  What device is it?
 
Paul T.
 
"Thiago Avancini" <tava...@hotmail.com> wrote in message news:O02VKOl...@tk2msftngp13.phx.gbl...

Thiago Avancini

unread,
Aug 9, 2004, 5:18:16 PM8/9/04
to
Hi Peter,
 
Thanks for the reply.
 
I will study the possibility to acquire this SDK.
 
Thanks!

Mohit Gupta

unread,
Aug 9, 2004, 8:07:02 PM8/9/04
to
hi all,

What I was trying to get bluetooth address of my local device, happens to
be Ipaq 4150, using BtGetLocalAddr which unfortunately uses MsComm Stack. As
stated by Peter that SDK provided in Microsoft uses MSComm stack. Now, how
can I handle bluetooth device by programming if I can't use MSComm SDK.

2) How can I find out that my bluetooth device is using WidComm or MSComm?
3) Why there are 2 different types of stacks?
4) How can I use widcomm stack using VB .NET?

Your help will be appreciated

Steven Licciardi

unread,
Aug 10, 2004, 2:05:15 AM8/10/04
to
Can you tell me of any devices that use the Microsoft Bluetooth Stack?

Steven

"Peter Foot [MVP]" <feed...@nospam-inthehand.com> wrote in message
news:%23MabORl...@tk2msftngp13.phx.gbl...

Francesco

unread,
Aug 10, 2004, 3:09:53 AM8/10/04
to
"Mohit Gupta" <Mohit...@discussions.microsoft.com> wrote in message news:<C6A0CDB8-2454-44E3...@microsoft.com>...

> hi all,
>
> What I was trying to get bluetooth address of my local device, happens to
> be Ipaq 4150, using BtGetLocalAddr which unfortunately uses MsComm Stack. As
> stated by Peter that SDK provided in Microsoft uses MSComm stack. Now, how
> can I handle bluetooth device by programming if I can't use MSComm SDK.
>
> 2) How can I find out that my bluetooth device is using WidComm or MSComm?
> 3) Why there are 2 different types of stacks?
> 4) How can I use widcomm stack using VB .NET?
>
> Your help will be appreciated
>

2) In the registry, if you see the key
HKEY_LOCAL_MACHINE\SOFTWARE\Widcomm\BtConfig
You've got widcomm stack. MS stack should be (I can't remeber well)
HKLM\SOFTWARE\Microsoft\Bluetooth

3) Because there is no well defined standards in bluetooth...
4) I think you _need_ the sdk (If i'm not wrong, it's about $1500). In
my app, doing some registry hack, I was just able to use one device at
time, only if it was the only one paired with the PDA. well... pretty
unuseful :)

Peter Foot [MVP]

unread,
Aug 10, 2004, 4:04:04 AM8/10/04
to
Devices using Microsoft Bluetooth stack:-

HTC
Himalaya (XDA2 etc)
Voyager (SPV E200 etc)
Typhoon (SPV C500 etc)
Motorola
MPx220
MPx

I expect there are more so I'd be interested if anyone can add to this list

Peter

"Steven Licciardi" <Steven_L...@nnoossppaammhotmail.com> wrote in
message news:upPVCAqf...@TK2MSFTNGP11.phx.gbl...

Darren Beckley

unread,
Aug 10, 2004, 8:52:10 AM8/10/04
to
Intermec 700 Series Color running Windows Mobile 2003 uses Microsoft
Bluetooth stack.

Darren

"Peter Foot [MVP]" <feed...@nospam-inthehand.com> wrote in message

news:umtscCrf...@TK2MSFTNGP12.phx.gbl...

0 new messages