This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Reset/Crash after first transfer of ble_nus_c_string_send

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?

Parents
  • Hello,

     

    The error code from ble_nus_c_string_send is 0. I cannot find any other error message before this crash

     Does the log (RTT backend, I assume) say anything? Do you see anything from the log at all that is printed in your application using NRF_LOG_INFO()?

    If you see the line "Fatal error." Can you please try to define DEBUG in your preprocessor defines? If you are not sure how to add preprocessor defines, please let me know what IDE you are using.

    Best regards,

    Edvin

Reply
  • Hello,

     

    The error code from ble_nus_c_string_send is 0. I cannot find any other error message before this crash

     Does the log (RTT backend, I assume) say anything? Do you see anything from the log at all that is printed in your application using NRF_LOG_INFO()?

    If you see the line "Fatal error." Can you please try to define DEBUG in your preprocessor defines? If you are not sure how to add preprocessor defines, please let me know what IDE you are using.

    Best regards,

    Edvin

Children
Related