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 Reply
  • Here is the log I get after failure:

    00> <info> central: Connecting to target E277F07E37F0
    00>
    00> <debug> nrf_ble_gatt: Requesting to update ATT MTU to 247 bytes on connection 0x0.
    00>
    00> <debug> nrf_ble_gatt: Updating data length to 251 on connection 0x0.
    00>
    00> <debug> nrf_ble_gq: Registering connection handle: 0x0000
    00>
    00> <debug> ble_db_disc: Starting discovery of service with UUID 0x1 on connection handle 0x0.
    00>
    00> <debug> nrf_ble_gq: Adding item to the request queue
    00>
    00> <debug> nrf_ble_gq: GATTC Primary Services Discovery Request
    00>
    00> <debug> nrf_ble_gq: SD is currently busy. The GATT request procedure will be attempted again later.
    00>
    00> U of 247 bytes.
    00>

Children
Related