Waleed Eissa
Waleed Eissa

Reputation: 10533

Getting the address of a bluetooth device

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 ..

Upvotes: 0

Views: 6346

Answers (1)

JoshJordan
JoshJordan

Reputation: 12975

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);
}

Upvotes: 2

Related Questions