雷竞技电竞平台对话框半导体客户支持 - 连接;稳定 https://support.dialog-seminile.com/resource-keywords/connectionstability. EN. Connection stability problem https://support.dialog-semicondiondiondum/connection-tability-problus < div class = "字段field-name-taxonomy-forums字段-type-taxonomy-term-reference field-label-above">
Forums: 

Hi Dialog,

I am developing a pair of BLE device, both server and slave, base on DA14580. After connected to each other, even I leave these processor to be idle(no BLE read/write/notify, no i2c, gpio... active ) but they still disconnect randomly. It looks like one of them corrupts in link layer, because after disconnect they could not reconnect again. Below are the parameters I set for this connection and some wireshark captures.

msg->nb_peers = 1;
memcpy((void *) &msg->peers[0].addr, (void *)peer_addr, BD_ADDR_LEN);
msg->peers[0].addr_type = peer_addr_type;
msg->con_intv_max = 10;
msg->con_intv_min = 10;
msg->ce_len_max = 0x20;
msg->ce_len_min = 0x20;
msg->con_latency = 0;
msg->superv_to = 100;
msg->scan_interval = 0x180;
msg->scan_window = 0x160;
msg->op.code = GAPM_CONNECTION_DIRECT;

wireshark capture:

9796 61.273854000 Master Slave BLE Data 26 Empty Data PDU
9797 61.275295000 Slave Master BLE Data 26 Empty Data PDU
9798 61.286603000 Master Slave BLE Data 26 Empty Data PDU
9799 61.287569000 Slave Master BLE Data 26 Empty Data PDU
9800 61.298855000 Master Slave BLE Data 26 Empty Data PDU
9801 61.299789000 Slave Master BLE Data 26 Empty Data PDU
9802 62.320227000 ab_mat5 BLE ADV 48 ADV_IND
9803 62.321788000 ab_mat5 BLE ADV 48 ADV_IND

Server and client keep the connection for 60s and could not connect to each other anymore.

I could still see slave side advertising, but even use an Iphone with LightBlue application, I could not connect to the slave anymore.
Wireshark capture:
25 6.273182000 ab_mat4 BLE ADV 48 ADV_IND
26 6.274736000 50:0b:f8:18:ac:29 80:ea:ca:00:00:41 BLE ADV 60 CONNECT_REQ
27 6.276461000 Master Slave BLE Data 26 Empty Data PDU
28 6.303327000 Master Slave BLE Data 26 Empty Data PDU
29 6.333342000 Master Slave BLE Data 26 Empty Data PDU
30 6.363329000 Master Slave BLE Data 26 Empty Data PDU
31 6.393384000 Master Slave BLE Data 26 Empty Data PDU
32 6.423327000 Master Slave BLE Data 26 Empty Data PDU
33 6.453367000 Master Slave BLE Data 26 Empty Data PDU
34 6.483385000 Master Slave BLE Data 26 Empty Data PDU
35 6.513421000 Master Slave BLE Data 26 Empty Data PDU
36 6.543378000 Master Slave BLE Data 26 Empty Data PDU
37 6.573448000 Master Slave BLE Data 26 Empty Data PDU
38 6.603361000 Master Slave BLE Data 26 Empty Data PDU
39 6.633361000 Master Slave BLE Data 26 Empty Data PDU
40 7.640482000 ab_mat4 BLE ADV 48 ADV_IND
41 7.642505000 ab_mat4 BLE ADV 48 ADV_IND

In this test, I set the connection interval to be 12.5 ms. In this case, sever and client will disconnect randomly after 60 s to 45 mins they connect.

In my latter test, I change the connection interval to be 30ms. They could keep the connection much longer(more than 10 hours), but still they disconnect.

I would assume if I leave the processor in idle state, everything should handle by BLE stack automatically and sending empty to keep the connection should have nothing to do with my application code. Also, I not have any application activity at the time they disconnect.

Please help me to find the reason why the disconnect and how to improve the stability of the connection.

Thanks a lot.

Device: 
星期五,2016年1月22日15:16:45 +0000 Zwang308. 2611在https://support.dialog-semicondiondum. https://support.dialog-semicondiondiondum/connection-tability-problus#comments