I made a code based on ble_app_uart_c which connects to a peripheral and once connected it can write or read data.
The code is supporting BLE4 (1M) and BLE5 (Long Range) with a software switch.
The functions that work are:
1) The central scans and find BLE4 or BLE5 (long range) peripherals (depends on my selection)
2) The central can connect to anyone that I want (BLE4 or BLE5)
3) Once connected, the peripheral can write data and it is seen at the central UART side (BLE4 and BLE5 long range)
4) Only in BLE4 (1M), the central can write data to the peripheral and it is seen on the peripheral UART
The problem is once the central in BLE5 long range writes data to the connected peripheral, the first data string is accepted and seen on the Uart side, but then it gets internal reset and stop working.
The error code from ble_nus_c_string_send is 0. I cannot find any other error message before this crash
What could be the reason?