Specifications
See also function loadNvParam().
This function returns a result code from the following list:
NV_SUCCESS = 0,
// Possible LOAD errors
NV_NOT_FOUND = 1,
NV_DEST_TOO_SMALL = 2,
// Possible SAVE errors
NV_FULL = 3, // no more room in NV (even after “compression”)
NV_BAD_LENGTH = 4,
NV_FAILURE = 5, // literally unable to write to FLASH (should never happen)
NV_BAD_TYPE = 6, // invalid or unsupported data type
NV_LOW_POWER = 7, // we refuse to even try if power is bad (low voltage)
scanEnergy() – Get energy readings from all channels
The getEnergy() function returns the result of a brief radio Energy Detection scan.
Function scanEnergy() is an extension of getEnergy(). It essentially calls getEnergy() N times in a
row, changing the frequency before each getEnergy() scan. Here, ‘N’ refers to the number of
frequencies supported by the radio.
For 2.4 GHz radios, 16 frequencies are supported by the radios, each corresponding to one channel.
For 900 MHz radios running FHSS (frequency hopping) firmware, the 16 channels cover 66 radio
frequencies, with each channel making use of 25 of those frequencies. For 868 MHz radios, there are
three frequencies used, regardless of the channel selected.
See the getChannel() function explanation for more details about how each radio platform uses the
various frequencies available to it.
Function scanEnergy() returns an N-byte string, where the first character corresponds to the “detected
energy level” on frequency 0, the next character goes with channel 1, and so on. (For 900 MHz FHSS
radios, SNAP does not make use of the first and last frequencies, but returns them as part of the string
for completeness.)
The units for the “detected energy level” are the same as that returned by getLq(). Refer to the
documentation on that function for more info.
This function takes no parameters.
Page 70 of 202 SNAP Reference Manual Document Number 600-0007K