asset tracker v2 pending messages in sending queue

Hi All!

I am using nrf9160Dk, asset tracker v2, NCS 2.40 nrf cloud, and VScode studio.

My question is that I am sending packets/ data (50 bytes) from nrf52833Dk serial to nrf9160Dk after every 5 sec or less. And nrf9160 after reading the packet add its own header and send it to nrfcloud. All processes is working fine!. Now the issue is that, is it possible that I know the message queue in the nrf9160 end? Or how many messages are in a queue/ ready for transmission to the nrf cloud? Basically, I want to know how much congestion/how much nrf9160 is busy.

Thanks & Regards,

  • Hello, 

    I am sending packets/ data (50 bytes) from nrf52833Dk serial to nrf9160Dk after every 5 sec or les

    Is this something you have added to the Asset Tracker? 

    Or how many messages are in a queue/ ready for transmission to the nrf cloud?

    How does your message queue work? Is this something proprietary from the nRF Connect SDK? 

    Kind regards,
    Øyvind

  • Hello,

     Thank you for response!

    Is this something you have added to the Asset Tracker?

    yes, when the asset tracker app, receives(nrf52833 connected via uart) a specific packet then it forwards it to the nrf cloud.

    How does your message queue work? Is this something proprietary from the nRF Connect SDK? 

    Sorry, this thing I want to ask, in my code I stored the packet in an array coming from nrf52833 and sent it to the cloud. And when incoming packet frequency increases it resets the nrf9160.Any solution regarding that? 

    Is there anything implemented in asset tracker v2, which stores the incoming packets in a queue and sends them one by one and we come to know how many packets are in the queue?

    thanks & Regards,

     

  • Muhammad Usman said:
    Is there anything implemented in asset tracker v2, which stores the incoming packets in a queue and sends them one by one and we come to know how many packets are in the queue?

    The Asset Tracker uses message queues. Data is batched to reduce the number of messages transmitted, and to be able to retain collected data while the device is offline.

    Muhammad Usman said:
    Sorry, this thing I want to ask, in my code I stored the packet in an array coming from nrf52833 and sent it to the cloud. And when incoming packet frequency increases it resets the nrf9160.Any solution regarding that? 

    Could you add the following configurations to your project, this way we can hopefully capture the reason for the reset

    CONFIG_ASSERT=y

    CONFIG_RESET_ON_FATAL_ERROR=n

    What size is you memory allocation configured to? Have a look at the memory allocation chapter in the Asset Tracker documentation.

    -Øyvind

  • Hi  

    Thank you for your guidelines.

    What size is you memory allocation configured to?
    CONFIG_HEAP_MEM_POOL_SIZE=47250
    CONFIG_MAIN_STACK_SIZE=2048
    CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=4096
    Sure I will study the link provided by you. And enable the config in prj.conf to know the reason.I will update you on this further.
    Regards,
Related