我正在尝试在 Windows 7 上使用蓝牙。这是一台集成了蓝牙和戴尔驱动程序的戴尔笔记本电脑,我在 VS2012 的 C# 项目中使用 32feet 库。
我已经简化了这个函数,在程序启动时调用;
public static void Test()
{
Guid service = new Guid("{7A51FDC2-FDDF-4c9b-AFFC-98BCD91BF93B}");
BluetoothListener bl = new BluetoothListener(service);
bl.Start();
BluetoothClient bc = bl.AcceptBluetoothClient();
}
创建侦听器时,我收到错误“使用了与请求的协议不兼容的地址”。
此调用下游的堆栈跟踪是;
at System.Net.Sockets.Socket..ctor(AddressFamily addressFamily, SocketType socketType, ProtocolType protocolType)
at InTheHand.Net.Bluetooth.Msft.WindowsBluetoothListener.CreateSocket()
at InTheHand.Net.Bluetooth.Msft.WindowsBluetoothListener.Construct(Guid service)
at InTheHand.Net.Sockets.BluetoothListener..ctor(BluetoothFactory factory, Guid service)
at InTheHand.Net.Sockets.BluetoothListener..ctor(Guid service)
BluetoothRadio.IsSupported
属性TRUE
返回。
我已经做了一些谷歌搜索,但没有发现太多相关性。谁能建议从这里去哪里?