Large data transfer over ble.

Hi,

I would like to have a system such as follows:

  • Taking sensor data storing it locally till around 100 samples (Once per second)
  • Log this data to the SD with a time stamp
  • Then storing this data to an external SD card. (Utilising the fatfs example code in the SDK) Around  2 Mbytes
  • I then want a mobile device to request this data.

What therefore, is the best way of transferring the data from the SD card to BLE to be picked up by the mobile application.

Do I need to set up a GATT connection and wait on a notification change that I set in the Nordic board?

If so is there an example of this or a good starting point.

Would this post be a good starting point? : https://devzone.nordicsemi.com/f/nordic-q-a/553/dealing-large-data-packet-s-through-ble

If so what example is good to work from. Thanks

Parents
  • Hi Thomas

    Here is the general approach to combine two projects:

    1. Start with the more complex one. If your project is very large, then that's the right way to start, but if it's just the beacon project with a few adjustments, I think starting out with the GATT example will be the best course of action.

    2. Add the required .c files and the necessary include paths to your project.

    3. Add required includes and code to your main.c file.

    4. Modify the sdk_config.h file to enable the necessary configurations. Refer to the other project and compare the sdk_config.h files to see what's needed.

    5. Compile the application.
        a) If there are errors/warnings, go back to point 2 and resolve the errors before building again. This is very likely to repeat itself several times.

    6. Test application.

    Best regards,

    Simon

Reply
  • Hi Thomas

    Here is the general approach to combine two projects:

    1. Start with the more complex one. If your project is very large, then that's the right way to start, but if it's just the beacon project with a few adjustments, I think starting out with the GATT example will be the best course of action.

    2. Add the required .c files and the necessary include paths to your project.

    3. Add required includes and code to your main.c file.

    4. Modify the sdk_config.h file to enable the necessary configurations. Refer to the other project and compare the sdk_config.h files to see what's needed.

    5. Compile the application.
        a) If there are errors/warnings, go back to point 2 and resolve the errors before building again. This is very likely to repeat itself several times.

    6. Test application.

    Best regards,

    Simon

Children
  • Hi Simon,

    I've used my project as I feel it is more complex and, too a long time to set up.

    However, I have just debugged my program stepping through the main when it gets to ble_stack_init.

    It runs the line of code nrf_sdh_ble_enable. Running through this gives

    NRF_LOG_WARNING("Insufficient RAM allocated for the SoftDevice.");
    
            NRF_LOG_WARNING("Change the RAM start location from 0x%x to 0x%x.",
                            app_ram_start_link, *p_app_ram_start);
            NRF_LOG_WARNING("Maximum RAM size for application is 0x%x.",
                            ram_end_address_get() - (*p_app_ram_start));

    Which I presume means the ram allocated is not large enough.

    How do I resolve this?

    Thanks,

    Thomas

    Edit note : I am using Segger error code is 0x00000004

Related