IC-7100 Hamlib

by on under programming
1 minute read

IC-7100 Hamlib

Using cron and rigctl from Hamlib to control my IC-7100

I make use of rigctl which is a CLI tool that gets built when you make Hamlib.

This is a sample of my crontab. Basically at 30 mins past 9am on Sunday it will run rigctl and control the radio on the port ttyUSB0 with radio model 370 (IC-7100) which is only available if you build it from source as support for that radio has only recently been added. It then changes the current memory channel to 29 which is what I have GB3ZB programmed in as.

The crontab file

# Change radio to GB3ZB on Sunday morning for GB2RS news.
30 9 * * 7 /home/peter/rigctl-gb2rs-started.sh

# Change radio to GB3BS after GB2RS news has ended.
0 10 * * 7 /home/peter/rigctl-gb2rs-ended.sh

rigctl-gb2rs-started.sh script

#!/bin/bash

# Change radio to GB3ZB on Sunday morning for GB2RS news.

# Grab current vol.
/usr/local/bin/rigctl -r /dev/ttyUSB0 -m 370 l AF > ~/.current-volume

# Change volume to be audible.
/usr/local/bin/rigctl -r /dev/ttyUSB0 -m 370 L AF 0.2

# Change memory channel.
/usr/local/bin/rigctl -r /dev/ttyUSB0 -m 370 E 29

rigctl-gb2rs-ended.sh script

#!/bin/bash

# Change radio to GB3BS after GB2RS news has ended.

# Set volume back.
/usr/local/bin/rigctl -r /dev/ttyUSB0 -m 370 L AF `cat ~/.current-volume`

# Change memory back to GB3BS since Hamlib cannot retrieve current memory from IC-7100 yet.
/usr/local/bin/rigctl -r /dev/ttyUSB0 -m 370 E 31
comments powered by Disqus