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 max to 245 bytes if using extended advertising configured by IPE
command. Otherwise, the total length is limited to 31 bytes. If the total advertisement payload exceeds the limitation, the command response is Err
.
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” is used for AD data for 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. |