<commit_before>ant-switch-daemon-wrapper is script that allows controlling antenna switch from telnet.

This is optional and not installed by default

== Install instructions ==

Take ssh connection to your KiwiSDR as root and then

sudo apt-get install xinetd
mkdir -p /root/extensions/ant_switch/daemon/
curl https://raw.githubusercontent.com/OH1KK/KiwiSDR-antenna-switch-extension/ant-switch-daemon/daemon/ant-switch-daemon > /etc/xinetd.d/ant-switch-daemon
curl https://raw.githubusercontent.com/OH1KK/KiwiSDR-antenna-switch-extension/ant-switch-daemon/daemon/ant-switch-daemon-wrapper > /root/extensions/ant_switch/daemon/ant-switch-daemon-wrapper
chmod a+rx /root/extensions/ant_switch/daemon/ant-switch-daemon-wrapper
/etc/init.d/xinetd restart

== Usage ==

Daemon takes (almost) same commands as ant-switch-frontend

You can command from linux console using netcat

    echo "1" | nc kiwisdr.example.org 65000
    echo "s" | nc kiwisdr.example.org 65000
    echo "+3" | nc kiwisdr.example.org 65000
    echo "s" | nc kiwisdr.example.org 65000

Or just telnet to your kiwisdr
 
    telnet kiwisdr.example.org 65000

and give a command, for example h for help

Note. Some antenna switch commands are restricted in ant-switch-daemon-wrapper, look at source code and modify if needed.

== Security ==

If you do not want open your antenna switch to public, restrict it only to your private network

Modify /etc/xinetd.d/ant-switch-daemon and add restictive lines

    only_from	    = 127.0.0.1 192.168.0.0/16 2001:DB8::/32

== Bugs etc ==

If something goes wrong, look first syslog, cat /var/log/syslog
<commit_msg>Update ant-switch-daemon-wrapper.txt<commit_after>ant-switch-daemon-wrapper is script that allows controlling antenna switch from telnet.

This is optional and not installed by default

== Install instructions ==

Take ssh connection to your KiwiSDR as root and then

sudo apt-get install xinetd
mkdir -p /root/extensions/ant_switch/daemon/
curl https://raw.githubusercontent.com/OH1KK/KiwiSDR-antenna-switch-extension/ant-switch-daemon/daemon/ant-switch-daemon > /etc/xinetd.d/ant-switch-daemon
curl https://raw.githubusercontent.com/OH1KK/KiwiSDR-antenna-switch-extension/ant-switch-daemon/daemon/ant-switch-daemon-wrapper > /root/extensions/ant_switch/daemon/ant-switch-daemon-wrapper
chmod a+rx /root/extensions/ant_switch/daemon/ant-switch-daemon-wrapper
/etc/init.d/xinetd restart

== Usage ==

Daemon takes (almost) same commands as ant-switch-frontend

You can command from linux console using netcat

    echo "1" | nc kiwisdr.example.org 65000
    echo "s" | nc kiwisdr.example.org 65000
    echo "+3" | nc kiwisdr.example.org 65000
    echo "s" | nc kiwisdr.example.org 65000

Or just telnet to your kiwisdr
 
    telnet kiwisdr.example.org 65000

and give a command, for example h for help

Note. Some antenna switch commands are restricted in ant-switch-daemon-wrapper, look at source code and modify if needed.

== Security ==

If you do not want open your antenna switch to public, restrict it only to your private network

Modify /etc/xinetd.d/ant-switch-daemon and add restictive line

    only_from	    = 127.0.0.1 1192.168.3.11/16 2001:DB8::/32

== Bugs etc ==

If something goes wrong, look first syslog, cat /var/log/syslog

{'fraction_non_alphanumeric': 0.09430496019595835, 'fraction_numerical': 0.032455603184323334, 'mean_word_length': 3.980182926829268, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 4, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2471773', 'n_tokens_mistral': 1189, 'n_tokens_neox': 1081, 'n_words': 319}