Bluetooth - Discovering Devices

  • Thread starter Thiago Avancini
  • Start date
T

Thiago Avancini

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!
 
P

Paul G. Tobey [eMVP]

And why does it not work for you?

Paul T.

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!
 
T

Thiago Avancini

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.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 And why does it not work for you?

Paul T.

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!
 
P

Peter Foot [MVP]

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

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!
 
P

Paul G. Tobey [eMVP]

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.

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.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 And why does it not work for you?

Paul T.

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!
 
T

Thiago Avancini

Hi Peter,

Thanks for the reply.

I will study the possibility to acquire this SDK.

Thanks!
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

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!
 
G

Guest

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
 
S

Steven Licciardi

Can you tell me of any devices that use the Microsoft Bluetooth Stack?

Steven
 
F

Francesco

Mohit Gupta said:
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 :)
 
P

Peter Foot [MVP]

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
 
D

Darren Beckley

Intermec 700 Series Color running Windows Mobile 2003 uses Microsoft
Bluetooth stack.

Darren
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top