Linux Mini-PC Setup for 24/7 WSPR RX/TX Operation
Updated 2020-02-06
The Hardware you need:
- (QRP)-SSB-HF-Transceiver with VOX,
- Mini-PC (i386), 800 MHz - 1,5 GHz CPU-Frequ., 1 GB.RAM, 8 GB CF-Card (4 GB with restrictions) or CF-SD Adapter wth SD-Card (IGEL-Mini-PC Thin Client, Fujitsu Futro S550, Mini-PC Non-PAE-boards etc.)
- WLAN-USB-Stick
Setup:
Download Debian 10 (i386) and burn a CD or DVD. Change the boot order in the Mini-PC-BIOS to removable USB device first.
Install Debian 10 on the 8 GB CF-Card, Partition 1 EXT4 file system with / directory and Partition 2 a (nearly unused) linux swap with ca. 200 MB, the boot loader on sda (CF-Card). Select the LXDE Desktop.
When Debian 10 works, open the LX Terminal, type 'su' and your root passwort and install some software:
$ apt-get install gedit vino dconf-editor gdebi pulseaudio pavucontrol ntpdate
Configure the vino vnc-server for remote desktop access with the dconf editor. Go to org > gnome > dektop > remote-access and do your settings. Then insert '/usr/lib/vino/vino-server' into the autostart folder (default applications for LX Session).
To have access to your mini-PC from another PC in your local network with a static address, set the Ethernet or WiFi-Network IP4-settings to "manual" according to the settings of your LAN/WLAN router, e.g.:
Address: 192.168.178.180 Netmask 255.255.255.0 Gateway 192.168.178.1
Synchronize PC clock: Open LX-Terminal, type 'su' and then 'crontab -e'. Edit this file to introduce a task to be run by cron: Append '*/23 * * * * /usr/sbin/ntpdate -b ptbtime2.ptb.de' . "ptbtime2.ptb.de" is my favourite time server. Set the synchronisation time to 1 hour or less (e.g. 23 minutes).
Download libgfortran3_6.3.0-18+deb9u1_i386.deb and gcc-6-base_6.3.0-18+deb9u1_i386.deb and the latest WSJT-X release (2.1.2) from the internet and install the packages in the preceding order.
Start the program and configure the settings.
"The NAND Flash memory built into compact flash (CF) cards, SSD (solid state drives) and SD cards can only perform a certain number of program (erase) operations due to its limited endurance" (TDK SMART). So it is a good idea esp. with regard to a 24/7 operation, to reduce the number of write cycles as far as possible.
This Debian installation is not intended for web browsing, but if you use Firefox web browser from time to time, you can reduce its excessive writes to disk. Type "about:config" in the address bar and set browser.sessionsstore.intervall from 15000 (15 sec.) to 1800000 (30 min).
tmpfs can write to RAM instead of the local disk (in this case, the SD card). Using it is simple. All you need is an entry to the /etc/fstab file (to mount the folder you wish to have written to RAM).
Linux make frequent writes to a varity of locations. the following entries I use as a starting point:
tmpfs /tmp tmpfs defaults,noatime,nosuid,size=50m 0 0
tmpfs /var/tmp tmpfs defaults,noatime,nosuid,size=30m 0 0
tmpfs /var/log tmpfs defaults,noatime,nosuid,mode=0755,size=50m 0 0
tmpfs /var/run tmpfs defaults,noatime,nosuid,mode=0755,size=20m 0 0
It is no problem for me to do it with the WSJT-X directory, too. The WSJT-X.ini file in the folder /home/username/.config is not affected:
tmpfs /home/wolf/.local/share/WSJT-X tmpfs nodev,noatime,nosuid,size=30m,mode=0755 0 0
The linux mount option noatime disables atime updates and eliminates the need by the system to make writes to the file system for files which are simply being read. In the example below I have set it to the / file system:
# / was on /dev/sda5 during installation
UUID=f88b5208-c136-4a76-bcf2-4feae0619dda / ext4 noatime,errors=remount-ro 0 1
Set swappiness to 1, this means that the kernel will swap (= write to the swap partition on the CF-Card) only to avoid an out-of-memory condition. (Standard is 60).
$ su
$ gedit /etc/sysctl.conf
add the line:
vm.swappiness=1
after reboot you can test it with:
$ cat /proc/sys/vm/swappiness
To activate the autologin function open /usr/share/lightdm/lightdm.conf.d/01_debian.conf as root and insert:
[Seat:*]
autologin-user=<YOUR USER>
autologin-user-timeout=0
....
....
That`s all.
With the above described configuration 2 of my Mini-PCs (and 2 homebrew HF-transceivers) work 24/7 since January 2017 with 1 or 2 forced monthly reboots (WSJT-X, WSPR mode). Concerning 24/7 I do not participate in the "allowed/not allowed" discussion. When I am not at home, WSJT-X is set to RX-only.