Home/Support/Support Forum/Scan Channels

Scan Channels

0 votes
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()
{
USB.begin();

//Inits the XBee 802.15.4 library
xbee802.init(XBEE_802_15_4,FREQ2_4G,PRO);

//Configuring the modem asi API Enabled W/PPP
xbee802.setAPI(2);

// Powers XBee
xbee802.ON();
}

void loop()
{
USB.println("Perfoming the channel scan...");
scan_performing();
}

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: ");
USB.println(xbee802.energyChannel[0],DEC);
}
}

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.

Greetings
asked Mar 4, 2015 in IEEE 802.15.4 by Diegui12 New to the Community (5 points)

Please log in or register to answer this question.

2 Answers

0 votes
Look at your SC and SD commands.
answered Mar 5, 2015 by mvut Veteran of the Digi Community (11,963 points)
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
exponent.
End Device - Duration of Active Scan during
Association.
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:
0-0x0F
[exponent]
4
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
Also

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. (http://ftp1.digi.com/support/documentation/90000982_S.pdf)
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.
0 votes
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.
answered Mar 6, 2015 by mvut Veteran of the Digi Community (11,963 points)
...