User Tools

Site Tools


fmlist_scanner:setup_scanner_software

3. Installation & setup of scanner software

Installation of the software

after login with the dedicated scanner user

sudo apt install -y git
cd $HOME
git clone https://github.com/hayguen/fmlist_scan.git
cd fmlist_scan
cp setup.sh my_setup.sh

copying setup.sh to my_setup.sh isn't strictly necessary, but it will easen later update

nano my_setup.sh

check the documented/commented options and configure your values, save the file and quit nano editor.

now, you are ready to start the setup with

sudo ./my_setup.sh

with an additional SSH connection on a Pi, you might check/watch the CPU temperature - while the setup is running

while true; do cat /sys/class/thermal/thermal_zone*/temp | tr "\n" " " ; echo "" ; sleep 3 ; done

the setup takes a while; go get a coffee .. or tea or .. !

when finished, you need to reboot, that udev rules for user access of the RTLSDR dongle

sudo reboot now

Prepare the result directory

PC

On a PC, you can also use a regular directory, which has to be configured with the scanner settings

nano ~/.config/fmlist_scan/config

check and configure the lines

export FMLIST_SCAN_MOUNT="0"                    # "0" or "1"; default is "1". saving results requires successful mount of /mnt/sda1
export FMLIST_SCAN_RESULT_DEV=""                # which device to mount
export FMLIST_SCAN_RESULT_DSK=""                # which device (for fdisk) to check disk identifier
export FMLIST_SCAN_RESULT_DIR="/home/scanner/results"   # where to save results - in subfolder fmlist_scanner

Pi

On a Pi, you should have an additional external micro SD card for the results. the internal SD card with the operating system shouldn't be trashed.

edit the settings with

nano ~/.config/fmlist_scan/config

check and configure the lines - especially the device name /dev/sda

export FMLIST_SCAN_MOUNT="1"                    # "0" or "1"; default is "1". saving results requires successful mount of /mnt/sda1
export FMLIST_SCAN_RESULT_DEV="/dev/sda1"       # which device to mount
export FMLIST_SCAN_RESULT_DSK="/dev/sda"        # which device (for fdisk) to check disk identifier
export FMLIST_SCAN_RESULT_DIR="/mnt/sda1"       # where to save results - in subfolder fmlist_scanner

Setup Flash-Friendly-File-System aka F2FS

Despite the non-existing 'quality' of most USB memory sticks, you can extend their lifetime by using a special filesystem for Flash drives: F2FS.

Micro-SD cards generally have a superior quality - compared against USB memory sticks. But there are differences also. Prefer SD cards labelled with Max/High Endurance , which should have superior quality.

Anyway, you will also extend SD cards' lifetime utilizing F2FS

scanner_format_f2fs.sh

see also Flash Friendly File System (F2FS)

Review & configure all settings

nano ~/.config/fmlist_scan/config

you might want to check following entries for the upload

  • FMLIST_USER : your account at https://www.fmlist.org/
  • FMLIST_RASPI_ID : to distinguish several scanners
  • FMLIST_OM_ID : also from https://www.fmlist.org/
  • FMLIST_UP_COMMENT : some comment, e.g. your antenna ..
  • FMLIST_SCAN_GPS_* : your static GPS coordinates, if scanner is placed at a fixed place

the RTLSDR sometime freezes/hangs. to prevent an infinite unproductive loop, check following entries

  • FMLIST_SCAN_DEAD_* : especially the REBOOT
  • FMLIST_SCAN_RESET_DEVICE: check, if USB device reset works - especially with an USB-Hub
  • FMLIST_FM_RTLSDR_DEV
  • FMLIST_DAB_RTLSDR_DEV

you need to enter the serial of the used RTL-SDR, that an USB reset can take place. without, a reboot would be necesessary!

you can determine the serial number of an RTLSDR dongle with

rtl_test

press Ctrl-C to abort sample loss check

and surely very important for automatic start of the scanner

  • FMLIST_SCAN_AUTOSTART

Calibrate your RTLSDR dongle

Actual dongles with an error < 1 ppm won't make a big difference .. but for other dongles, the calibration will be important - especially for DAB.

kal.sh

this takes some minutes. the results are saved in the configuration file.

Setup automatic upload of scan results

Check/uncomment automatic upload with

crontab -l
crontab -e

Setup Remote, Monitoring or Service connection

Using the scanner at home in your local network, you should always be able to connect with SSH.

In following cases, it is more difficult:

  • you want to connect from outside (you would need to configure your modem's firewall rules)
  • with a so-called DS-Lite, connecting from outside will get impossible
  • when the Pi uses mobile internet, e.g. LTE from your cell phone, you usually DS-Lite

In any of aboce cases, SideDoor service might be helpful. Sidedoor is a so-called revers-ssh protocol:

  • the Pi automatically connects to a 'server'-computer (in my home), and waits
  • the device, e.g. smartphone, that wants to establish a connection the that Pi, connects over the waiting connection over my 'server'

setup of sidedoor

cd ~/fmlist_scan/src
sudo -E ./setup_sidedoor 8001

you need to replace the 8001 by a unique port number! simply send me an email request to h_ayguen@web.de

after activation, you can test with

ssh -p 9001 scanner@hayguen.hopto.org

again, you need to replace the 9001 by 1000 + the port number, your Pi got assigned.

you can control the sidedoor service with following commands:

sudo systemctl status sidedoor
sudo systemctl stop sidedoor
sudo systemctl disable sidedoor
sudo systemctl enable sidedoor
sudo systemctl start sidedoor

Oliver and me gain access to the Pi by installing ssh public keys into a new user account fmlist_service with sudo rights! This is intentended as a service - in case you need some (configuration) help.

if you don't trust us, simply don't install the sidedoor!

Setup control webserver

Many configuration and monitoring operations can also get carried out through a simple webserver. It is automatically installed, but not activated.

For activation perform

cd ~/fmlist_scan
sudo ./my_setup.sh wsrv

You can control the service with following commands - if necessary

sudo systemctl status scan-webserver.service
sudo systemctl start  scan-webserver.service
sudo systemctl stop   scan-webserver.service

The webserver is only accessible from your home network (LAN).

You can connect with your browser on port 8000 - knowing the IP address or hostname of your Pi/scanner:

connection with hostname requires a network router which does provide DNS. you can simply check with ping

ping raspberrypi
ping scannerNN

Another alternative is, to allow allow reporting FMLIST the local IP address of your Pi with

  • edit/enable the configuration entry FMLIST_SCAN_AUTO_IP_INFO
  • uncomment (remove the # at start) the line with /home/scanner/bin/scanner_auto_config.sh of your crontab (crontab -e)
nano ~/.config/fmlist_scan/config
crontab -e

and connect with the IP address reported in the myURDS… menu at https://www.fmlist.org/urds/

Despite the fact, that your local IP address and the link to the webserver is listed on FMLIST, access is restricted to your home network (LAN).

The initial/default password is scanner123, which is to be changed.

Setup Boot Target Console/GUI

With new OS, remote X isn't activated by just setting DISPLAY, if the local GUI is active. The GUI needs to be deactivated, that DISPLAY can work.

Use following command to check boot-mode:

sudo systemctl get-default

to boot into console login:

sudo systemctl set-default multi-user.target

to boot into GUI:

sudo systemctl set-default graphical.target
fmlist_scanner/setup_scanner_software.txt · Last modified: 2022/07/27 (external edit)