5.3.2.6 Set Fast Advertisement Parameter (STA, <hex16>,<hex16>,<hex16>)
Format: STA,<hex16>,<hex16>,<hex16>
This command sets the advertising interval and time-out parameters to connect advertisements defined by the A
, IA
and NA
commands. The three input parameters are fast advertising interval, fast advertising time-out and slow advertising interval, respectively. All input parameters are in hex format. The unit of the fast and the slow advertising intervals is 0.625 ms, and the fast advertising time-out unit is 10 seconds. The range of fast and slow advertising intervals is from 0x0020 to 0xFFFF, and the range of the total advertising time-out is from 0x0000 to 0xFFFF. If the command is not set, the default value of the fast advertising interval is 0x0200, the default value of the fast advertising time-out is 0x0003 and the default value of the slow advertising interval is 0x0601. The function can be enabled by using the A
command without any parameters or enabling the power-on advertising function.
The corresponding Get command, GTA
, returns in the same order as follows, fast advertising interval, fast advertising time-out and slow advertising interval.
Default: | 0200, 0003, 0601 | |
Example: | STA,0020,0003,0601 | // Sets the connectable fast advertising interval to be 20 ms, time-out to be 30 seconds and the slow advertising interval to be 960.625 ms |
Response: | AOK | // Success |
Err | // Syntax error or invalid parameter |