Assistance Request: nRF52840 Data Transmission to Android App

Hello Nordic Forum, I am working on a project involving data transmission from an nRF52840 board to an Android application, and I would appreciate guidance and insights from the community.

Project Objective: I aim to modify an existing Java application in Android Studio to seamlessly receive, process, and store sensor data from the nRF52840 board. The focus is on efficient data handling and reliable storage on the Android device.

Project Details: Hardware: I am utilizing the nRF52840 board for its BLE and wireless connectivity capabilities. Software: The existing Java application in Android Studio needs modification to accommodate data reception and processing. Communication: Two-way communication between the board and Android device is established using Bluetooth (or USB). Data Transmission: Sensor Data: The nRF52840 board collects sensor data, which can include integers, floats, and possibly other data types.

The specific format needs to be determined. Frequency: I need to transmit and store 12 data points per second continuously for 5 minutes, resulting in a total data size of 216 kilobytes.

Requested Assistance: Data Handling and Storage: I welcome suggestions for Android libraries or APIs that can streamline data handling, processing, and storage. Examples or references to specific libraries that integrate well with Java applications would be highly valuable. Data Verification and Toast Message:

Additionally, I want to implement a feature where the app verifies if the sensor data on the nRF52840 board has been modified or is empty. If changes are detected, the app should initiate a download of the newest data. A toast message should notify the user when a download is in progress or completed. Guidance on implementing this feature is much appreciated.

Thank you in advance for your help. I look forward to any insights and recommendations the community can offer to tackle these challenges effectively.

Best regards,

Edam CHAABEN

Parents
  • Hi,

    For general Android development (including data storage and handling) I recommend looking for Android specific forums and communities.

    For the BLE related parts of your application, we do provide an Android BLE library which solves a lot of what is required for implementing an Android BLE app.

    Additionally, I want to implement a feature where the app verifies if the sensor data on the nRF52840 board has been modified or is empty. If changes are detected, the app should initiate a download of the newest data. A toast message should notify the user when a download is in progress or completed. Guidance on implementing this feature is much appreciated.

    Please describe a bit more what problem this feature is intended to solve. Where is the potential modification happening? What do you mean by empty data? What kind of changes in the data are we talking about? With the proposed protocols (BLE or USB) you will have error detection and resends already in place and automatically handled by the stacks, ensuring correct transmission of data from the device to the phone. On the application layer you can safely assume that any data received is the same data as what was sent from the other device.

    Regards,
    Terje

  • Hello, thank you for your response. I would like to provide further clarification regarding the Android BLE application I am developing for the Nordic Semiconductor nRF52840 device. The potential modification in the NRF device is such as memory card when the code is executing there are data storage of the information collection; if the buffer of data when you flash the code is full or almost full, there will be recuperation of the data. Besides, if there aren't any modification in the data storage (when I execute the code, there aren't any information or data stored). If changes are detected, the app should initiate a download of the newest data. A toast message should notify the user when a download is in progress or completed. Guidance on implementing this feature is much appreciated.

    The potential modifications to the NRF device primarily involve the management of data storage, akin to the functionality of a memory card. During code execution, the nRF52840 collects sensor data and stores it in its internal memory. It is essential to ensure that when the data buffer is full or nearly full at the time of flashing the code, the data is accurately recuperated and processed to prevent any loss of information.

    Moreover, there may be scenarios where no modifications exist in the data storage. For instance, if I execute the code and discover that there is no information or data stored, the application should be capable of detecting this condition. In such cases, it should automatically initiate a download of the most recent data from the nRF52840 board.

    To enhance the user experience, I would like to implement a toast message that notifies users when a download is in progress or has been completed. This feedback is crucial for keeping users informed about the status of their data retrieval and ensuring a seamless interaction with the application.

    I would greatly appreciate any guidance on effectively implementing this feature, including best practices for checking data integrity, initiating downloads, and displaying toast messages within the Android application. Thank you for your assistance!

Reply
  • Hello, thank you for your response. I would like to provide further clarification regarding the Android BLE application I am developing for the Nordic Semiconductor nRF52840 device. The potential modification in the NRF device is such as memory card when the code is executing there are data storage of the information collection; if the buffer of data when you flash the code is full or almost full, there will be recuperation of the data. Besides, if there aren't any modification in the data storage (when I execute the code, there aren't any information or data stored). If changes are detected, the app should initiate a download of the newest data. A toast message should notify the user when a download is in progress or completed. Guidance on implementing this feature is much appreciated.

    The potential modifications to the NRF device primarily involve the management of data storage, akin to the functionality of a memory card. During code execution, the nRF52840 collects sensor data and stores it in its internal memory. It is essential to ensure that when the data buffer is full or nearly full at the time of flashing the code, the data is accurately recuperated and processed to prevent any loss of information.

    Moreover, there may be scenarios where no modifications exist in the data storage. For instance, if I execute the code and discover that there is no information or data stored, the application should be capable of detecting this condition. In such cases, it should automatically initiate a download of the most recent data from the nRF52840 board.

    To enhance the user experience, I would like to implement a toast message that notifies users when a download is in progress or has been completed. This feedback is crucial for keeping users informed about the status of their data retrieval and ensuring a seamless interaction with the application.

    I would greatly appreciate any guidance on effectively implementing this feature, including best practices for checking data integrity, initiating downloads, and displaying toast messages within the Android application. Thank you for your assistance!

Children
No Data
Related