XmlRpc Control

As of version 3.0, various aspects of Fldigi's operation can be controlled remotely using XML-RPC.  XML-RPC data is transported via simple HTTP and client implementations exist for most programming languages.  A Perl client that can be used as a control script is included in the source tarball as scripts/fldigi-shell.

The following command line arguments become available when XML-RPC support is compiled into fldigi, as described in the build instructions:

  --xmlrpc-server-address HOSTNAME
    Set the XML-RPC server address. The default is 127.0.0.1.

  --xmlrpc-server-port PORT
    Set the XML-RPC server port. The default is 7362.

  --xmlrpc-allow REGEX
    Allow only the methods whose names match REGEX

  --xmlrpc-deny REGEX
    Allow only the methods whose names don't match REGEX

  --xmlrpc-list
    List all available methods

The --xmlrpc-deny and --xmlrpc-allow switches can be used as a simple access control mechanism.  REGEX specifies a POSIX extended regular expression.  This invocation disables the methods that may cause fldigi to transmit:

  --xmlrpc-deny 'main\.(tx|tune|run_macro)'

By default all methods are allowed.

The --xmlrpc-list switch outputs the method list and exits the program.  If preceded by --xmlrpc-deny or --xmlrpc-allow, it shows the list of
methods as filtered by those switches.

The methods implemented in version 3.1 are listed below.  The three columns are method name, signature (return_type:argument_types), and
description.  Refer to the XML-RPC specification for the meaning of the signature characters (briefly: n=nil, b=boolean, i=integer, d=double,
s=string, 6=bytes, A=array, S=struct).

fldigi.listA:nReturns the list of methods
fldigi.names:nReturns the program name
fldigi.version_structS:nReturns the program version as a struct
fldigi.versions:nReturns the program version as a string
fldigi.name_versions:nReturns the program name and version
fldigi.config_dirs:nReturns the name of the configuration directory
 
modem.get_names:nReturns the name of the current modem
modem.get_namesA:nReturns all modem names
modem.get_idi:nReturns the ID of the current modem
modem.get_max_idi:nReturns the maximum modem ID number
modem.set_by_names:sSets the current modem. Returns old name
modem.set_by_idi:iSets the current modem. Returns old ID
modem.set_carrieri:iSets modem carrier. Returns old carrier
modem.inc_carrier i:iIncrements the modem carrier frequency. Returns the new carrier
modem.get_carrieri:nReturns the modem carrier frequency
modem.get_afc_search_rangei:nReturns the modem AFC search range
modem.set_afc_search_rangen:iSets the modem AFC search range. Returns the old value
modem.inc_afc_search_rangen:iIncrements the modem AFC search range. Returns the new value
modem.get_bandwidthi:nReturns the modem bandwidth
modem.set_bandwidthn:iSets the modem bandwidth. Returns the old value
modem.inc_bandwidthn:iIncrements the modem bandwidth. Returns the new value
modem.get_qualityd:nReturns the modem signal quality in the range [0:100]
modem.search_upn:nSearches upward in frequency
modem.search_downn:nSearches downward in frequency
 
main.get_status1s:nReturns the contents of the first status field (typically s/n)
main.get_status2s:nReturns the contents of the second status field
main.get_sidebands:nReturns the current sideband
main.set_sidebandn:sSets the sideband to USB or LSB
main.get_frequencyd:nReturns the RF carrier frequency
main.set_frequencyd:dSets the RF carrier frequency. Returns the old value
main.inc_frequencyd:dIncrements the RF carrier frequency. Returns the new value
main.get_afcb:nReturns the AFC state
main.set_afcb:bSets the AFC state. Returns the old state
main.toggle_afcb:nToggles the AFC state. Returns the new state
main.get_squelchb:nReturns the squelch state
main.set_squelchb:bSets the squelch state. Returns the old state
main.toggle_squelchb:nToggles the squelch state. Returns the new state
main.get_squelch_leveld:nReturns the squelch level
main.set_squelch_leveld:dSets the squelch level. Returns the old level
main.inc_squelch_leveld:dIncrements the squelch level. Returns the new level
main.get_reverseb:nReturns the Reverse Sideband state
main.set_reverseb:bSets the Reverse Sideband state. Returns the old state
main.toggle_reverseb:nToggles the Reverse Sideband state. Returns the new state
main.get_lockb:nReturns the Transmit Lock state
main.set_lockb:bSets the Transmit Lock state. Returns the old state
main.toggle_lockb:nToggles the Reverse Sideband state. Returns the new state
main.get_trx_statuss:nReturns transmit/tune/receive status
main.txn:nTransmits
main.tunen:nTunes
main.rsidn:nWaits for RSID
main.rxn:nReceives
main.abortn:nAborts a transmit or tune
main.run_macron:iRuns a macro
main.get_max_macro_idi:nReturns the maximum macro ID number
 
log.get_frequencys:nReturns the Frequency field contents
log.get_time_ons:nReturns the Time-On field contents
log.get_time_offs:nReturns the Time-Off field contents
log.get_calls:nReturns the Call field contents
log.get_names:nReturns the Name field contents
log.get_rst_ins:nReturns the RST(r) field contents
log.get_rst_outs:nReturns the RST(s) field contents
log.get_serial_number s:nReturns the serial number field contents
log.get_states:nReturns the State field contents
log.get_provinces:nReturns the Province field contents
log.get_countrys:nReturns the Country field contents
log.get_qths:nReturns the QTH field contents
log.get_bands:nReturns the current band name
log.get_sidebands:nReturns the current sideband
log.get_notess:nReturns the Notes field contents
log.get_locators:nReturns the Locator field contents
log.get_azs:nReturns the AZ field contents
log.clearn:nClears the contents of the log fields
log.set_calln:sSets the Call field contents
 
text.get_rx_lengthi:nReturns the number of characters in the RX widget
text.get_rx6:iiReturns a range of characters (start, length) from the RX text widget
text.clear_rxn:nClears the RX text widget
text.add_txn:sAdds a string to the TX text widget
text.add_tx_bytesn:6Adds a byte string to the TX text widget
text.clear_txn:nClears the TX text widget
 
spot.get_autob:nReturns the autospotter state
spot.set_auton:bSets the autospotter state. Returns the old state
spot.toggle_auton:bToggles the autospotter state. Returns the new state
spot.pskrep.get_counti:nReturns the number of callsigns spotted in the current session
 
Contents