AS (Active Scan)
This command applies to the XBee 3 Zigbee RF Module.
Forces an active scan of the neighborhood for beacon responses. The AS command cannot be issued remotely.
An Active scan returns a multi-line response with each field separated by a carriage return:
AS_type – unsigned byte = Always returns 2, indicating the protocol is Zigbee
Channel – unsigned byte
PAN – unsigned word in big endian format
Extended PAN – eight unsigned bytes in bit endian format
Allow Join – unsigned byte – 1 indicates join is enabled, 0 that it is disabled
Stack Profile – unsigned byte
LQI – Link Quality Indicator - unsigned byte, higher values are better
RSSI – Relative Signal Strength Indicator - signed byte, lower values are better
Each field in the AS response is separated by a carriage return (0x0D character).
An additional carriage return separates multiple beacons.
Two additional carriage returns indicate the end of the Active Scan.
If using API Mode, no <CR>’s are returned and a separate response frame is generated for each PanDescriptor. For more information, see Operate in API mode. If no PANs are discovered during the scan, only one carriage return is printed.
The AS command cannot be issued from within MicroPython or over BLE.
Before a device is associated to a network (AI != 0), it will continuously perform an active scan in the background, searching for a valid network to join. While this is occurring, you cannot manually perform an active scan using the AS command. You can bypass this restriction by setting DJ to 1. This will disable joining and halt the background active scans.
Parameter range
N/A
Default
N/A