This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
|
wiki:lora:scan [2019/09/25 11:08] ghi created |
wiki:lora:scan [2025/09/17 14:26] (current) ehe [How it works] |
||
|---|---|---|---|
| Line 1: | Line 1: | ||
| ====== Radio scanning ====== | ====== Radio scanning ====== | ||
| - | ===== Boot Noise Measurment ===== | + | ===== Boot Noise Measurement ===== |
| The ''BNM'', which stand for Boot Noise Measurement, initiates a spectral scan at startup. | The ''BNM'', which stand for Boot Noise Measurement, initiates a spectral scan at startup. | ||
| - | |||
| - | <note important>This feature is only available on **iBTS** and **iFemtoCell** platforms.</note> | ||
| - | |||
| - | ==== The BNM files ==== | ||
| - | |||
| - | <code> | ||
| - | / | ||
| - | ├── etc | ||
| - | │ ├── bnm | ||
| - | │ │ ├── bnm-868.conf # The board configuration file. | ||
| - | │ │ │ | ||
| - | │ │ └── bnm.conf # The global configuration file. | ||
| - | │ │ | ||
| - | │ ├── init.d | ||
| - | │ │ └── bnm # The startup script. | ||
| - | │ │ | ||
| - | │ └── rc5.d | ||
| - | │ └── S55bnm -> ../init.d/bnm # The BNM is started whith runlevel 5. | ||
| - | │ | ||
| - | ├── usr | ||
| - | │ ├── bin | ||
| - | │ │ └── klk_spectral_scan # The utility which run the spectral scan. | ||
| - | │ │ | ||
| - | │ └── share | ||
| - | │ └── bnm | ||
| - | │ ├── bnm-868.conf # The default board configuration files. | ||
| - | │ ├── bnm-915.conf # These files define the min and max frequencies | ||
| - | │ ├── bnm-923.conf # to scan. | ||
| - | │ │ | ||
| - | │ └── klk-loraloc-v1.0.6.kbin # The needed loraloc firmware. | ||
| - | │ | ||
| - | └── var | ||
| - | ├── backups | ||
| - | │ └── bnm | ||
| - | │ ├── bnm.0.tar.gz # The backup files. Every output files are included | ||
| - | │ └── bnm.1.tar.gz # in these files. Backup files are rotated by size. | ||
| - | └── log | ||
| - | └── bnm | ||
| - | ├── bnm_slot1_radio1_180219155423.csv # The last output files. There is one for each slot | ||
| - | └── bnm_slot1_radio2_180219155423.csv # and for each radio. | ||
| - | </code> | ||
| ==== Configure BNM ==== | ==== Configure BNM ==== | ||
| Line 50: | Line 9: | ||
| These parameters can be changed by the user in the global configuration file ''/etc/bnm/bnm.conf''. | 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 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 is the following. | + | The default configuration on iBTS (release 4.2) is the following: |
| <file bash bnm.conf> | <file bash bnm.conf> | ||
| Line 60: | Line 19: | ||
| BANDWIDTH_HZ=62500 | BANDWIDTH_HZ=62500 | ||
| BITRATE_BPS=600 | BITRATE_BPS=600 | ||
| - | RADIO_NB="1 2" | + | RADIO_NB="1" |
| # Number of samples by frequency. | # Number of samples by frequency. | ||
| Line 75: | Line 34: | ||
| </file> | </file> | ||
| //''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.//\\ | //''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 default board configuration file. The board configuration file name changes according to the region. | + | 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. |
| <file bash bnm-868.conf> | <file bash bnm-868.conf> | ||
| Line 173: | Line 135: | ||
| ==== Known issues ==== | ==== Known issues ==== | ||
| - | * 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''. | + | * 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. | * 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. | ||
| + | |||
| + | ===== Manual Spectral Scan ===== | ||
| + | |||
| + | ==== Operating principle ==== | ||
| + | The lorascan script can be used to interact with lorad and request scans (only if LBT is not activated). | ||
| + | |||
| + | Only available with keros FW 5 and for iStation, iFemto, iFemto-evolution and iBTS (no spectralscan on iZeptoCells). | ||
| + | |||
| + | The script is packaged to include everything you need for simple installation via IPK: | ||
| + | |||
| + | * /user/spectral/lorascan | ||
| + | * lorascan script | ||
| + | * /user/spectral/scan | ||
| + | * Script to scan at regular intervals (this can be over several consecutive days) | ||
| + | * Script to scan a duration (one time) | ||
| + | * /user/spectral/spectralscan.conf | ||
| + | * configuration file for the script scan | ||
| + | * /user/spectral/spectralscan | ||
| + | * script used for activation/deactivation and run | ||
| + | * /etc/logrotate.d/spectralscan | ||
| + | * configuration for the logrotate | ||
| + | |||
| + | ==== Prerequisite ==== | ||
| + | |||
| + | - Keros firmware must be 5.11.0 | ||
| + | - lorad must be started for the script to work | ||
| + | - Gateway compatiblity: | ||
| + | * iStation | ||
| + | * iFemto | ||
| + | * iFemto-evolution | ||
| + | * iBTS | ||
| + | |||
| + | |||
| + | === Limitation === | ||
| + | Not available for iZeptoCells (no sniffer). | ||
| + | |||
| + | |||
| + | ==== Installation ==== | ||
| + | |||
| + | Installation is performed via a magic link: ''curl --compressed -s https://upgrade.wanesy.com/spectralscan_fw5 | sh'' \\ | ||
| + | or by installing the ipk package (in the /user/.updates directory, then kerosd -u && reboot). | ||
| + | |||
| + | ==== Configuration ==== | ||
| + | |||
| + | The script is configured in the /user/spectral/spectralscan.conf file: | ||
| + | <file bash spectralscan.conf> | ||
| + | INTERVAL=10 | ||
| + | STEP=20 | ||
| + | TIMEZONE=0 | ||
| + | CONFIGURATION_FILE=/etc/lorad/lorad.json | ||
| + | FREQ_MIN= | ||
| + | FREQ_MAX= | ||
| + | </file> | ||
| + | ''INTERVAL'': Minutes between two scans | ||
| + | |||
| + | ''STEP'': Number of measurements to complete the scan | ||
| + | |||
| + | ''TIMEZONE'': Number of hours to add to timestamp (default 0) | ||
| + | |||
| + | ''CONFIGURATION_FILE'': File to be used for scanning frequencies | ||
| + | |||
| + | ''FREQ_MIN/FREQ_MAX'': If not, the values will be those of lorad.json | ||
| + | |||
| + | ==== How it works ==== | ||
| + | |||
| + | === Scan at regular intervals === | ||
| + | |||
| + | == Activation == | ||
| + | |||
| + | To start it up: <code>/user/spectral/spectralscan --activate</code> | ||
| + | |||
| + | To stop it: <code>/user/spectral/spectralscan --deactivate</code> | ||
| + | |||
| + | To uninstall it: <code>/user/spectral/spectralscan --remove</code> | ||
| + | |||
| + | |||
| + | |||
| + | After activation, a line is added to the crontab | ||
| + | |||
| + | <code> | ||
| + | */10 * * * * /user/spectral/spectralscan --run >> /tmp/spectral.log 2>&1 | ||
| + | </code> | ||
| + | In this example, scanning will take place every 10 minutes. | ||
| + | |||
| + | |||
| + | |||
| + | For manual triggering: | ||
| + | |||
| + | <code>/user/spectral/spectralscan --run</code> | ||
| + | |||
| + | <code>/user/spectral/scan -periodicscan<code> | ||
| + | |||
| + | |||
| + | |||
| + | == Results == | ||
| + | |||
| + | Each time the script is run, the results are stored in /var/log/spectralscan.log: | ||
| + | |||
| + | <code> | ||
| + | Date;863000000;863200000;863400000;863600000;863800000;864000000;864200000;864400000;864600000;864800000;865000000;865200000;865400000;865600000;865800000;866000000;866200000;866400000;866600000;866800000;867000000;867200000;867400000;867600000;867800000;868000000;868200000;868400000;868600000;868800000;869000000;869200000;869400000;869600000;869800000;870000000 | ||
| + | 2025-05-26T11:24:04+0000;-108.5;-108.5;-108.5;-108.5;-108.5;-106.0;-108.5;-109.0;-109.5;-109.5;-109.5;-109.0;-110.0;-110.5;-111.0;-111.0;-111.0;-111.0;-111.0;-111.0;-110.5;-110.5;-110.5;-111.0;-111.0;-110.5;-110.0;-110.0;-109.5;-109.0;-108.5;-108.0;-108.0;-108.5;-108.0;-108.5 | ||
| + | 2025-05-26T11:36:04+0000;-109.0;-108.0;-108.0;-108.0;-108.5;-105.0;-109.0;-109.0;-110.0;-110.0;-109.5;-110.0;-110.0;-110.0;-111.0;-111.0;-111.0;-111.0;-111.0;-111.0;-111.0;-110.5;-110.5;-110.0;-111.0;-111.0;-110.5;-110.0;-109.5;-109.5;-108.5;-108.5;-108.0;-108.0;-108.5;-108.5 | ||
| + | 2025-05-26T11:39:07+0000;-109.0;-108.5;-108.5;-108.0;-108.5;-106.0;-108.0;-108.0;-109.5;-109.5;-109.5;-110.5;-110.5;-110.5;-110.0;-110.5;-110.5;-111.0;-111.0;-111.0;-111.5;-111.0;-111.0;-111.0;-111.0;-110.5;-109.5;-109.0;-109.5;-109.5;-109.5;-109.0;-109.0;-108.5;-108.5;-108.0 | ||
| + | 2025-05-26T11:42:07+0000;-108.5;-108.5;-108.0;-108.0;-108.0;-105.5;-109.0;-108.5;-109.0;-109.5;-109.5;-109.5;-110.0;-109.5;-110.5;-111.0;-111.0;-111.0;-111.0;-111.0;-111.0;-110.5;-110.5;-110.0;-110.5;-110.5;-110.0;-110.0;-109.5;-109.5;-108.5;-108.5;-108.0;-108.0;-108.5;-108.0 | ||
| + | 2025-05-26T11:45:07+0000;-108.0;-108.0;-108.0;-108.5;-108.5;-106.5;-108.5;-109.5;-109.5;-109.5;-109.5;-109.5;-109.5;-110.0;-111.0;-111.0;-111.0;-111.0;-111.5;-111.0;-111.0;-110.5;-110.5;-111.0;-111.0;-111.0;-110.5;-110.0;-110.0;-109.5;-108.5;-108.0;-108.5;-108.5;-108.5;-108.5 | ||
| + | 2025-05-26T11:48:07+0000;-108.0;-108.0;-108.5;-108.5;-108.5;-106.0;-109.0;-109.0;-109.0;-109.5;-109.5;-109.5;-110.5;-111.0;-111.0;-111.0;-111.0;-111.0;-111.0;-111.0;-110.5;-110.5;-110.5;-111.0;-111.0;-110.5;-110.5;-109.5;-109.5;-109.0;-108.5;-108.5;-108.5;-108.5;-108.5;-108.5 | ||
| + | 2025-05-26T11:51:07+0000;-108.5;-108.0;-108.0;-108.5;-108.5;-106.0;-108.5;-109.0;-109.5;-109.5;-109.5;-109.5;-109.5;-110.5;-111.0;-111.0;-111.0;-111.0;-111.0;-111.0;-111.0;-110.5;-110.0;-110.5;-110.0;-110.5;-110.0;-109.5;-110.0;-109.5;-109.0;-108.5;-108.0;-108.0;-108.5;-108.5 | ||
| + | </code> | ||
| + | |||
| + | |||
| + | === Scan with duration === | ||
| + | |||
| + | == Activation == | ||
| + | |||
| + | To start it: | ||
| + | |||
| + | **Manualy**: <code>/user/spectral/scan -fullscan 30</code> | ||
| + | |||
| + | |||
| + | If no value is entered for duration, the script scans for 120s. | ||
| + | |||
| + | Max value for duration is 300s | ||
| + | |||
| + | **By Magic Link**: <code>curl --compressed -s https://upgrade.wanesy.com/spectralscan_90s | sh</code> \\ | ||
| + | The duration value is set to 90s. | ||
| + | |||
| + | == Results == | ||
| + | |||
| + | <code> | ||
| + | ./scan -fullscan 10 | ||
| + | Starting full scan from 863000000 to 870000000 Hz (36 steps) with duration 10s | ||
| + | Full scan CSV saved to /var/log/full_scan.20250526_115723.csv | ||
| + | |||
| + | Date;863000000;863200000;863400000;863600000;863800000;864000000;864200000;864400000;864600000;864800000;865000000;865200000;865400000;865600000;865800000;866000000;866200000;866400000;866600000;866800000;867000000;867200000;867400000;867600000;867800000;868000000;868200000;868400000;868600000;868800000;869000000;869200000;869400000;869600000;869800000;870000000 | ||
| + | 2025-05-26T11:57:28+0000;-108.5;-108.0;-108.0;-108.5;-108.0;-106.0;-109.0;-109.5;-109.5;-109.5;-109.5;-109.5;-109.5;-111.0;-111.0;-111.0;-111.0;-111.0;-111.0;-111.0;-110.5;-110.0;-110.5;-111.0;-111.0;-110.5;-110.0;-110.0;-109.5;-109.5;-108.5;-108.0;-108.5;-108.5;-108.0;-108.5 | ||
| + | 2025-05-26T11:57:29+0000;-108.5;-108.0;-108.0;-108.0;-108.5;-105.5;-109.0;-109.5;-109.5;-109.5;-109.0;-109.5;-110.5;-110.5;-111.0;-111.0;-111.0;-111.0;-111.0;-111.0;-110.0;-110.5;-111.0;-110.5;-111.0;-110.5;-109.5;-109.5;-109.5;-109.0;-108.5;-108.0;-108.0;-108.5;-108.5;-108.5 | ||
| + | 2025-05-26T11:57:30+0000;-108.0;-108.0;-108.0;-108.0;-108.5;-106.5;-108.5;-109.0;-109.5;-109.5;-109.5;-109.5;-110.0;-110.0;-110.5;-111.0;-111.0;-111.0;-111.0;-111.0;-111.0;-111.0;-110.5;-110.0;-111.0;-110.5;-110.0;-109.5;-109.5;-109.0;-109.0;-108.5;-108.0;-108.0;-108.5;-108.5 | ||
| + | 2025-05-26T11:57:31+0000;-108.0;-108.0;-108.5;-108.0;-108.5;-106.5;-109.0;-109.5;-109.5;-109.5;-109.5;-109.5;-109.5;-110.5;-111.0;-111.0;-111.0;-111.0;-111.0;-111.0;-111.0;-110.5;-110.0;-111.0;-111.0;-111.0;-110.5;-109.5;-109.5;-109.5;-109.0;-108.0;-108.5;-108.5;-108.5;-108.5 | ||
| + | 2025-05-26T11:57:32+0000;-108.0;-108.0;-108.0;-108.5;-108.0;-106.0;-109.0;-109.0;-109.5;-110.0;-109.5;-109.5;-110.0;-110.5;-111.0;-110.5;-111.0;-111.0;-111.0;-111.5;-111.0;-110.0;-111.0;-110.5;-111.0;-110.5;-109.5;-109.5;-109.5;-109.5;-108.5;-108.0;-108.0;-108.5;-108.5;-108.5 | ||
| + | 2025-05-26T11:57:33+0000;-108.5;-108.0;-108.5;-109.0;-108.5;-106.5;-108.5;-109.5;-109.5;-109.5;-109.5;-109.5;-110.0;-110.5;-111.0;-111.0;-111.0;-111.0;-111.0;-111.0;-110.0;-110.5;-110.0;-110.5;-110.5;-110.5;-110.5;-109.5;-109.5;-109.5;-108.5;-108.5;-108.5;-108.5;-108.5;-108.5 | ||
| + | 2025-05-26T11:57:34+0000;-108.5;-108.0;-108.5;-108.5;-108.5;-105.5;-109.0;-109.0;-109.5;-109.5;-109.5;-109.5;-110.0;-110.5;-111.0;-111.0;-111.0;-111.0;-111.0;-111.0;-111.0;-110.5;-110.5;-110.5;-111.0;-110.5;-110.0;-109.5;-109.5;-109.5;-108.5;-108.0;-108.5;-108.5;-108.5;-108.5 | ||
| + | 2025-05-26T11:57:35+0000;-108.5;-108.0;-108.5;-108.0;-109.0;-105.0;-108.5;-109.0;-109.0;-109.5;-109.0;-109.5;-110.0;-110.5;-111.0;-111.0;-110.5;-111.0;-111.0;-111.0;-110.5;-110.5;-110.0;-111.0;-111.0;-110.0;-110.5;-109.5;-109.5;-109.5;-109.0;-108.5;-108.0;-108.5;-108.5;-108.5 | ||
| + | 2025-05-26T11:57:36+0000;-108.0;-108.0;-108.0;-108.0;-108.5;-106.0;-108.5;-109.5;-109.5;-109.5;-109.5;-109.5;-109.5;-110.5;-111.0;-110.5;-111.0;-111.0;-111.0;-111.0;-110.5;-110.0;-110.5;-110.5;-110.0;-110.5;-110.0;-110.0;-109.5;-109.5;-108.5;-108.0;-108.0;-108.5;-108.0;-108.5 | ||
| + | 2025-05-26T11:57:37+0000;-108.5;-108.0;-108.0;-108.0;-108.5;-106.5;-108.5;-108.5;-109.5;-109.5;-109.5;-109.5;-109.5;-110.0;-111.0;-111.0;-111.0;-111.0;-111.5;-111.0;-111.0;-111.0;-109.5;-110.5;-110.5;-111.0;-110.0;-109.5;-110.0;-109.0;-108.5;-108.0;-108.0;-108.5;-108.5;-108.5 | ||
| + | 2025-05-26T11:57:38+0000;-108.5;-108.0;-108.0;-108.5;-108.5;-106.5;-108.5;-109.5;-109.5;-109.5;-109.5;-109.0;-109.5;-111.0;-110.5;-111.0;-111.0;-111.0;-111.0;-111.0;-111.0;-110.5;-110.5;-110.5;-110.5;-110.0;-109.5;-109.5;-109.5;-109.0;-109.0;-108.5;-108.0;-108.0;-108.5;-108.5 | ||
| + | 2025-05-26T11:57:39+0000;-108.5;-108.0;-108.0;-108.0;-108.5;-106.5;-109.0;-109.5;-109.5;-109.5;-109.5;-109.5;-109.5;-110.5;-111.0;-110.5;-111.0;-111.0;-111.0;-110.5;-110.5;-110.5;-110.5;-111.0;-111.0;-110.5;-110.5;-109.5;-109.5;-109.5;-109.0;-108.0;-108.0;-108.5;-108.5;-108.5 | ||
| + | </code> | ||
| + | |||
| + | ==== How to Exploiting results ==== | ||
| + | |||
| + | If the scan has been launched with the ML, the result is automatically displayed in the cockpit logs. | ||
| + | |||
| + | In Scan at regular intervals case, files can be retrieved using the classic get_logs function. | ||
| + | |||
| + | ==== Package ==== | ||
| + | |||
| + | {{ :resources_multi_hardware:spectralscan_1.3.0_klkgw.ipk |}} | ||
| + | |||