HOWTO automatically start hamlib's rigctld, FreeDATA's modem daemon and create a shortcut on the Desktop - Raspberry pi OS
This document will walk you through the required steps in order to get rig control working:
FreeDATA relies on Hamlib. The recommended setup is to use rigctld, which allows multiple user programs to share one radio.
Raspberry pi OS:
cd ~ sudo apt-get install automake libtool git clone https://github.com/Hamlib/Hamlib.git cd Hamlib ./bootstrap ./configure make sudo make install sudo ldconfig
Let's assume for a minute that you're going to control a Yeasu FT-857nd connected via usb on
/dev/ttyUSB0, 4800 baud.
Get a list of radio identifiers:
The ft-857 is listed with id 122.
Start the daemon to test that parameters etc. are correct:
rigctld -m 122 -r /dev/ttyUSB0 -s 4800
Stop the daemon using ctrl + c and follow the next steps.
First time we need to create a file called ".desktop" in the /home/pi/.config/autostart folder
cd ~ mkdir ~/.config/autostart
Now edit the file called .desktop and add the following
[Desktop Entry] Name=File Manager Exec=pcmanfm Type=Application Name=FreeDATA Exec=sh /home/pi/FreeDATA/freedata_startup.sh Type=Application NotShowIn=LXDE;
In your FreeDATA folder create a file called: freedata_startup.sh
Now edit the file called and add the following. Remember to change the RADIOID to your radio identifier from rigctld.
The example uses 122 for the ft-857
#! /bin/bash rigctld -m 122 & cd $HOME/FreeDATA/modem python3 daemon.py & # Uncomment this if you want the GUI to start automatically #cd $HOME/FreeDATA/gui #npm start &
You can create a icon on your desktop to start the FreeDATA GUI
Now create and edit a file called i.e.: freedata.desktop
[Desktop Entry] Name=FreeDATA Exec=sh /home/pi/FreeDATA/freedata_gui.sh Type=Application Icon=/home/pi/FreeDATA/gui/src/img/icon_cube_border.png
In your FreeDATA folder create a file called: freedata_gui.sh
Now edit the file called and add the following
#! /bin/bash cd $HOME/FreeDATA/gui npm start &
If you don't want the message pop-up warning about that this is an executable script, you can start in a terminal: pcmanfm and in Edit->Preferences tick "Don't ask options on launch executable file"
You can now reboot and try your settings
Make sure that the script doesn't start several sessions of the TNC Daemon and/or GUI Daemon.
Add a description and pictures on how to use Desktop Session Settings to enable/disable FreeDATA at startup.