diff --git a/overlay/opt/emcomm-tools/conf/radios.d/xiegu-x6100.json b/overlay/opt/emcomm-tools/conf/radios.d/xiegu-x6100.json index a90ee06..498ece8 100644 --- a/overlay/opt/emcomm-tools/conf/radios.d/xiegu-x6100.json +++ b/overlay/opt/emcomm-tools/conf/radios.d/xiegu-x6100.json @@ -5,14 +5,17 @@ "rigctrl": { "id": "3087", "baud": "19200", - "conf": "data_bits=8,stop_bits=1", - "ptt": "RIG" + "ptt": "RIG", + "conf": "stop_bits=1" }, "notes": [ + "Turn on radio", "Plug USB-C cable into the DEV port", - "Set mode to U-DIG" + "Set mode to U-DIG", + "Set filter to FILTER1", + "Set AGC to AGC--" ], "fieldNotes": [ - "Tested with firmware version: 1.1.6 (2023/03/07)" + "Tested with firmware version: 1.1.9 APP / 1.1.8 BASE" ] } diff --git a/scripts/install-hamlib.sh b/scripts/install-hamlib.sh index 423ba7d..174745f 100755 --- a/scripts/install-hamlib.sh +++ b/scripts/install-hamlib.sh @@ -2,46 +2,48 @@ # # Author : Gaston Gonzalez # Date : 25 November 2022 -# Updated : 19 May 2024 -# Purpose : Install hamlib for rig control +# Updated : 6 October 2025 +# Purpose : Install hamlib for rig control (rigctld) set -e +trap 'last_command=$current_command; current_command=$BASH_COMMAND' DEBUG +trap 'et-log "\"${last_command}\" command failed with exit code $?."' ERR -ET_DIST_DIR=/opt/dist -ET_SRC_DIR=/opt/src +. ./env.sh +. ../overlay/opt/emcomm-tools/bin/et-common -VERSION=4.5 -APP_AND_VERSION=hamlib-$VERSION -TARBALL=$APP_AND_VERSION.tar.gz -URL=https://github.com/Hamlib/Hamlib/releases/download/$VERSION/$TARBALL -INSTALL_DIR=/opt/$APP_AND_VERSION -LINK_PATH=/opt/hamlib +APP="hamlib" +VERSION=4.6.5 +APP_AND_VERSION="${APP}-${VERSION}" +INSTALL_DIR="/opt/${APP_AND_VERSION}" +LINK_PATH="/opt/${APP}" +TARBALL=${APP_AND_VERSION}.tar.gz +URL=https://github.com/Hamlib/Hamlib/releases/download/${VERSION}/${TARBALL} -if [ ! -e $ET_DIST_DIR/$TARBALL ]; then +if [[ ! -e $ET_DIST_DIR/$TARBALL ]]; then et-log "Downloading hamlib: $URL " - curl -s -L -O --fail $URL + download_with_retries ${URL} ${TARBALL} - [ ! -e $ET_DIST_DIR ] && mkdir -v $ET_DIST_DIR - [ ! -e $ET_SRC_DIR ] && mkdir -v $ET_SRC_DIR + [ ! -e ${ET_DIST_DIR} ] && mkdir -v ${ET_DIST_DIR} + [ ! -e ${ET_SRC_DIR} ] && mkdir -v ${ET_SRC_DIR} - mv $TARBALL $ET_DIST_DIR + mv ${TARBALL} ${ET_DIST_DIR} fi CWD_DIR=`pwd` -cd $ET_SRC_DIR -et-log "Unpacking $ET_DIST_DIR/$TARBALL" -tar -xzf $ET_DIST_DIR/$TARBALL && cd $APP_AND_VERSION +cd ${ET_SRC_DIR} +et-log "Unpacking ${ET_DIST_DIR}/${TARBALL}" +tar -xzf ${ET_DIST_DIR}/${TARBALL} && cd ${APP_AND_VERSION} -[ ! -e $INSTALL_DIR ] && mkdir -v $INSTALL_DIR +[ ! -e ${INSTALL_DIR} ] && mkdir -v ${INSTALL_DIR} -et-log "Building Hamlib $VERSION" -./configure --prefix=$INSTALL_DIR +et-log "Building Hamlib ${VERSION}" +./configure --prefix=${INSTALL_DIR} make && make check && make install -[ -e $LINK_PATH ] && rm $LINK_PATH -ln -v -s $INSTALL_DIR $LINK_PATH +[ -e ${LINK_PATH} ] && rm ${LINK_PATH} +ln -v -s ${INSTALL_DIR} ${LINK_PATH} -stow -v -d /opt hamlib -t /usr/local +stow -v -d /opt ${APP} -t /usr/local cd $CWD_DIR - diff --git a/tests/test-hamlib.sh b/tests/test-hamlib.sh new file mode 100755 index 0000000..acff967 --- /dev/null +++ b/tests/test-hamlib.sh @@ -0,0 +1,8 @@ +#!/bin/bash +# Author : Gaston Gonzalez +# Date : 8 November 2024 +# Updated : 6 October 2025 +# Purpose : Test hamlib installation + +OUT=$(which rigctld) +exit $?