Softdevice, ble_nus_data_send error(0x08, NRF_ERROR_INVALID_STATE)

Hello,

I am experiencing an issue where ble_nus_data_send returns a value of 0x08. I would appreciate any advice on how to resolve this error.

  1. Symptoms: The device (Peripheral) does not respond after connecting from an iPhone (Central).
  2. Frequency: Once a week (approximately 14 controls via BLE per week).
  3. Cause: ble_nus_data_send() returns 0x08.
  4. Note: 
    * Currently, we are only field testing with two devices, so I will remove that statement.(This issue does not occur with Android phones.)
  5. Log: The peripheral does not respond, so the app disconnects and reconnects to operate.

15:47:12.576 ble_data_send()
15:47:13.585 ble_data_send()
15:47:14.577 ble_data_send()
15:47:15.586 ble_data_send()
15:47:15.666 main.c: ble_evt_handler()=> Disconnected
15:47:16.402 main.c: ble_evt_handler()=> Connected
15:47:16.562 main.c: ble_evt_handler()=> Disconnected
15:47:17.427 main.c: ble_evt_handler()=> Connected
15:47:18.900 main.c: ble_evt_handler()=> Disconnected
15:47:20.389 main.c: ble_evt_handler()=> Connected
15:47:23.495 main.c: ble_evt_handler()=> Disconnected
15:47:23.607 main.c: ble_evt_handler()=> Connected
15:47:27.061 main.c: ble_evt_handler()=> Disconnected
15:47:27.061 main.c: ble_evt_handler()=> Connected
15:47:28.853 main.c: ble_evt_handler()=> Disconnected
15:47:28.868 main.c: ble_evt_handler()=> Connected
15:47:30.773 main.c: ble_evt_handler()=> Disconnected
16:36:51.533 main.c: ble_evt_handler()=> Connected
16:36:53.118 ble_nus.c: on_write()
16:36:53.447 ble_nus.c: on_write()
16:36:53.447 ble_nus.c: on_write()=> (p_nus->tx_handles.cccd_handle) noti enabled
16:36:53.508 ble_nus.c: on_write()
16:36:53.508 main.c: nus_data_handler()=> ######### Received data from BLE NUS. Writing data on UART.
16:36:53.514  (some data)
16:36:53.521 login success
16:36:53.521 ble_data_send()
16:36:53.521 ble_data_send() fail, err_code=8
16:36:54.513 ble_data_send()
16:36:54.513 ble_data_send() fail, err_code=8
16:36:55.506 ble_data_send()
16:36:55.506 ble_data_send() fail, err_code=8
16:36:56.514 ble_data_send()
16:36:56.514 ble_data_send() fail, err_code=8
16:36:56.718 ble_nus.c: on_write()
16:36:56.718 main.c: nus_data_handler()=> ######### Received data from BLE NUS. Writing data on UART.
16:36:56.724 (some data)
16:36:56.731 login success
16:36:56.731 ble_data_send()
16:36:56.731 ble_data_send() fail, err_code=8
16:36:57.515 ble_data_send()
16:36:57.515 ble_data_send() fail, err_code=8
16:36:58.508 ble_data_send()
16:36:58.508 ble_data_send() fail, err_code=8
16:36:59.516 ble_data_send()
16:36:59.516 ble_data_send() fail, err_code=8
16:36:59.837 ble_nus.c: on_write()
16:36:59.837 main.c: nus_data_handler()=> ######### Received data from BLE NUS. Writing data on UART.
16:36:59.849  (some data)
16:36:59.849 login success
16:36:59.849 ble_data_send()
16:36:59.849 ble_data_send() fail, err_code=8
16:37:00.505 ble_data_send()
16:37:00.505 ble_data_send() fail, err_code=8
16:37:01.514 ble_data_send()
16:37:01.514 ble_data_send() fail, err_code=8
16:37:02.506 ble_data_send()
16:37:02.506 ble_data_send() fail, err_code=8
16:37:03.138 ble_nus.c: on_write()
16:37:03.138 main.c: nus_data_handler()=> ######### Received data from BLE NUS. Writing data on UART.
16:37:03.145  (some data)
16:37:03.151 login success
16:37:03.151 ble_data_send()
16:37:03.151 ble_data_send() fail, err_code=8
16:37:03.519 ble_data_send()
16:37:03.519 ble_data_send() fail, err_code=8
16:37:04.511 ble_data_send()
16:37:04.511 ble_data_send() fail, err_code=8
16:37:05.504 ble_data_send()
16:37:05.520 ble_data_send() fail, err_code=8
16:37:05.984 main.c: ble_evt_handler()=> Disconnected
16:37:06.209 main.c: ble_evt_handler()=> Connected
16:37:07.041 ble_nus.c: on_write()
16:37:07.248 ble_nus.c: on_write()
16:37:07.248 ble_nus.c: on_write()=> (p_nus->tx_handles.cccd_handle) noti enabled
16:37:07.368 ble_nus.c: on_write()
16:37:07.368 main.c: nus_data_handler()=> ######### Received data from BLE NUS. Writing data on UART.
16:37:07.374  (some data)
16:37:07.390 login success
16:37:07.390 ble_data_send()
16:37:07.578 ble_nus.c: on_write()
16:37:07.578 main.c: nus_data_handler()=> ######### Received data from BLE NUS. Writing data on UART.
16:37:07.584  (some data)
16:37:07.584 ble_data_send()
16:37:07.872 ble_nus.c: on_write()
16:37:07.878 main.c: nus_data_handler()=> ######### Received data from BLE NUS. Writing data on UART.
16:37:07.884  (some data)
16:37:07.884 ble_data_send()
16:37:08.364 ble_data_send()
16:37:08.652 ble_nus.c: on_write()
16:37:08.659 main.c: nus_data_handler()=> ######### Received data from BLE NUS. Writing data on UART.
16:37:08.665  (some data)
16:37:08.665 ble_data_send()
16:37:09.369 ble_data_send()
16:37:09.657 ble_data_send()
16:37:10.377 ble_data_send()
16:37:11.370 ble_data_send()
16:37:12.379 ble_data_send()
16:37:13.371 ble_data_send()
16:37:14.364 ble_data_send()
16:37:15.372 ble_data_send()
16:37:16.365 ble_data_send()
16:37:17.374 ble_data_send()

  • SoftDevice Version: s132_nrf52_7.2.0_softdevice
  • Example App Based On: ble_uart_peripheral
  • MCU: nrf52832

Thank you

Parents Reply Children
No Data
Related