====== Radio scanning ======
===== Boot Noise Measurement =====
The ''BNM'', which stand for Boot Noise Measurement, initiates a spectral scan at startup.
==== Configure BNM ====
These parameters can be changed by the user in the global configuration file ''/etc/bnm/bnm.conf''.
The BNM feature takes some time when the gateway is booting. To avoid Boot Noise Measurement, disable it in this file (Set ''disable'' in the field ''BNM_ENABLE''). \\
The default configuration on iBTS (release 4.2) is the following:
# BNM is executed at boot.
BNM_ENABLE="enable"
# Radio configuration.
STEP_FREQ_MHZ=1
BANDWIDTH_HZ=62500
BITRATE_BPS=600
RADIO_NB="1"
# Number of samples by frequency.
SAMPLES_NB=20
# Additional arguments for klk_spectral_scan.
ADDITIONAL_ARGS="--strip-zero"
# Number of seconds before scans timeout.
TIMEOUT_SEC=90
# Backup size in bytes.
BACKUP_SIZE=102400
//''RADIO_NB'' parameter is only available for Wirnet iBTS as this gateway owns 2 LoRa modems per LoRa module (up to 4 LoRaLOC modules). On Wirnet iFemtoCell, there is only one LoRa modem and no LoRa module.//\\
//''SAMPLES_NB'' parameter is not taken into account for iFemtoCell-evolution and iStation product. Optimized kerlink spectral scan uses RSSI smoothing so SAMPLES_NB configuration parameter is ignored and RSSI smoothing is used instead of looping over frequencies (to have a quicker BNM).//\\
\\
The start frequency and the stop frequency are defined in the board-specific configuration file, in the directory ''/etc/bnm/''. The board-specific configuration file name changes according to the region.
# Radio configuration.
START_FREQ_MHZ=853
STOP_FREQ_MHZ=883
==== Example ====
=== The BNM is launched at startup ===
Starting BNM... done
Starting ifplugd: done
Starting Status manager
Starting System manager
Starting Time manager
Starting SMS manager
Starting Lighttpd Web Server: lighttpd.
Starting MonitStarting Monit 5.20.0 daemon with http interface at [localhost]:2812
.
Starting network management services: snmpd.
Executing network monitoring daemon...
Keros (Kerlink OS Distribution) 4.0.2 klk-lpbs-050789 /dev/console
klk-lpbs-050789 login: root
=== Get the result ===
The result of the measurement is available in the ''/var/log/bnm/'' folder.
* __Wirnet iBTS example:__
root@klk-lpbs-XXXXXX:/ # ll /var/log/bnm/
drwxr-xr-x 2 root root 4.0K Aug 23 09:20 .
drwxr-xr-x 3 root root 4.0K Aug 23 09:19 ..
-rw-r--r-- 1 root root 1.0K Aug 23 09:20 bnm_slot2_radio1_180823091951.csv
-rw-r--r-- 1 root root 1.0K Aug 23 09:20 bnm_slot2_radio2_180823091951.csv
In this example, one LoRa module is connected. For each LoRa module, the spectral scan is done for the channel 1 and for the channel 2. \\
To configure the BNM to scan only one channel modify the field ''RADIO_NB="1 2"''. \\
''RADIO_NB="1"'': Only channel 1 will be scan.\\
''RADIO_NB="2"'': Only channel 2 will be scan.
* __Wirnet iFemtoCell example:__
root@klk-wifc-XXXXXX:~ # ll /var/log/bnm/
drwxr-xr-x 2 root root 4.0K Jan 8 10:38 .
drwxr-xr-x 3 root root 4.0K Jan 8 10:38 ..
-rw-r--r-- 1 root root 1.6K Jan 8 10:39 bnm_190108103858.csv
=== Interpret the result ===
The following is the result of the spectral scan analysis on a Wirnet iBTS on the LoRa module located in slot 2 and for the radio channel 2. \\
The default configuration uses frequency steps of 1MHz on a 62500Hz bandwidth. \\
For each frequency, 20 samples are taken. For 868 MHz gateway, the start frequency is 853 MHz and the stop frequency 883 MHz.
Thus 620 samples are measured. Former measurements are backuped in the directory ''/var/backups/bnm''.
root@klk-lpbs-XXXXXXcat :~ # cat /var/log/bnm/bnm_slot2_radio2_180823093716.csv
853000000,-129.0,1,-128.0,6,-127.0,13
854000000,-128.0,3,-127.0,14,-126.0,3
855000000,-128.0,1,-127.0,13,-126.0,6
856000000,-127.0,2,-126.0,16,-125.0,2
857000000,-127.0,9,-126.0,11
858000000,-127.0,2,-126.0,18
859000000,-126.0,14,-125.0,6
860000000,-125.0,9,-124.0,11
861000000,-125.0,4,-124.0,16
862000000,-125.0,1,-124.0,16,-123.0,3
863000000,-125.0,1,-124.0,16,-123.0,3
864000000,-116.0,3,-115.0,10,-114.0,7
865000000,-124.0,1,-123.0,15,-122.0,4
866000000,-123.0,8,-122.0,11,-121.0,1
867000000,-124.0,13,-123.0,7
868000000,-125.0,2,-124.0,10,-123.0,8
869000000,-126.0,1,-125.0,8,-124.0,11
870000000,-126.0,1,-125.0,5,-124.0,14
871000000,-126.0,2,-125.0,13,-124.0,5
872000000,-126.0,2,-125.0,5,-124.0,12,-123.0,1
873000000,-126.0,19,-125.0,1
874000000,-127.0,1,-126.0,18,-125.0,1
875000000,-127.0,19,-126.0,1
876000000,-128.0,8,-127.0,12
877000000,-129.0,2,-128.0,10,-127.0,8
878000000,-128.0,11,-127.0,9
879000000,-128.0,13,-127.0,7
880000000,-124.0,11,-123.0,9
881000000,-128.0,12,-127.0,8
882000000,-128.0,7,-127.0,13
883000000,-128.0,11,-127.0,9
In the above result, 20 measures have been done for 863 MHz frequency. 1 time the result was -125 dBm, 16 times -124 dBm and 3 times -123 dBm.
==== Known issues ====
* On iBTS, the number of frequency steps is limited to 255. Mind that the step number must be below that limit. Adjustments are possible by configuring ''START_FREQ_MHZ'', ''STOP_FREQ_MHZ'' and ''STEP_FREQ_MHZ''.
* BNM frequency configuration files depending on the board (''bnm-868.conf'', ''bnm-923.conf'', ''bnm-915.conf'') are not kept by default when upgrading the gateway. These files are not written in ''sysupgrade.conf'' and must be added if necessary.