我们适配器的 c# 蓝牙 Mac 地址

标签 c# .net bluetooth 32feet

我正在使用 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/

相关文章:

c# - WIX-- 自动更新

c# - 如何使用 Entity Framework 将 DbContext 添加到具有复合主键的实体

c# - 如何在 C# 中向图标添加文本?

android - 当移动设备在 Android 中使用蓝牙连接时如何连接移动设备详细信息

ios - 如何使用 Meteor/Cordova iOS 应用修复 waitForSyncReply 超时?

c# - 并行类不提供任何加速

c# - page.CheckOut() 抛出 SPException : URL is invalid even though page exists

c# - WCF - 查看对安全 Web 服务的 XML 请求/响应

c# - 适用于 .Net 的新 Relic 插件 SDK

bluetooth - 从 PC 模拟蓝牙设备