I would like to have a system such as follows:
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
It seems to me like you might be pushing the upper limit of what you will be able to transfer using BLE here. I suggest you take a look at this blog post, which shows you how to achieve maximum throughput, and also provides source code for a project doing this.
I don't think I am pushing the limits as I don't need it to be all done in a single second. Although faster is better. Would you say my outlined approach is correct though?
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.
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)
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.
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.