通过蓝牙SNP连接PC

时间:2010-05-06 13:12:51

标签: android bluetooth

我有一个widcomm示例BluChat“WIDCOMM SDK RFComm Service”在我的PC上运行,带有USB加密狗(BT-2400P)。我想从我的HTC Desire连接这个聊天。所以我盯着Java示例http://developer.android.com/resources/samples/BluetoothChat/index.html。这也是使用BT RFComm。如果我使用我的HTC作为服务器它工作正常,但我想使用我的PC作为服务器。然后.connect()返回“Service Discovery Failure”。

我修改了Java示例中的UUID字符串以匹配PC应用程序

       mmSocket = mmDevice.createRfcommSocketToServiceRecord(UUID.fromString("5fc2a42e-144e-4bb5-b43f-4e61711d1c32"));
        mmSocket.connect();

缺少什么?

任何帮助表示感谢。

尼古拉斯

2 个答案:

答案 0 :(得分:0)

抱歉,标题中应该是SDP。

无论如何,这可能是这个错误吗? http://groups.google.com/group/android-developers/browse_thread/thread/348c269f2ef88327/ecdf3268e9c58507

答案 1 :(得分:0)

就像通知读取此帖子的其他用户一样:这个问题似乎与android 2.1有关。升级后,它可以在2.2下正常工作。

BR Nicholas

相关问题