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

central stops receiving after sometime

Hi,

Central: nrf52840

peripheral: nrf52840

Connection interval (both min & max) = 10ms

ATT_MTU size: 52 bytes

Dle: 52+4 bytes

Connection event extension: enabled

Slave latency: 0

Connection supervision timeout: 4s

PHY: 1MBps

softdevice: 140

I'm transmitting 10 samples wrapped to 48 bytes as notification and hence set the ATT_MTU size to 52 bytes considering the overhead for notification to 3 bytes + 1 extra safe side. The issue is suddenly after 30 mins there is a disconnection and I get to see only EMPTY DATA PDU through nrf sniffer. However, I didn't notice anything as Connection Disconnection timeout or so. It's just after the last notification, I get to see only EMPTY DATA PDU and no samples at the UART(which is logged at the central) This is for a medical application. So I need to maintain this throughput with very low/0 latency and no potential disconnection. Your valuable suggestions will help me fix the problem.

J Link viewer logs

LOG

Thanks, Nivetha

Parents
  • 0x33064 is probably not the error code, but the initial value of the err_code variable. If you look in the documentation above the definition of the function in softdevice_handler.h you will see that softdevice_app_ram_start_get() can only return one of two codes: NRF_SUCCESS or NRF_ERROR_NOT_FOUND (0 or 5). You have to step past the line of code for the variable to get updated with the return code.

    Anyway, what SDK are you using? I'm suspecting 13.x? The value you are after is calculated in softdevice_enable(). Inside this function there is a call to sd_ble_enable(). In the function there are also plenty of NRF_LOG printouts and these should pop up on your serial terminal and give you the clues that Martin Tverdal is asking for.

Reply
  • 0x33064 is probably not the error code, but the initial value of the err_code variable. If you look in the documentation above the definition of the function in softdevice_handler.h you will see that softdevice_app_ram_start_get() can only return one of two codes: NRF_SUCCESS or NRF_ERROR_NOT_FOUND (0 or 5). You have to step past the line of code for the variable to get updated with the return code.

    Anyway, what SDK are you using? I'm suspecting 13.x? The value you are after is calculated in softdevice_enable(). Inside this function there is a call to sd_ble_enable(). In the function there are also plenty of NRF_LOG printouts and these should pop up on your serial terminal and give you the clues that Martin Tverdal is asking for.

Children
No Data
Related