Scan Channels

Hello everybody,

I have a waspmote v1.1 and Xbee 802.15.4 S1. I employ the following algorithm just to see the energy in ONE channel (0B):

void setup()

//Inits the XBee 802.15.4 library

//Configuring the modem asi API Enabled W/PPP

// Powers XBee

void loop()
USB.println(“Perfoming the channel scan…”);

void scan_performing(void)
int i=5;

while (i=5)
xbee802.setScanningChannels(0x00,0x0B); // Set List of Channels to scan. -> All channels selected.
xbee802.setDurationEnergyChannels(0); // Set exponent of scan channel duration
USB.print("Channel B: “);
USB.print(” - Signal Strength: ");

I set the parameters SC to 1 and SD to 1, in order to scan faster than the default values. If we use the formula that appears in the guide

Number of channels*(2^SD)*15,36 ms

It will result: 1*(2*1)*15,36 ms=30,72 ms.

The things is that the scanning is far of 30,72 ms; I’m getting 3 seconds between 1 scanning and the next one and I need to scan as fast as possible. Anybody knows or suggest something? Please I’ll appreciate.


Look at your SC and SD commands.

Look at what. I’m saying that this parameters are SD=! and SC=1. I don’t understand ur comment

Scan Duration. Set/Read the scan duration
End Device - Duration of Active Scan during
Coordinator - If ‘ReassignPANID’ option is set on
Coordinator [refer to A2 parameter], SD determines
the length of time the Coordinator will scan
channels to locate existing PANs. If
‘ReassignChannel’ option is set, SD determines how
long the Coordinator will perform an Energy Scan to
determine which channel it will operate on.
‘Scan Time’ is measured as (# of channels to scan] *
(2 ^ SD) * 15.36ms). The number of channels to scan
is set by the SC command. The XBee can scan up to
16 channels (SC = 0xFFFF). The XBee PRO can scan
up to 13 channels (SC = 0x3FFE).
Example: The values below show results for a 13
channel scan:
If SD = 0, time = 0.18 sec SD = 8, time = 47.19 sec
SD = 2, time = 0.74 sec SD = 10, time = 3.15 min
SD = 4, time = 2.95 sec SD = 12, time = 12.58 min
SD = 6, time = 11.80 sec SD = 14, time = 50.33 min


Energy Scan. Send an Energy Detect Scan. This
parameter determines the length of scan on each
channel. The maximal energy on each channel is
returned and each value is followed by a carriage
return. An additional carriage return is sent at the
end of the command. The values returned
represent the detected energy level in units of -
dBm. The actual scan time on each channel is
measured as Time = [(2 ^ED) * 15.36] ms. The total
scan time is this time multiplied by the number of
channels to be scanned. Refer to SD (Scan Duration)
command on page 85. (

Sorry for asking again, but to use SC and SD I must configure A1 or A2 options?.

mvut, I only need to scan the channel B just for measure the channel without using the less energy channel, i don’t care about that. Again, I didn’t understand you, you just copy/paste de product manual from digi. I already read it, but I can’t have faster measure changing SD and SC to the minimum.

If your SD is set to 0 and you issue an ED with a 0 value, it should take the shortest amount of time to scan the channel.