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

M_Coms: packet lost on Smart Remote

Hi all,

I am working on the Smart remote and when "spamming" a lot of key simultaneously, I sometimes get a warning "m_coms : packet lost" and then a disconnection.

And then even when coming back into a normal use of the remote, I reconnect and but I still get the warning and no keys are sent.

Is there a way to increase the queue size to avoid this issue? How can I resolve this?

Thanks in advance,

Sylvain

  • Hi sguitton01, 

    the queues are initialized in m_coms.c (serach for NRF_QUEUE_DEF) and their size is determined by the CONFIG_AUDIO_FRAME_POOL_SIZE. This define is used for all the queues, i.e. keys, audio and AATV for some reason.

    typedef struct
    {
        m_coms_data_desc_t *p_current_data_desc;     /**< Descriptor of the data that is currently transmitted. */
        const nrf_queue_t  *p_backlog;               /**< Transmission queue. */
    } m_coms_channel_t;
    
    #if CONFIG_AUDIO_ENABLED && CONFIG_AUDIO_HID_ENABLED
    static m_coms_channel_t m_coms_audio_hid_channel;  /**< Audio channel (HID service) */
    
    /**@brief Backlog queue for audio channel. */
    NRF_QUEUE_DEF(m_coms_data_desc_t *,
                  m_coms_audio_hid_channel_backlog,
                  (CONFIG_AUDIO_FRAME_POOL_SIZE - 1),
                  NRF_QUEUE_MODE_NO_OVERFLOW);
    #endif /* CONFIG_AUDIO_ENABLED && CONFIG_AUDIO_HID_ENABLED */
    
    #if CONFIG_AUDIO_ENABLED && CONFIG_AUDIO_ATVV_ENABLED
    static m_coms_channel_t m_coms_audio_atvv_channel; /**< Audio channel (ATVV service) */
    
    /**@brief Backlog queue for audio channel. */
    NRF_QUEUE_DEF(m_coms_data_desc_t *,
                  m_coms_audio_atvv_channel_backlog,
                  (CONFIG_AUDIO_FRAME_POOL_SIZE - 1),
                  NRF_QUEUE_MODE_NO_OVERFLOW);
    #endif /* CONFIG_AUDIO_ENABLED && CONFIG_AUDIO_ATVV_ENABLED */
    
    static m_coms_channel_t m_coms_keys_channel;       /**< Keys channel. */
    
    /**@brief Backlog queue for keys channel. */
    NRF_QUEUE_DEF(m_coms_data_desc_t *,
                  m_coms_keys_channel_backlog,
                  (CONFIG_AUDIO_FRAME_POOL_SIZE - 1),
                  NRF_QUEUE_MODE_NO_OVERFLOW);

    So try to increase the CONFIG_AUDIO_FRAME_POOL_SIZE in teh sr3_config_nrf52832_pca63519\pca20023\custom.h file and see if that resolves the issue. 

    Best regards

    Bjørn

Related