recv_cb,periodic_sync_conn

HI
I’m doing secondary development based on periodic_sync_conn in NCS 3.2.1.
After establishing a periodic advertising sync, I have two issues:
  1. Sometimes the buf is NULL in the recv_cb callback.
  2. Sometimes the recv_cb callback is not entered at all.
By looking at the Zephyr Bluetooth host code in scan.c, I found:
  • The buf == NULL case is caused by evt->data_status == BT_HCI_LE_ADV_EVT_TYPE_DATA_STATUS_RX_FAILED
  • The recv_cb not entered case is caused by *buf->len < sizeof(evt)
What could be the root causes for these two issues?
Thanks!
  • Hello,

    buf == NULL means controller reports RX_FAILED: usually RF packet loss or missed chained periodic advertising fragments (weak signal, interference, long payloads).
    recv_cb not called means event dropped because it’s truncated/invalid (buf->len < evt): typically HCI transport issues or controller buffer/overflow problems.

    Point rightThey’re usually related unstable reception (air) + occasional host/controller data loss (transport/buffers).

Related