This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Using nrfsniffer to debug connection loss

I am trying to use nrfsniffer to debug connection related issues.

We have a ble connection between central and peripheral and we are sending status updates to the peripheral fro the central at a rate of about 1 per second.

We have issues with the conenction and connection is regularly dropped and rebuilt. I can run this test walking arounf out side for say an hour and I regularly see the central indicating connection loss and connection being rebuilt.

If I try and trace this with wireshark and nrf52 dk I see all the packets from the first period of connection; but on the subsequent reconnections I only see the connection req/ind from the central; I do not see the complete trace of packets between the central and peripheral.

I am using wireshark 3.4.4 and nrf_sniffer_for_bluetooth_le_3.1.0_7cc811f.

We are seeing large gaps in the status update received by the peripheral and we suspect this is in actuality long periods of BLE not having a valid connection; hence we wish to see complete traces over these connect/disconnect cycles to try and debug the problems.


Or is snrfsniffer and wireshark just really not up to debugging  such problems?


Parents
  • This should work, I have done this many times and can sniff subsequent connections.

    Maybe you are stopping and starting the sniffer between connections here? Can you share a log file that show what you describe?

    Kenneth

  • Here the trace file12-03-21-1730-ladybayHookLoop.pcapng

    #1755 initial connection made
    #71263 Starts having connection issues / bad sequence numbers
    #71718 peripheral starts advertising again
    #71726 connects again; but does not decode/filters out peripheral packets>

    Just see advertising/connection indicators till end of trace as sniffer had dropped filtered out packets.

  • What happens here is that the central send a connection request, but the connection request is not received by the peripheral. In such case the central will try for some attempts before giving up and try again. This is something that can happens from time to time due to noise, but if it always occurs (which seems to be the case). Then I suspect that the peripheral have not included the central in it's whitelist when advertising, and thereby don't allow the central to connect. None of the connections after 71727 is successful (you can see the SN and NESN don't increment). It doesn't look like any bonding is involved, so I don't expect you are using whitelist on the peripheral (at least you should not be)?

    Kenneth

  • I just ran another test putting the peripheral into a microwave; not turned on :-)

    I see behaviour as in last trace; but as I bring the peripheral out of the microwave; my central reconencts OK, but the sniffer stops logging packets.

    I have sniffer FW on a pca10040 dev card; and normally when its running I see a couple of leds flashing tx and rx? When it stops logging those leds stop as well; they only start flashing if I reset the dev card (sniffer).

    Has sniffer crashed when my device successfully reconnects?

    I blew hex onto sniffer by copying the hex to the segger mass storage device; I did not flash it via ICE. Is my problem with the sniffer itself?

    Many thanks for analysis above; we are not using whitelists/blacklists. It looks like that test trace you see did catch my issue; sporadic disconnects for a substantial period before a successful reconnect. The big question is why is the peripheral

    The confusing thing is the "crashed" sniffer; so I suspect in the trace I uploaded the last sampes seen are where the central successfully reconnected (and crashed the sniffer).

    Although at end of trace those LL_VERSION_IND''s are showing bad sequence numbers.

  • OwainIncus said:
    I have sniffer FW on a pca10040 dev card; and normally when its running I see a couple of leds flashing tx and rx? When it stops logging those leds stop as well; they only start flashing if I reset the dev card (sniffer).

    That may indicate some issues with the board, do you have a second pca10040 you can use for test? What is the marking on the pca10040 you are using? Can you try to connect the board to a different USB hub/port and possible replace the USB cable? Also update for instance segger j-link from:
    https://www.nordicsemi.com/Software-and-tools/Development-Tools/nRF-Command-Line-Tools/Download

    Kenneth

Reply Children
No Data
Related