【发布时间】:2018-11-29 18:35:58
【问题描述】:
这可能很微妙:
我为 Android 6 开发了一个应用程序,它可以在 Bixolon SPP-R-200II 上打印多张收据。首先,正常方式工作正常,连接、打印等看起来不错。
由于测试,我遇到了一个特殊错误。有时打印在完成之前就停止了。日志显示:
06-20 15:04:17.456 5369-5393/? W/bt_rfcomm: port_rfc_closed RFCOMM connection in state 2 closed: Peer connection failed (res: 16)
06-20 15:04:17.457 5369-5397/? E/bt_btif_sock_rfcomm: find_rfc_slot_by_id unable to find RFCOMM slot id: 7
06-20 15:04:17.463 5369-5393/? I/bt_btm_sec: btm_sec_disconnected clearing pending flag handle:2 reason:8
06-20 15:04:17.463 5369-5393/? W/bt_l2cap: L2CA_SetDesireRole() new:x0, disallow_switch:0
L2CA_SetDesireRole() new:x0, disallow_switch:0
06-20 15:04:17.463 5369-5387/? E/BluetoothRemoteDevices: state12newState1
06-20 15:04:17.463 5369-5387/? D/BluetoothRemoteDevices: aclStateChangeCallback: sending ACL disconnected intent
06-20 15:04:17.464 5369-5387/? D/BluetoothRemoteDevices: aclStateChangeCallback: State:DisConnected to Device:74:F0:7D:E4:8E:3C
06-20 15:04:17.466 5369-5369/? D/BluetoothMapService: onReceive
onReceive: android.bluetooth.device.action.ACL_DISCONNECTED
06-20 15:04:17.468 5369-5369/? V/BluetoothPbapService: action: android.bluetooth.device.action.ACL_DISCONNECTED
06-20 15:04:17.472 5369-5369/? V/BluetoothFtpService: Ftp Service onStartCommand
PARSE INTENT action: android.bluetooth.device.action.ACL_DISCONNECTED
06-20 15:04:17.475 5369-5369/? D/BluetoothDunService: parseIntent: action: android.bluetooth.device.action.ACL_DISCONNECTED
我发现 Android 4 和更新版本的 BT 堆栈存在一些问题,设备具有 BT 模块 Gen 2 或 3。这似乎是这里的问题,因为 BT Gen 1 的旧打印机工作正常,其他人在 50% 的时间里都没有。
是否有任何解决方法/修复?
【问题讨论】:
标签: android bluetooth spp bixolon-printer