Android的蓝牙java.io.IOException异常:连接被拒绝? [英] Android Bluetooth java.io.IOException: Connection refused?

查看:535
本文介绍了Android的蓝牙java.io.IOException异常:连接被拒绝?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要连接一个 KwikBlue-2模块开发套件到Android BluetoothChat例如的使用SPP一个的Nexus One。 我可以用万亿长期变化的UUID中的 BluetoothChat例如的例子来00001101-0000-1000-8000-00805F9B34FB的SPP设备。 然后我重新加电的 KwikBlue-2模块开发套件以验证连接是重复的,但不断得到 java.io.IOException异常:连接被拒绝当我尝试连接。 任何想法?

  43.200:ERROR / BluetoothEventLoop.cpp(96):event_filter:接收信号org.bluez.Adapter:从/组织/的bluez / 219 / hci0的PropertyChanged
52.200:ERROR / BluetoothChat(707): - 在暂停 - 
54.470:ERROR / BluetoothService.cpp(96):stopDiscoveryNative:在StopDiscovery的D-Bus错误:org.bluez.Error.Failed(无效发现会话)
54.520:ERROR / BluetoothChat(707):+ On恢复+
54.530:ERROR / BluetoothService.cpp(96):stopDiscoveryNative:在StopDiscovery的D-Bus错误:org.bluez.Error.Failed(无效发现会话)
54.620:ERROR / BluetoothService.cpp(96):stopDiscoveryNative:在StopDiscovery的D-Bus错误:org.bluez.Error.Failed(无效发现会话)
55.520:ERROR / BluetoothEventLoop.cpp(96):event_filter:接收信号org.bluez.Device:从的PropertyChanged /组织/的bluez / 219 / hci0 / dev_00_60_57_FD_42_18
56.010:ERROR / BluetoothChatService(707):无法连接
56.010:ERROR / BluetoothChatService(707):java.io.IOException异常:连接被拒绝
56.010:ERROR / BluetoothChatService(707):在android.bluetooth.BluetoothSocket.connectNative(本机方法)
56.010:ERROR / BluetoothChatService(707):在android.bluetooth.BluetoothSocket.connect(BluetoothSocket.java:204)
56.010:ERROR / BluetoothChatService(707):在com.cti.BluetoothChat.BluetoothChatService $ ConnectThread.run(BluetoothChatService.java:329)
00.110:ERROR / BluetoothEventLoop.cpp(96):event_filter:接收信号org.bluez.Device:从的PropertyChanged /组织/的bluez / 219 / hci0 / dev_00_60_57_FD_42_18
 

解决方案

尝试取消配对/修复,然后会再次合作。这似乎是与核心蓝牙支持Android上的错误。

I need to connect a KwikBlue-2 Module Development Kit to the Android BluetoothChat example on a Nexus One using SPP. I was able to connect and exchange serial data (once) using tera term after changing the UUID in the BluetoothChat example example to 00001101-0000-1000-8000-00805F9B34FB for SPP devices. Then I power cycled the KwikBlue-2 Module Development Kit to verify that the connection was repeatable but continually get java.io.IOException: Connection refused when I try to connect. Any ideas?

43.200: ERROR/BluetoothEventLoop.cpp(96): event_filter: Received signal org.bluez.Adapter:PropertyChanged from /org/bluez/219/hci0
52.200: ERROR/BluetoothChat(707): - ON PAUSE -
54.470: ERROR/BluetoothService.cpp(96): stopDiscoveryNative: D-Bus error in StopDiscovery: org.bluez.Error.Failed (Invalid discovery session)
54.520: ERROR/BluetoothChat(707): + ON RESUME +
54.530: ERROR/BluetoothService.cpp(96): stopDiscoveryNative: D-Bus error in StopDiscovery: org.bluez.Error.Failed (Invalid discovery session)
54.620: ERROR/BluetoothService.cpp(96): stopDiscoveryNative: D-Bus error in StopDiscovery: org.bluez.Error.Failed (Invalid discovery session)
55.520: ERROR/BluetoothEventLoop.cpp(96): event_filter: Received signal org.bluez.Device:PropertyChanged from /org/bluez/219/hci0/dev_00_60_57_FD_42_18
56.010: ERROR/BluetoothChatService(707): unable to connect
56.010: ERROR/BluetoothChatService(707): java.io.IOException: Connection refused
56.010: ERROR/BluetoothChatService(707):     at android.bluetooth.BluetoothSocket.connectNative(Native Method)
56.010: ERROR/BluetoothChatService(707):     at android.bluetooth.BluetoothSocket.connect(BluetoothSocket.java:204)
56.010: ERROR/BluetoothChatService(707):     at com.cti.BluetoothChat.BluetoothChatService$ConnectThread.run(BluetoothChatService.java:329)
00.110: ERROR/BluetoothEventLoop.cpp(96): event_filter: Received signal org.bluez.Device:PropertyChanged from /org/bluez/219/hci0/dev_00_60_57_FD_42_18

解决方案

Try unpair/repair and then it may work once again. This seems to be a bug with the core Bluetooth support on Android.

这篇关于Android的蓝牙java.io.IOException异常:连接被拒绝?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆