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

Link loss troubleshoot

Hi all,

I am using sdk 5.2.0 and s110 softdevice 6.0.0 on PCA10006 and nRF6310 platform for development. I encounter unpredictable BLE link loss issue. In my application, every second there will send out dozens of bytes thru uart @ 115200 without flow control in radio inactive duration. By using app_uart_init with APP_IRQ_PRIORITY_LOW.

After connection is established with iPhone and few minutes later, there are two scenarios when link loss occur:

  1. BLE_GAP_EVT_DISCONNECTED show up, the disconnected reason in p_ble_evt->evt.gap_evt.params is either 0x48 or 0x08. Is 0x08 means BLE_HCI_CONNECTION_TIMEOUT and cant find 0x48 meaning.

  2. assert_nrf_callback happen with line_num = 0x0468, and p_file_name = src\ll_lm.s0.c.

When i disable the uart transmission, the issue seems disappear. Any suggestion can further investigation or fix this problem? Thanks a lot

Parents
  • FormerMember
    0 FormerMember

    First, I would recommend you to use the sniffer to track what is being transmitted over the air.

    Secondly, do you have hardware flow control enabled (HWFC)? If not, you should do so: To use UART with softdevice , you need to have HWFC enabled. Otherwise you may experience that data is overwritten in the nRF51822 UART RX buffer. That is because the softdevice blocks the CPU for 1ms-6ms, depending on the amount of data you are transmitting in each connection interval.

    The problem may also be related to iOS, make sure that you follow Apple's guidelines on connection parameter settings, see this document, section 3.6.

    Update: Another possible reason for the problem is that the UART works fine. However, the BAUD rate for the UART is higher than what the nRF51822 is able to transmit over the air. This will lead to a TX buffer that is "overloaded" on the nRF51822, and result in a disconnect. The disconnect can be avoided if the nRF51822 stop receiving data over UART when the buffer is full. One of the UART examples on github should implement this "feature".

Reply
  • FormerMember
    0 FormerMember

    First, I would recommend you to use the sniffer to track what is being transmitted over the air.

    Secondly, do you have hardware flow control enabled (HWFC)? If not, you should do so: To use UART with softdevice , you need to have HWFC enabled. Otherwise you may experience that data is overwritten in the nRF51822 UART RX buffer. That is because the softdevice blocks the CPU for 1ms-6ms, depending on the amount of data you are transmitting in each connection interval.

    The problem may also be related to iOS, make sure that you follow Apple's guidelines on connection parameter settings, see this document, section 3.6.

    Update: Another possible reason for the problem is that the UART works fine. However, the BAUD rate for the UART is higher than what the nRF51822 is able to transmit over the air. This will lead to a TX buffer that is "overloaded" on the nRF51822, and result in a disconnect. The disconnect can be avoided if the nRF51822 stop receiving data over UART when the buffer is full. One of the UART examples on github should implement this "feature".

Children
No Data
Related