diff --git a/src/main.c b/src/main.c index dd7d890..4acceb5 100644 --- a/src/main.c +++ b/src/main.c @@ -636,6 +636,7 @@ static void tx_thread(void) while ((buf = net_buf_get(&h5.controller_queue, K_MSEC(100)))) { bt_send(buf); } + LOG_DBG("controller_queue empty"); /* buf is dequeued from tx_queue and queued to unack * queue. @@ -907,7 +908,11 @@ void main(void) h5_init(); while (true) { - buf = net_buf_get(&h5.host_queue, K_FOREVER); + buf = net_buf_get(&h5.host_queue, K_MSEC(1000)); + if (!buf) { + LOG_WRN("host_queue is empty"); + continue; + } switch (h5.link_state) { case UNINIT: