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

Random disconnect -> timeout 0x08

Hi, i got a random disconnect and cant find the cause. I found this post devzone.nordicsemi.com/.../ and tried to folow the procedure.

I have set up breakpoints wherever sd_ble_gap_disconnect() is called.

  • on_conn_params_evt() line 183:
  • on_ble_evt() line 302 case BLE_GATTC_EVT_TIMEOUT
  • on_ble_evt() line 310 case BLE_GATTS_EVT_TIMEOUT
  • bsp_event_handler() line 431 case BSP_EVENT_DISCONNECT

but none of this are trigered.

But when i put a breakpoint

  • on_ble_evt() line 282 case BLE_GAP_EVT_DISCONNECTED

and look for a p_ble_evt->evt.gap_evt.params.disconnected.reason i got BLE_HCI_CONNECTION_TIMEOUT (0x08).

I can't find what made the disconnect and where it came from. What should i do?

Parents
  • Ok. That's good. It is actually the central device that dictates the supervision timeout. You can check it when you get the BLE_GAP_EVT_CONNECTED event:

    p_ble_evt->evt.gap_evt.params.connected.conn_params.conn_sup_timeout
    

    You should also check it when you get the BLE_GAP_EVT_CONN_PARAM_UPDATE event.

    But if you have tested with several central devices I believe this is a dead end, you could check it to be sure of course.

    Ohh, I thought you were using one of our DKs, the PCA10040, not a module. Then it could be a crystal issue. The PCA100040 has a LF crystal with 20 ppm, and this is what the examples assume is used. If the ppm of the crystal used in Nina-B1 is higher than 20 ppm you can see issues like this. I had a look at the datasheet, but I was able to find the and ppm value for the crystal used.

Reply
  • Ok. That's good. It is actually the central device that dictates the supervision timeout. You can check it when you get the BLE_GAP_EVT_CONNECTED event:

    p_ble_evt->evt.gap_evt.params.connected.conn_params.conn_sup_timeout
    

    You should also check it when you get the BLE_GAP_EVT_CONN_PARAM_UPDATE event.

    But if you have tested with several central devices I believe this is a dead end, you could check it to be sure of course.

    Ohh, I thought you were using one of our DKs, the PCA10040, not a module. Then it could be a crystal issue. The PCA100040 has a LF crystal with 20 ppm, and this is what the examples assume is used. If the ppm of the crystal used in Nina-B1 is higher than 20 ppm you can see issues like this. I had a look at the datasheet, but I was able to find the and ppm value for the crystal used.

Children
No Data
Related