我正在使用 IntheHand 32feet 库 http://32feet.codeplex.com/ 我正在搜索代码以获取蓝牙适配器的本地 MAC 地址。我已经尝试过快速调整,但效果不佳
using InTheHand.Net.Bluetooth;
using InTheHand.Net.Sockets;
和
BluetoothListener btListener;
btListener.Server.AddressFamily.ToString();
但不起作用。请建议我获取地址的方式
最佳答案
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);
关于我们适配器的 c# 蓝牙 Mac 地址,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23431071/