There isn’t a whole lot of discussion here on these. First I find few VHF/UHF radios support CIV. Then you’re relying on hamlib support. In the case of the TM-V71A, the support is only partially there. The network dameon part rigctrld is not functional.
It would be idea to announce the currently tuned frequency to a remote user upon connection.
Has anyone done this?
It would also be slick if there was supermon support.
I set up a script in Asterisk that reads DTMF codes (*99, #) that trigger short shell scripts that will send CAT PTT commands to my IC-9100 over the USB interface.
The features.conf file will set up capture of the DTMF and pass along to a shell script. You also have to set up the extensions.conf file for your radio-extension. More CAT commands is something I’ve wanted to do but haven’t had time. Now that the holidays are over I might revisit. You will probably have to record a few words like “Megahertz” so that it can speak properly.
One thing I want to do is use the SendText() command instead of announcing the frequency. That way it shows on the handset display.
Could you post an example of what you put in functions.conf? The documentation in that file and in that link is not very clear. For example if I wanted to call a script eg. AGI(script.sh) or directly call a script, from a DTMF command eg. *699 is that easy to do?
BTW would also be nice if the PTT command from SIP phones could be shortened from *99 to just one digit… maybe like just a 5 to key PTT and # to unkey…?
I just added the following lines to functions.conf
; Added for keying up ICOM IC-9100 over USB using Hamlib
ptt-on-9100 => *99,caller,System,/usr/local/bin/ptt_on_9100.sh
ptt-off-9100 => #,caller,System,/usr/local/bin/ptt_off_9100.sh
The ptt-on-9100 is just the name for the command. I used *99 and # to maintain default commands for keying/unkeying the node, you can make it whatever you wish.
ptt_on_9100.sh:
#!/usr/bin/env bash
set -euo pipefail
PORT=/dev/ttyUSB0
BAUD=19200
MODEL=3068
rigctl -m $MODEL -r $PORT -s $BAUD T 1
ptt_off_9100.sh:
#!/usr/bin/env bash
set -euo pipefail
PORT=/dev/ttyUSB0
BAUD=19200
MODEL=3068
rigctl -m $MODEL -r $PORT -s $BAUD T 0
Pretty simple script. I should probably add some feedback and a timeout timer if I’m going to beyond proof of concept.
Finally had a chance to try this attempt at making a DTMF command in features.conf, but it does nothing. K0JEG you mentioned functions.conf but there is no such file so I think you mean features.conf? So in that file I added:
; Dynamic Feature Groups: ; Dynamic feature groups are groupings of features defined in [applicationmap] ; that can have their own custom key mappings. To give a channel access to a dynamic ; feature group, add the group name to the value of the DYNAMIC_FEATURES variable. ; ; example: ; [myGroupName] ; defines the group named myGroupName ; testfeature => #9 ; associates testfeature with the group and the keycode '#9'. ; retrieveinfo => ; associates retrieveinfo with the group and uses the keycode specified ; ; in the [applicationmap].
So I added the below under that:
[dtmfGroup]
test-play =>
And it also says:
; Note that the DYNAMIC_FEATURES channel variable must be set to use the features ; defined here. The value of DYNAMIC_FEATURES should be the names of the features ; to allow the channel to use separated by '#'. For example: ; ; Set(__DYNAMIC_FEATURES=myfeature1#myfeature2#myfeature3) ; ; (Note: The two leading underscores allow these feature settings to be set ; on the outbound channels, as well. Otherwise, only the original channel ; will have access to these features.) ; ; The syntax for declaring a dynamic feature is any of the following: ; ; => <DTMF_sequence>,[/],[,[,MOH_Class]] ;
But it’s not at all clear where that Set is supposed to go, and some web searches seem to indicate that these “features” only apply when a call is active? So does that mean only if another node is connected, or is app-rpt itself and a channel driver considered an ‘active’ call?
The more I use ASL the more I am convinced that Asterisk is a ridiculously overcomplicated platform for a ham ROIP app, and basic things like defining a DTMF command cannot just be directly done in any simple way. The way I do them now with an ‘autopatch’ line in rpt.conf that calls a context in extensions.conf works well enough, but it has some limitations and would be nice if there was a simpler way like alluded to above with just a simple one line definition of the command and a shell script or Asterisk function to be called. Thanks, NR9V
Apologies, the file is /etc/asterisk/features.conf
In my case I created a Dynamic Feature Group called “System” that is used to call the shell scripts. I’m also working on some Python code that will evoke an MQTT topic/message to send many different commands.
; Dynamic Feature Groups:
; Dynamic feature groups are groupings of features defined in [applicationmap]
; that can have their own custom key mappings. To give a channel access to a to a dynamic
; feature group, add the group name to the value of the DYNAMIC_FEATURES variable
;
; example:
; [myGroupName] ; defines the group named myGroupName
; testfeature => #9 ; associates testfeature with the group and the keycode '#9'.
; retrieveinfo => ; associates retrieveinfo with the group and uses the keycode specified
; ; in the [applicationmap].
; Added for keying up ICOM IC-9100 over USB using Hamlib
ptt-on-9100 => *99,caller,System,/usr/local/bin/ptt_on_9100.sh
ptt-off-9100 => #,caller,System,/usr/local/bin/ptt_off_9100.sh