Menu

xmlrpc_howto Log in to Edit

XML-RPC shell scripting

fldigi supports a remote procedure call interface that complies with XMLRPC Application Programming Interface.
Xmlrpc calls may be initiated from with another compiled application or from a shell script. Perl, Python, TclTk, and other script languages support xmlrpc clients and servers.

fldigi-shell is a Perl script that allows casual access to all of the fldigi remote procedure calls. Follow this process (Debian based Linux) to load and test fldigi-shell. It depends on the [[https://metacpan.org/release/RPC-XML|RPC::XML]] Perl script.

$ cd
$ mkdir bin (if not already present)
$ cd bin
$ wget http://www.w1hkj.com/files/fldigi/fldigi-shell
$ chmod a+x fldigi-shell

$ cd
$ mkdir perl-stuff
$ cd perl-stuff
$ wget https://cpan.metacpan.org/authors/id/R/RJ/RJRAY/RPC-XML-0.80.tar.gz
$ tar xzf RPC*gz
$ rm RPC*gz
$ cd RPC-XML-0.80
$ perl Makefile.PL
$ make && make test

(if PASS)

$ sudo make install

check to see if /home/<user>/bin is in your path to binaries</user>

$ echo $PATH

something like ''.../home/dave/bin:...''

If yes then you can execute fldigi-shell from any PWD (present working directory).
If not, then cd back to the /home/<user>/bin directory</user>

$ cd ~/bin

Start fldigi either from a terminal or from a menu / icon launcher.

Start fldigi-shell

$ fldigi-shell

fldigi %

help - gives the complete list of control commands, some to control fldigi-shell behavior, most for setting or fetching data from the executing fldigi.

fldigi % rig.get_frequency
14070000.000000

fldigi % rig.set_frequency 7070000
14070000.000000

fldigi % rig.get_frequency
7070000.000000

fldigi % modem.get_name
BPSK31

etc.


Related

Wiki: how_to