Energy scan
Application
The energy scan enables the 16 IEEE 802.15.4 channels to be monitored in order to detect other radio systems. The energy in a frequency band is determined and displayed. Each channel is measured for approx. 5 seconds before moving to the next channel. Care must be taken that a channel does not communicate during these 5 seconds. It therefore makes sense to repeat the scanning of the channels a couple of times in order to obtain a more accurate statement as to whether or not a channel is occupied. The energy level is displayed through 0...0xF; "0" means no energy, "0xF" or 16dec stands for high energy level.
Set bit 1 in CB1 to TRUE. The KM6551-0000 confirms this in the status with bit 1, which is then also set to TRUE. The scan is finished when bit 1 of SB1 goes to FALSE. The result is then available in the input data byte 0 to 7. Each channel then corresponds to a nibble, i.e. half of a byte.
Example
Byte number | Description | Value (hex) | Meaning |
---|---|---|---|
1 | SB1 | - | Status byte 1 |
2 | SB2 | - | Status byte 2 |
3 | Data IN[0] | 0x3F | 3 - channel 1 low energy, F - channel 2 very high energy |
4 | Data IN[1] | 0x01 | 0 - channel 3 no energy, 1 - channel 4 very low energy |
5 | Data IN[2] | 0x7F | 7 - channel 5 moderate energy, F - channel 5 very high energy |
6...9 | ... | ... | ... (not considered in this example for reasons of simplicity) |
10 | Data IN[8] | 0x10 | 1 - channel 15 low energy, 0 - channel 16 no energy |
11...12 | Data IN[8...9] | - | not required |
The result is to be interpreted as follows. Channels 2 and 5 are to be avoided at all costs, but channels 3 and 16 look very good. No energy was measured here. Please note that these are instantaneous values. You can exclude channels with a high energy from further searches for free channels, but channels with no or only moderate energy may lead under certain circumstances to entirely different results.
Example: activation of the energy scan
Set bit 1 to TRUE in order to start data exchange.
CB1
Bit | CB1.7 | CB1.6 | CB1.5 | CB1.4 | CB1.3 | CB1.2 | CB1.1 | CB1.0 |
Name | RegAccess | reserve | Add3 | Add2 | Add1 | Scan | EnergyScan | Start |
Value | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
The terminal sets bit 1 of the status byte SB1 to TRUE as long as the scan is active.
SB1
Bit | SB1.7 | SB1.6 | SB1.5 | SB1.4 | SB1.3 | SB1.2 | SB1.1 | SB1.0 |
Name | RegAccess | Error | Add3 | Add2 | Add1 | Scan | EnergyScan | Start |
Value | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
The terminal resets bit 1 of the status byte SB1 to FALSE once the scan is finished. You can now evaluate the input data bytes 0...7 (bytes 8-9 have no meaning and should not be evaluated).
The scan takes approx. 80 seconds.
SB1
Bit | SB1.7 | SB1.6 | SB1.5 | SB1.4 | SB1.3 | SB1.2 | SB1.1 | SB1.0 |
Name | RegAccess | Error | Add3 | Add2 | Add1 | Scan | EnergyScan | Start |
Value | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |