some reasons cause "No connection for handle 0"

Hi, nordic team

There is an issuse happened in my custom board with nrf52833,programming in ncs v2.9.0.

peripheral side is programmed base on peripheral_hid_keyboard and central is programmed base on central_hids

When continuesly work serveal hours, it is possible for peripheral to output "No conntion for handle 0".

I find it is ouput in v2.9.0\zephyr\subsys\bluetooth\host\hci_core.c  line 581(static void hci_num_completed_packets(struct net_buf *buf) API).

I wonder which situations will result in this log output?

Best regard,

Martin

Parents
  • Hi,

    This might sometimes happen for a connection that has just recently terminated (e.g. from a timeout.) In that case it is the result of a race condition where the BLE host doesn't yet know that the connection is terminated, when it sends certain messages to the controller, referring to the (now disconnected) connection.

    Regards,
    Terje

Reply
  • Hi,

    This might sometimes happen for a connection that has just recently terminated (e.g. from a timeout.) In that case it is the result of a race condition where the BLE host doesn't yet know that the connection is terminated, when it sends certain messages to the controller, referring to the (now disconnected) connection.

    Regards,
    Terje

Children
  • Hi,

    Thanks for response,But if connection is terminated,for peripheral side, disconnected API will be called, but not.Thats confused.

    The last log is normal , but the next is "No connection for handle 0"

    E: No connection for handle 0                                   
    E: No connection for handle 0                                   
    W: Not able to allocate UART receive buffer, UART_RX_BUF_REQUEST
    W: Not able to allocate UART receive buffer, UART_RX_DISABLED   
    W: Not able to allocate UART receive buffer                     
    W: Not able to allocate UART receive buffer                     
    W: Not able to allocate UART receive buffer                     
    W: Not able to allocate UART receive buffer                     
    W: Not able to allocate UART receive buffer                     
    W: Not able to allocate UART receive buffer                     
    W: Not able to allocate UART receive buffer                     
    W: Not able to allocate UART receive buffer                     
    W: Not able to allocate UART receive buffer                     
    W: Not able to allocate UART receive buffer                     
    W: Not able to allocate UART receive buffer                     
    W: Not able to allocate UART receive buffer                     
    W: Not able to allocate UART receive buffer                     
    W: Not able to allocate UART receive buffer                     
    W: Not able to allocate UART receive buffer                     
    W: Not able to allocate UART receive buffer                     
    W: Not able to allocate UART receive buffer                     
    W: Not able to allocate UART receive buffer                     

  • Hi,

    Again, this typically happens if the connection has terminated. It could also happen if a connection was initiated, but the peer does not receive the packet initiating the connection. The connection will then time out. In all cases it comes from a call getting called which requires a connection, but the connection does no longer exist.

    If you want to figure out the exact reason, then there might be some clues to what happened in log lines before the "No connection for handle 0" log output, or you could see what is happening over-the-air from a sniffer log.

    Regards,
    Terje

Related