BLE_GAP_SetScanRspData
C
uint16_t BLE_GAP_SetScanRspData(BLE_GAP_AdvDataParams_T *p_scanData);
Description
Sets scan response data.
Note
If advertising is currently enabled, the new data will be used in subsequent advertising events. If an advertising event is in progress when this command is issued, the new data may not be used for that event. This API is part of the legacy advertising feature and will be disallowed if any extended advertising feature API has been used prior to this call. See Categories of advertising APIs and events for details on advertising APIs. The BLE_GAP_AdvInit function must be called prior to using this API.
Parameters
Parameter | Description |
---|---|
[in] p_scanData | Pointer to the structure containing scan response data to be set. See BLE_GAP_AdvDataParams_T. |
Return values
Return value | Description |
---|---|
MBA_RES_SUCCESS | Successfully sets scan response data. |
MBA_RES_OOM | Internal memory allocation failure occurred. |
MBA_RES_INVALID_PARA | Invalid parameters. Scan response data length exceeds BLE_GAP_ADV_MAX_LENGTH. |
MBA_RES_COMMAND_DISALLOWED | Command disallowed when extended advertising feature is in use. |