我正在使用Android BLE API在Nexus 4上开发BLE应用程序。我有几个问题/疑问:
1)有没有办法设置/覆盖BLE中央设备的连接或通知间隔。我发现Android的默认连接间隔固定为7.5ms。有没有办法更改此连接/通知延迟间隔设置。
2)在连接远程设备时,我经常在随机的时间间隔内面临断开连接的问题。有很多人面临连接丢失问题,指出Android在使用Android 4.3 API进行BLE连接时不稳定。有没有解决方案?
编辑
还有什么我在这里观察的是当它需要时间来重新连接,那么它随着一些L2CAP日志…跟随日志
Trying to create a new connection laststate_ BOND_NONE
D/BluetoothGatt( 9620): connect() - device: 1C:BA:81:11:CA:36, auto: true
D/BluetoothGatt( 9620): registerApp()
D/BluetoothGatt( 9620): registerApp() - UUID=1a9a0911-4d5c-41dc-8ac0-0284ef550510
D/BtGatt.GattService( 3208): registerClient() - UUID=1adsds0911-4sdsc-41dc-8ac0-0sdsdf550510
D/BtGatt.btif( 3208): btif_gattc_register_app
D/BtGatt.btif( 3208): btgattc_handle_event: Event 1000
D/BtGatt.btif( 3208): btif_gattc_upstreams_evt: Event 0
D/BtGatt.GattService( 3208): onClientRegistered() - UUID=1a9a0911-4d5c-41dc-8ac0-0284ef550510, clientIf=5
D/BluetoothGatt( 9620): onClientRegistered() - status=0 clientIf=5
D/BtGatt.GattService( 3208): clientConnect() - address=1C:BA:8C:1E:CA:36, isDirect=true
D/BtGatt.btif( 3208): btif_gattc_open
D/BtGatt.btif( 3208): btgattc_handle_event: Event 1004
D/BtGatt.btif( 3208): btif_get_device_type: Device [1c:ba:8c:1e:ca:36] type 2, addr. type 0
W/bt-l2cap( 3208): L2CAP - LE - cannot start new connection at conn st: 3
任何想法如何可以通过L2CAP清除cahce mantain?