14.5 Installing /updating Hamlib on the SD card
Using the web browser on the RPi, access: https://github.com/Hamlib/Hamlib
CODE button - download zip (zipped source code)
- down load to /home/pi/Downloads (or other folder of your choice)
File manager - navigate to folder /home/pi/downloads
click on Hamlib-master.zip and unzip to same folder.
Terminal on RPi - navigate to Hamlib-master folder, ie:
$ cd Downloads
$ cd Hamlib-master
You need to have made the following download/installations once.
You will not need to run these installs on subsequent Hamlib builds
$ sudo apt-get install automake
$ sudo apt-get install libtool
- bootstrap permissions;
$ chmod 744 bootstrap (this is not remembered unless you configure it in startup)
$ ./configure --prefix=/usr/local --enable-static
$ sudo make install
$ sudo ldconfig
Test the install. This will give a version report.
$ rigctl -V
If you now run File manager from the RPi desktop icon, you display the contents of /home/pi.
You have FTP access to /home/pi from an FTP client (eg: Filezilla) on you PC using:
IP address (eg: 192.168.1.117, user = piuser, password = feline.
Enter the Downloads directory. You will see Hamlib-master.zip and the Hamlib-master folder.
These are no longer needed once the above install is completed.
They should be deleted before any further download / installs of Hamlib.
Give the apache webserver the rights to run killall frrom a shell_exec command
RPi terminal - edit the sudoers file:
$ sudo nano /etc/sudoers
Add the line: apache localhost=(ALL) NOPASSWD:/usr/bin/killall
This allows the php code to execute: shell_exec("killall rigctld &");
Explanation: If you change from one Hamlib rig to another. then a restart occurs.
On the server, rigctld will not restart if it is still running from the previous session.
The system will therefore freeze when it attempts to get responses from the previous (wrong) rig.
piWebCAT PHP calls: shell_exec("killall rigctld &"); to kill rigctld before restarting it.
It needs the above permission change in the /etc/sudoers file to allow it to do this.