The SAD command is only avaliable for EZ-Serial firmware. If you develop your own application code, please call the API wiced_bt_ble_set_raw_advertisement_data() in your code to set the adv data.
I know. I just use the same SAD command defined to my uart protocol. You can check the code, in the deep call, it call wiced_bt_ble_set_raw_advertisement_data. But the problem is "reboot". Once port enter SAD command, it reboot.
There are something wrong with your function wiced_result_t ibeacon_set_advertisement_data(uint8* p_data, uint8 len ).
Could you refer to the function static void hci_control_le_handle_set_advertisement_data(uint8_t* data, uint32_t length) in the file hci_control_le.c under demo headset.