我正在使用TheHand库(32feet.NET) .
我有一个启用蓝牙的设备,我想将设备连接到我的计算机,然后将数据从设备发送到计算机 . 然后我想用我的程序捕获这些信息并进行处理 . 设备将发送3个变量(全部3个浮点数) .
我如何用蓝牙捕获这些信息?我之前从未在电脑上使用蓝牙 .
但是不知道我在做什么,所以我不能让它发挥作用 .
我正在使用Visual Studio 2017和Windows 10.我听说Windows 10存在问题并对蓝牙设备进行身份验证 .
感谢您的帮助!
更新:
static string domaciaddress = "MY_ADDRESS";
static string tujadress = "DEVICE_ADDRESS";
//reciever
private static BluetoothEndPoint EP = new BluetoothEndPoint(BluetoothAddress.Parse(domaciaddress), BluetoothService.BluetoothBase);
private static BluetoothClient BC = new BluetoothClient(EP);
//sender
private static BluetoothDeviceInfo BTDevice = new BluetoothDeviceInfo(BluetoothAddress.Parse(tujadress));
private static NetworkStream stream = null;
static void neke231(string[] args)
{