tags:

views:

308

answers:

2

I'm trying to write an application that gets the addresses of any bluetooth devices in range, no pairing or any transfer, just want the address that's all. Any advice where to start?

Many thanks ..

+1  A: 

Google turned up this:

BluetoothRadio.PrimaryRadio.Mode = RadioMode.Connectable;
BluetoothClient client = new BluetoothClient();
BluetoothDeviceInfo[] devices = client.DiscoverDevices();
foreach (BluetoothDeviceInfo device in devices)
{
    Console.WriteLine(device.DeviceAddress);
}
JoshJordan
Thanks for helping out a bluetooth newbie
Waleed Eissa
Hmm, may I ask where you found that code? I searched in google for that code and got the question page on SO. Google only returns pages for bluetooth components written by third-party companies, is there a bluetooth SDK for .NET from Microsoft?
Waleed Eissa
For the record, that code appears to be using the excellent InTheHand bluetooth library.
codekaizen
@codekaizen, thanks for pointing out this. I came across InTheHand but it seems to be more targeted on mobile platforms, I'm looking for something that works on XP and Vista, we'll have to check if it works with those. I also found the coding4fun kit which includes the bluetooth functionality I want, but it didn't work.
Waleed Eissa