This shows you the differences between two versions of the page.
Both sides previous revision Previous revision | |||
wiki:lora:scan [2020/10/22 10:47] tda |
wiki:lora:scan [2025/06/18 18:18] (current) ehe |
||
---|---|---|---|
Line 137: | Line 137: | ||
* 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''. | * 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: ''/user/spectral/spectralscan --activate'' | ||
+ | |||
+ | To stop it: ''/user/spectral/spectralscan --deactivate'' | ||
+ | |||
+ | To uninstall it: ''/user/spectral/spectralscan --remove'' | ||
+ | |||
+ | |||
+ | |||
+ | 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: | ||
+ | |||
+ | ''/user/spectral/spectralscan --run'' | ||
+ | |||
+ | ''/user/spectral/scan -periodicscan'' | ||
+ | |||
+ | |||
+ | |||
+ | == 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: | ||
+ | |||
+ | **Manually**: ''/user/spectral/scan -fullscan 30'' | ||
+ | |||
+ | |||
+ | If no value is entered for duration, the script scans for 120s. | ||
+ | |||
+ | Max value for duration is 300s | ||
+ | |||
+ | **By Magic Link**: ''curl --compressed -s https://upgrade.wanesy.com/spectralscan_90s | sh'' \\ | ||
+ | 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 |}} | ||
+ | |||