android ble连接不稳定,Android BLE连接时间间隔

我正在使用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?

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值