Beware that this post is related to an SDK in maintenance mode
More Info: Consider nRF Connect SDK for new designs
This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

nrfConnect & Logger app issues with large datasets

Hi All,

I've been noticing that when attempting to stream large amounts of data (let's say 20,000 notifications of 20 bytes) to the nrfConnect app on mobile (using a Pixel 2), the logger doesn't log all the data I'm expecting.  When streaming smaller amounts of data (5000 notifications of 20 bytes), it seems fine.

I'm using SDK 12.3, S132 3.0.  I'm simply looping over notification sends of a constant data set until NRF_SUCCESS is returned.  I'm keeping a count of the NRF_SUCCESSes returned from the notification calls and I can confirm that I'm seeing 20,000 notifications sent out properly based on the NRF_SUCCESS returns.

However, when I parse the nrfConnect text file, I'm seeing something like 12,000 notifications instead (upon first launch of the nrfConnect app).  Furthermore, the number of notifications I can parse out from the log file changes every time I do this test and seems to decrease with the number of tests I'm doing.  This seems like there's a memory issue.

Any idea what's happening here?  It would be great if the nrfConnect app was more stable in logging larger data sets, as this is a really important tool for developing and testing firmware.

Parents
  • Hi,

    I will investigate this issue, but I'm very busy with different tasks. It may take a long time.

    Logging in nRF Connect isn't cheap. After each packet is received, a long text is sent to the Content Provider, which may be in another app, if you are using nRF Logger, which takes a lot of resources and is slow. Some recent versions of the app write to log in batches, to make it faster, which is flushed after some time, or when another type of event is logged (write, read, disconnect, etc). But there should be no gaps in the log. That would rather say that there are some race conditions which I have to look closer into. I don't think memory is the case, otherwise the app would simply crash.

    I would recommend writing a very simple app that will enable notifications and just log them on LogCat, which is muuuuuuch faster and more reliable. We recommend modifying Android nRF Blinky, that would be easiest and fastest approach.

Reply
  • Hi,

    I will investigate this issue, but I'm very busy with different tasks. It may take a long time.

    Logging in nRF Connect isn't cheap. After each packet is received, a long text is sent to the Content Provider, which may be in another app, if you are using nRF Logger, which takes a lot of resources and is slow. Some recent versions of the app write to log in batches, to make it faster, which is flushed after some time, or when another type of event is logged (write, read, disconnect, etc). But there should be no gaps in the log. That would rather say that there are some race conditions which I have to look closer into. I don't think memory is the case, otherwise the app would simply crash.

    I would recommend writing a very simple app that will enable notifications and just log them on LogCat, which is muuuuuuch faster and more reliable. We recommend modifying Android nRF Blinky, that would be easiest and fastest approach.

Children
Related