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

Creating log file on Thingy:91

Hi,

I might have missed the answer to this question in other threads, but: what is the best way to store/get log data from the device that is not connected directly to the computer?

I am testing the MQTT & GPS functionalities and for that I need to see the behaviour of the device "in the field", especially what is happening when there is no coverage or GPS signal and so on. So for that I would appreciate a way that does not require having the device connected with a wire to the computer. I am aware of NRF_LOG existence, but it seems that it uses either UART or RTT and both require connection with COM port.

Can I create a log text file, and if yes, where would it be stored and how to access it? And if I can't - is there any other way?

Parents Reply Children
  • Thank you for suggestions, the file system looks like something worth looking at.

    Recently I also came into the NVS - it seems also like an easy way to store data, however I am quite hesitant about using flash memory for such purpose. My biggest concern would be the lifetime of flash memory, I couldn't get into Thingy's specification, except that the maximum number of erase cycles is supposed to be 10 000.  I lack sufficient knowledge in this topic - so could you share your opinion on using the nvs for logging? Considering that I might need to log the information quite often, let's say - few times a minute.

    What is actually the difference between File Systems and NVS?

  • You should note that Zephyr also supports SDHC, which could be an alternative to storing directly to flash on the unit. 

    Gmaciek said:
    What is actually the difference between File Systems and NVS?

     Non-Volatile Storage is the storage space itself, while the file system is how information is stored i.e. FAT which is readable in Windows, Linux, and Mac. The Zephyr documentation has a good explanation of NVS and the file systems that are supported by Zephyr.

Related