Supervision timeout does not expire during 120hz data streaming

Hi,

I am using an two nrf5340 with hci_ipc enabled one acting as central and one as peripheral built on v2.9.0

The issue I am having is that the supervision timeout doesn't expire when I hard reset the peripheral whilst sending data (len 91) via notifications at 120hz .

My current fix is to set CONFIG_BT_ATT_LOG_LEVEL_DBG=y which then doesn't miss a supervision timeout event. This doesn't feel like a good long term solution to fixing whatever timing issue this is. Please could you help me.  

Problem Flow from Central perspective:

  1. Scan and connect
  2. Characteristic and CCC descriptor discovery
  3. Enable Notifications
  4. Central MTU Updated TX: 247 RX: 247 bytes
  5. PHY updated: TX PHY 2M, RX PHY 2M
  6. Connection Params:interval 7.50 ms, latency 1, timeout 100 ms
  7. start stream data over notifications at 120hz
  8. wait 3 seconds
  9. Hit reset on peripheral 
  10. Central Hangs indefinitely with no supervision timeout 
  • Hi,

    I see the same behaviour as before when I check out your updated code. Typically I am able to connect, start streaming and reset the peripheral and re-connect 3 times. After that I get a fault. Interestingly, if I do changes the fault moves around (as seen with addr2line on the faulting address). This erratic behaviour indicate a memory corruption issue to me (perhaps writing to invalid memory by corrupt pointers, writing out of bound to arrays, or similar), but I have not found the root cause of it.

  • Would this explain why I’m not seeing supervision timeout though? 
    Or why slowing down the process down by enabling log minimal + att debug would enable it to work correctly? 

    I’m also still confused why I don’t see supervision timeout but you do! 

  • Yese, it is odd that I never reproduce the same behaviour on my end. But if there are memory corruption issues (which is just a hunch for now, but I have no better suggestion at the moment), it can manifest itself in many different ways. And even if buildign teh same project but with different toolchain or platform, you will typically see different behaviours (if for instance there is an array or buffer being written out of bonds, and whatever is next to it in RAM chagne, the behaviour will change).

Related