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

ble_advdata_encode returns SVC Handler Missing

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

Parents
  • You have the code for ble_advdata_encode() and you can see it calls several sd_* functions and then checks the result, any return code which is non-zero is returned. So the documentation shows the specific error codes but a lot of methods which use any of the sd functions can also return one of the sd error messages. 

    Are you possibly calling this before you enable the softdevice? 

  • Thank you for the reply. The soft device is enabled when I receive this error. I am able to connect to a phone and send some broadcasting packets before ble_advdata_encode() starts to consistently return SVC Handler Missing. I'm just having a hard time determining what is causing this change.

Reply Children
No Data
Related