Hi
I ran in some problems with my BLE fragmentation.
I want to send data (files) up to 6kBytes over BLE (Bluetooth 5 on nrf52840 to another nrf52840).
My project is based on the BLE APP UART EXAMPLE which I simply modified.
To send that amount of data, I wrote a BLE fragmentation function which sends out BLE fragments up to "BLE_NUS_MAX_DATA_LEN" (which are 244 Bytes).
Sending data up to roughly 960 Bytes works fine (4 BLE packets).
Exceeding the fourrh BLE packet, for example 990 Bytes (5 BLE packets) the program get stuck in something (like infinite loop) which I wasn't able to figure out yet. In debug mode after pausing the infinite loop, I end up in the "NRF_BREAKPOINT_COND", so restart is required. The Debug log just says: "Fatal error." (With Error-ID: 1)
I cannot figure out the reason why the programm stops working at that point.
I attached my fragmentation function below.
Thanks for your suggestions in advance.