我正在使用IntheHand 32feet库http://32feet.codeplex.com/ 我正在寻找一个代码来获取蓝牙适配器的本地MAC地址。我试过可以快速调整但不能像
那样工作using InTheHand.Net.Bluetooth;
using InTheHand.Net.Sockets;
和
BluetoothListener btListener;
btListener.Server.AddressFamily.ToString();
但不起作用。请建议我获取地址的方式
答案 0 :(得分:3)
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);