互联网上有很多例子展示了如何编写一个应用程序,让我们可以通过蓝牙从移动电话上与pc进行通信。但我要做的是通过蓝牙从一台电脑上控制另一台电脑。我正在尝试使用蓝牙库。我在一台pc上运行服务器,并使用下面的示例尝试从另一台pc连接:http://bluecove.googlecode.com/svn/trunk/bluecove/src/test/java/com/intel/bluetooth/javadoc/
它会找到设备:
Device BC7737946D89 found
name TN-RR-LAP
Device Inquiry completed!
search services on BC7737946D89 TN-RR-LAP
service search completed!但是当它尝试连接时,我得到了以下错误:
Connecting to btspp://BC7737946D89:9;authenticate=false;encrypt=false;master=false
Exception in thread "main" javax.bluetooth.BluetoothConnectionException: Failed to connect; [10064] A socket operation failed because the destination host was down.
at com.intel.bluetooth.BluetoothStackMicrosoft.connect(Native Method)
BlueCove stack shutdown completed
at com.intel.bluetooth.BluetoothStackMicrosoft.access$700(BluetoothStackMicrosoft.java:44)
at com.intel.bluetooth.BluetoothStackMicrosoft$ConnectThread.run(BluetoothStackMicrosoft.java:651)
Java Result: 1有人知道怎么解决这个问题吗?
发布于 2013-10-29 15:14:14
如果您想要从PC传输到PC,我建议使用btgoep://bluetoothaddress:2,它应该可以工作。
https://stackoverflow.com/questions/11830861
复制相似问题