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

    Yes, the approach, although the thread is somewhat dated, is still the correct one. You might want to look at some of our newer examples (ble_app_uart for example) as well as the blog post I linked to in my previous reply for some tips on how to optimize the Bluetooth transfer to use the throughput and methods available in Bluetooth 5.0.

    Best regards,

    Simon

  • Hi Simon,

    I am adding the nordic gatt example code to my own project. I am at the point of including the include files and when I build it complies however, my previous code does not work. At this point I have only included the includes and a few definitions non of the functions (within the main)

    My code (Previous functionality does this)

    • Takes in UART sensor data via RTT pin connections 26-29
    • Creates a ble advertisement
    • Each second modifies the ble advertisement and outputs last read data to the advert
    • It also spits out the sensor values to the RTT terminal

    Now when I have added the GATT example includes, libraries, services, ble to the project and, changed the sdk_config.h so that no linker and compilation errors occur. Now my RTT viewer does  not get populated and, no advertisement is made.

    Could this be due to an issue in my sdk_config.h with some functionality for the GATT stopping my RTT and or, my adverts?

    One definite change is that:

    #define BLE_ADVERTISING_ENABLED 1//0

    This line of code in my project is 0 and, in the GATT example it is 1. To compile it needs to be enabled.

Reply
  • Hi Simon,

    I am adding the nordic gatt example code to my own project. I am at the point of including the include files and when I build it complies however, my previous code does not work. At this point I have only included the includes and a few definitions non of the functions (within the main)

    My code (Previous functionality does this)

    • Takes in UART sensor data via RTT pin connections 26-29
    • Creates a ble advertisement
    • Each second modifies the ble advertisement and outputs last read data to the advert
    • It also spits out the sensor values to the RTT terminal

    Now when I have added the GATT example includes, libraries, services, ble to the project and, changed the sdk_config.h so that no linker and compilation errors occur. Now my RTT viewer does  not get populated and, no advertisement is made.

    Could this be due to an issue in my sdk_config.h with some functionality for the GATT stopping my RTT and or, my adverts?

    One definite change is that:

    #define BLE_ADVERTISING_ENABLED 1//0

    This line of code in my project is 0 and, in the GATT example it is 1. To compile it needs to be enabled.

Children
No Data
Related