3

我正在使用 IntheHand 32feet 库http://32feet.codeplex.com/ 我正在寻找代码来获取蓝牙适配器的本地 MAC 地址。我已经尝试过可能快速的调整,但没有像

using InTheHand.Net.Bluetooth;
using InTheHand.Net.Sockets;

          BluetoothListener btListener;
btListener.Server.AddressFamily.ToString(); 

但不起作用。请建议我获取地址的方式

4

1 回答 1

5

https://32feet.codeplex.com/wikipage?title=Local%20Radio%20Information

BluetoothRadio myRadio = BluetoothRadio.PrimaryRadio;
if (myRadio == null) {
    Console.WriteLine("No radio hardware or unsupported software stack");
    return;
}
RadioMode mode = myRadio.Mode;
// Warning: LocalAddress is null if the radio is powered-off.
Console.WriteLine("* Radio, address: {0:C}", myRadio.LocalAddress);
于 2014-05-03T19:38:57.940 回答