目前正在编写一个应用程序连接到设备“BTLink Bluetooth to Serial Adapter”
有关设备的更多信息:设备规范 创建了这样的代码:
BluetoothAddress btAddress = null;
if (!BluetoothAddress.TryParse(comboBoxDevices.SelectedValue.ToString().Trim(), out btAddress))
throw new Exception(String.Format("Adress: {0} wrong !", comboBoxDevices.SelectedValue.ToString().Trim()));
BluetoothEndPoint endPoint = new BluetoothEndPoint(btAddress, BluetoothService.DialupNetworking);
_bluetoothClient.Connect(endPoint);
我测试了两种类型的 GUID:BluetoothService.DialupNetworking、BluetoothService.SerialPort。我收到这条消息:“无法建立连接,因为目标机器主动拒绝了它”这是怎么回事?
最好的问候, mykhaylo