Hi Nordic guys,
we are developing a peripheral device with a custom protocol to exchange data.
we are using nrf51822 with SDK 6.0 and SoftDevice 7.1.0 (s110 being peripheral).
During a file transfer scenario where a phone is sending data via ATT write at a certain point it sends out unexpected packet with L2CAP channel ID zero and all payload to zero (most likely BT controller on phone is mis-behaving). This lasts a while but less than link timeout and the BT controller recovers on phone.
Anyway it seems that Nordic is disconnecting on the reception of this unexpected L2CAP channel id ZERO, w/o rebooting, just disconnecting and our app code re-starts advertising.
We know that phone is misbehaving but I would not expect Nordic disconnect on L2CAP ch_id = 0 reception but just trash it so that when phone BT controller re-start to send good data it will be still there serving connection.
I'm attaching FTS traces and extract below interesting ones.
Let me know if you see something else that justify Nordic behavior and in case this has been changed in a later SoftDevice.
Many Thanks
Roberto
--> here phone is sending file via ATT write and wait a notification back from Nordic
8,653 Master Write Command 18 Unknown UUID [0xb269] dde65d9b(S) 35 00:00:00.000709 11/16/2015 5:51:20.978687 PM
--> here the notification sent back by device. Highlighting both LE Data dn ATT tabs
--> LE Data tab
8,657 22 0xdde65d9b 0x0362 1 Empty 0 0 0 0 18 00:00:00.035008 11/16/2015 5:51:21.014060 PM
8,658 22 0xdde65d9b 0x0362 S Start 1 0 0 13 31 00:00:00.000230 11/16/2015 5:51:21.014290 PM
--> ATT notification from Nordic
8,658 Slave Handle Value Notification 20 Unknown UUID [0x5b40] dde65d9b(S) 31 00:00:00.035603 11/16/2015 5:51:21.014290 PM
Here we should expect a packet from master that seems to not be traced, but there is a slave answer sending back the same previous packet.Most likeey sniffer has missed one packet from master and in this packet master is not ack previous packet from slave that is resent
8,662 28 0xdde65d9b 0x0363 S Start 1 0 0 13 31 00:00:00.037747 11/16/2015 5:51:21.052037 PM
######## here the point
--> here master sends a wrong packet in L2CAP info and channel
8,671 34 0xdde65d9b 0x0364 M Start 1 1 1 31 49 00:00:00.037023 11/16/2015 5:51:21.089060 PM
Channel ID: 0x0000 (Illegal) [Should not be used]
L2CAP Payload: 0x 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
--> master still sending packets at correct 37.5 ms... but always zeroing it....
--> this is not normal since it seems device start again to advertise before link loss of 1 seconds.
8,680 37 ADV_IND (pub) 0x9ca134311524 35 53 00:00:00.020942 11/16/2015 5:51:21.172380 PM
--> only here master recover sending proper packet
8,856 Master Write Command 18 Unknown UUID [0xb269] dde65d9b(S) 49 00:00:00.749770 11/16/2015 5:51:21.764060 PM
and resend till it has detected link timeout
8,930 36 0xdde65d9b 0x037d M Start 1 1 1 31 49 00:00:00.037500 11/16/2015 5:51:22.026560 PM