I have a project that generally operates as a typical peripheral, but occassionally sends advertising packets of type BLE_GAP_ADV_TYPE_NONCONNECTABLE_NONSCANNABLE_UNDIRECTED. In the process of broadcasting these non-connectable packets, I have to call ble_advdata_encode. Usually this is not a problem, but sometimes it returns error 0x01 (SVC Handler Missing). When I look at documentation of ble_advdata_encode, it says it should return either NRF_SUCCESS, NRF_ERROR_INVALID_PARAM, or NRF_ERROR_DATA_SIZE. I'm also not picking up on any pattern that this behavior follows. Can anyone enlighten me as to what might cause ble_advdata_encode to return error 0x01 (SVC Handler Missing)?
SDK: 15.0.0_a53641a
Soft Device: 6.0.0
IDE: Keil uVision5