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

Error Code 11 from app_usbd_cdc_acm_write

Hello. I am trying to scan for BLE packets and write them out through USBD using nRF5 SDK v15.3.0. I am calling app_usbd_cdc_acm_write() in scan_evt_handler when an event is reported. Occasionally, the app_usbd_cdc_acm_write() function returns 11, which is the error code for NRF_ERROR_INVALID_DATA. Whenever this error is encountered, a part of the two packets sent immediately before and after this error get combined, as observed on the device receiving the packet. What is the cause of this behavior? I was unable to find where NRF_ERROR_INVALID_DATA is reported in the app_usbd_cdc_acm_write() function.

Related