5.3.2.3 Set Extended Advertisement Data (IAE/NAE/ISE/NSE)
Format:
IAE,<hex8>,<Hex>
NAE,<hex8>,<Hex>
ISE,<hex8>,<Hex>
NSE,<hex8>,<Hex>
Commands, IAE
, ISE
, NAE
and NSE
, set the advertisement payload and scan response payload for the secondary advertisement set, respectively.
The second letter in the commands indicates the type of information to be changed. The letter A
indicates changes to advertisement and letter S
for scan response.
The extended advertisement is considered the second advertisement set in the A
command. Thus, using this set extended advertisement data command means it is possible to set the advertisement data of the second advertisement mentioned in the A
command.
The usage of IAE
, ISE
, NAE
and NSE
commands are the same as that of IA
, IS
, NA
and NS
commands, except the total bytes of the advertisement payload and scan response payload. The total bytes of the advertisement payload and scan response payload can be a max of 245 bytes if using extended advertising configured by the IPE
command. Otherwise, the total length is limited to 31 bytes. If the total advertisement payload exceeds the limitation, the command response is Err
. The ISE,Z
command is designed to clear all scan response data. However, it is disallowed in extended scannable advertisements without scan response content. If an extended scannable advertisement is ongoing, the change will not take effect immediately, and restarting the advertisement manually results in an Err
response. Therefore, it is strongly recommended to set new scan response content immediately following the ISE,Z
command. This recommendation is also applicable to the NSE,Z
command.
Example: | IAE,Z | // Clear all advertisement content |
IAE,01,05 | // Adds an AD Structure with Flag AD type | |
IAE,09,313233 | // Appends an AD Structure with Name AD type. ASCII data of “123” are used for AD data for the local name. Issuing another command in sequence appends another AD Structure. | |
Response: | AOK | // Success |
Err | // Syntax error or invalid parameter | |
Note: The PDS stores the parameters of NAE and NSE commands. The parameters are effective immediately after restarting the advertising and scan without a reboot. It is recommended to include the flag's AD data type in the advertisement data for connection-oriented applications. This ensures the Android devices connect as expected. The IPE , IAE and NAE commands are to configure the second advertisement set, which is also used by beacon. Any configuration by these commands affects the beacon feature directly and vice versa. |