Android蓝牙套接字错误

时间:2011-01-04 03:51:06

标签: android sockets bluetooth backport

我在Android 1.6上使用backport bluetooth api。我正在使用Google蓝牙聊天示例应用进行测试。该应用程序在正常情况下工作正常。

在某种情况下,当我尝试连接处于关闭状态的配对设备时,我收到以下错误:

01-04 09:00:11.629: ERROR/BluetoothEventLoop.cpp(84): onGetRemoteServiceChannelResult: D-Bus error: org.bluez.Error.ConnectionAttemptFailed (Host is down)
01-04 09:00:11.729: DEBUG/dalvikvm(128): GC freed 4535 objects / 256008 bytes in 296ms
01-04 09:00:21.880: ERROR/bluetooth_RfcommSocket.cpp(1433): connect error: Host is down (112)

但它将状态设置为连接。该应用程序无法捕获异常 为什么会这样?或者是backport api的情况呢? 任何帮助都会受到赞赏,因为我正在努力让事情顺利进行。

1 个答案:

答案 0 :(得分:1)

我刚刚发现这是api中的一个缺陷 请检查:http://code.google.com/p/backport-android-bluetooth/issues/detail?id=15