Storing data (Recieved by nRF Toolbox Android App via UART) in a CSV file.

Hello Nordic family, I hope everyone is fine. 

I want to do modifications to the nRF Toolbox android App such that the data received by the nRF Toolbox android App from the peripheral (nRF52840 DK) via UART can be saved in a CSV file. The current version of the nRF Toolbox App only shows the received data in the log but I want to store the received data in a CSV file. I am new to App development and I just run the source code of the nRF Toolbox App from GitHub in the Android Studio, I have successfully got the app on the mobile and it is working properly. Now I want to do modifications to the App's source code to store the UART data in the CSV file. But I don't know how to do this. Can someone please help me in this regard? 

Best Regards,

Sami

  • There are many libraries available on Github and you should look for one appropriate for you.

    We don't have knowledge about every library.

    At first glance I can say that the flow may look like that:

    1. Take these messages and serialize them to the single "String".
    2. Write this "String" to the "File" - stored somewhere on the disk.

    Maybe there are libraries which can do both points together, maybe you will need to find two separate.

    You can find example usages in README files in repositories on Github.

    You should look for a library which usage will be convenient for you.

    I am sure that you will be able to find something on your own.

    Regards,

    Sylwester Zieliński

  • Hi Sylwester Zieliński, I hope you will be fine.

    I have tried my best to add this functionality(Storing UART data in a CSV file) but I couldn't add it as I am new to app development. Can you please add this update to the nRF Toolbox for me(of course in your free time)? I will be very thankful to you for this kind act. 

    Best Regards,

    Sami

  • Hi Sami, 

    Samiulhaq said:
    Can you please add this update to the nRF Toolbox for me(of course in your free time)?

    Please contact your regional sales manager (RSM) for the feature request. If you don't know who the RSM is you can get in touch by filling in our sales related questions form.

    -Amanda H.

  • Hi Amanda H. & Sylwester Zieliński

    Now I can store the data received via UART(of the nRF Toolbox app) in a CSV file, but the problem is that the receiving data lags a lot in the nRF Toolbox app(as I am confirming from the log in the Android studio). It means that let's say the nRF52 has sent the data/file in around 1-2 minutes but the app is receiving it very slowly (taking more than 10 minutes to finish the receiving) as I am confirming from the log in the Android studio. Even if I erase or power down the nRF DK after sending the data, the app still receives the data due to lagging. As I am storing the log data in a CSV file, therefore, storing the data in a CSV file in the app is not synced with the nRF52.

    This lagging problem occurs when the data rate of sending the data (by nRF DK) is high (~1200kbps).

    One other problem, the nRF Toolbox app got hanged on the high data rate(~1200kbps) and then I am not able to do anything with the app. what will be the reason in your opinion? 

    Any help regarding this will be highly appreciated. 

    Best Regards,

    Sami

Related