A diagnostic tool to perform a scan for nearby Bluetooth advertisements. Discovered advertisements will be printed out the serial port with the following fields:
Size in bytes | Field Name | Description |
---|---|---|
6 |
Address |
BLE MAC address that is the target of the connection |
1 |
Address Type |
Specifies if it is RANDOM or PUBLIC |
1 |
Packet Type |
The bitfield is structured in the following format:
|
1 |
RSSI |
The received signal strength of the advertisement, in -dBm. |
1 |
Data length |
Length of the payload |
VAR_LEN |
Data |
Payload (only printable ASCII characters are displayed) |
The BLE scanner offers four configurable parameters that can be set with their respective AT commands:
-
DG (GAP Scan Duration): The duration value specifies the amount of time, in seconds, for which the GAP scan should run. This value determines how long the BLE device will actively scan for nearby devices
-
IG (GAP Scan Interval), WG (GAP Scan Window): Use IG and WG to optionally configure the scan duty cycle. The radio will actively scan advertisements during the window duration of every scan interval period.
-
FG (Advertisement Data Filter): You can apply a filter that will limit which advertisements are sent out the serial port. This filter checks the advertisements payload to determine whether it should display the advertisement or not.
The GS command is designed to be a quick diagnostic tool only. Some of its functionalities are limited and it is recommended to perform the scan through either an API frame or MicroPython interface. Advantages of using other methods are longer scan durations and easier visibility of advertising payload. |
Parameter range
N/A
Default
N/A