The radiorouter package helps toconfigure a radio link network system with mail (UUCP/BSMTP), transparent TCP/IP and webpropy support. It uses a soundcard as digital/analog converter.

It has been succesfully used on VHF (9600 bps, up to 70km) and HF (2500 bps, up to 1000km) links.

Network example

What do you need

You need a radio transceiver that supports these basic features:

Some radios also permit to control ignition and channels switching. If available, these features can be also configured.

You have to build a hardware board to interface these options with the computer (a soundcard and a serial/parallel port). Take a look on this documentation from the asterisk-phonepatch project: Simple interface boards

How it works

E-mail

The most efficient way to send e-mails through radio-links is using the old UUCP (Unix-to-Unix Copy) protocol. The path that a e-mail follows is the following:

WebProxy

TODO

TCP/IP

TODO

Configuration files

Configuration files are located at /etc/radiorouter:

Radiorouter.conf

This file uses a syntax where indentation (tabs or spaces, do not mix them) marks the structure. An example file:

section1:
    par1 = value1
    par2 = value2
    section2:
        par3 = value3

There is no limit is sections nesting. Note that string values are surrounded by '.

Taken from /usr/share/radiorouter/radiorouter.template, you can automaticcaly generate a help file:

/usr/share/radiorouter/pyconfig -t /usr/share/radiorouter/radiorouter.template --generate-help

After the configuration file has been modified, you have to ran an update:

rrconfig --write

A configuration example

Let's imagine we have a two stations, client (client.pe.ehas.org) and server (server.pe.ehas.org), and two VHF transceiver to connect them. The server station has a internet connection and it's able to send/receive mails and connect to the WWW. We want to enable UUCP e-mail, a standard TCP/IP network and the webproxy to navigate from client. The server connects to otherserver to send/received all the e-mails (from client and from itself the server) using also UUCP:

Server

/etc/radiorouter/radiorouter.conf
general:
    hostname = 'server'
    domain = 'pe.ehas.org'
    dns = '80.58.0.33'
    locale = 'es_ES'
    timezone = 'Europe/Madrid'
    ntp_servers = 'ntp.debian.org'
    grunt_public_key = '/etc/grunt_public.gpg'

interfaces-radio:
    radio0:
        radiomodem:
            state = on
            modem = 'vhf-newfsk'
            newfsk_rate = 1
            callsign = 'SERVERV'
            ptt_txdelay = 150
            ptt_txtail = 40
            slottime = 100
            ppersist = 128
            soundcard = '/dev/dsp0'
            soundcard_samplerate = 0
            soundcard_mixer_output = 'vol: 80'
            soundcard_mixer_input_device = 'mic'
            soundcard_mixer_input = 'mic: 50'

        board:
            ptt_on = 'serial:/dev/ttyUSB0 rts 0'
            ptt_off = 'serial:/dev/ttyUSB0 rts 1'
            ptt_maxontime = 30
            datachannel_policy = 'always'
            datachannel_on = 'serial:/dev/ttyUSB0 dtr 0'
            datachannel_off = 'serial:/dev/ttyUSB0 dtr 1'
            radio_on = 'serial:/dev/ttyUSB0 dtr 0'
            radio_off = 'serial:/dev/ttyUSB0 dtr 0'
            power_radio_with_interface = on

        tcpip:
            state = on
            address = '10.0.0.5'
            netmask = '255.255.255.0'

interfaces:
    eth0:
        tcpip:
            state = off
            dhcp = off
            address = '192.168.1.2'
            netmask = '255.255.255.0'
            gateway = '192.168.1.1'

tcptunnel:

mail:
    postfix:
        mydestination = '$myhostname'
        myorigin = '$myhostname'
        mynetworks = '127.0.0.0/8'
        relayhost =
        message_size_limit = 100k
        bounce_size_limit = 1000
        mailbox_size_limit = 1M
        queue_minfree = 1M

    uucp:
        local:
            node_name = 'server'
            node_password = 'uuserver'
            system_options = "protocol=y\ncommands=mail rbsmtp rsmtp cbsmtp rcsmtp rgsmtp"

        remote:
            client:
                ax25_paths = 'radio0: CLIENTV'
                password = 'uuclient'
                connect_crontab_entry = 'radio0: 14,45 0-23'
                email_addresses = 'client.pe.ehas.org'
                connect_interfaces = 'radio0, tcpip'
                connect_on_queued = off
                queue_max_size = 100k

            otherser:
                password = 'password'
                tcpip_address = 'otherserver.pe.ehas.org'
                connect_crontab_entry = 'tcpip: 14,45 0-23 * * *'
                email_addresses = '*'
                connect_interfaces = 'tcpip'
                connect_on_queued = on
                queue_max_size = 1000k

Client

/etc/radiorouter/radiorouter.conf
general:
    hostname = 'client'
    domain = 'pe.ehas.org'
    dns = '80.58.0.33'
    locale = 'es_ES'
    timezone = 'Europe/Madrid'
    ntp_servers = 'ntp.upm.es, ntp.debian.org'
    grunt_public_key = '/etc/grunt_public.gpg'

interfaces-radio:
    radio0:
        radiomodem:
            state = on
            modem = 'vhf-newfsk'
            newfsk_rate = 1
            callsign = 'CLIENTV'
            ptt_txdelay = 150
            ptt_txtail = 40
            slottime = 100
            ppersist = 128
            soundcard = '/dev/dsp'
            soundcard_samplerate = 0
            soundcard_mixer_output = 'vol:80'
            soundcard_mixer_input = 'mic:50'
            soundcard_mixer_input_device = 'mic'

        board:
            ptt_on = 'serial:/dev/ttyS0 rts 0'
            ptt_off = 'serial:/dev/ttyS0 rts 1'
            ptt_maxontime = 30
            datachannel_policy = 'always'
            datachannel_on = 'serial:/dev/ttyS0 dtr 0'
            datachannel_off = 'serial:/dev/ttyS0 dtr 1'
            radio_on = 'serial:/dev/ttyS0 dtr 0'
            radio_off = 'serial:/dev/ttyS0 dtr 0'
            power_radio_with_interface = on

        tcpip:
            state = on
            address = '10.0.0.6'
            netmask = '255.255.255.0'
            #gateway = '10.0.0.5'

interfaces:
    eth0:
        tcpip:
            state = on
            dhcp = off
            address = '192.168.1.1'
            netmask = '255.255.255.0'

webproxy:
    ax25_path = 'radio0: SERVERV'
    tunnel_timeout = 60.0
    redirs = "8080:localhost:3128, 8081:localhost:110"

mail:
    postfix:
        mydestination = '$myhostname'
        myorigin = '$myhostname'
        mynetworks = '127.0.0.0/8'
        message_size_limit = 100k
        bounce_size_limit = 1000
        mailbox_size_limit = 1M
        queue_minfree = 1M

    uucp:
        local:
            node_name = 'client'
            node_password = 'uuclient'
            system_options = "protocol=y\ncommands=mail rbsmtp rsmtp cbsmtp rcsmtp rgsmtp"

        remote:
            server:
                ax25_paths = 'radio0: SERVERV'
                password = 'uuserver'
                connect_crontab_entry = 'radio0: 0-23 14,45'
                email_addresses = '*'
                connect_interfaces = 'radio0'
                connect_on_queued = true
                queue_max_size = 100k

Finally, we update all configuration files and restart the services:

rrconfig --write
/etc/init.d/radiorouter restart

You can test that services are working as expected:

# test UUCP exchange
rrcall

# test TCP/IP
ssh 10.0.0.5

# test webproxy
http_proxy=localhost:8080 wget www.test.com

You may can be checked real-time with:

tail -f /var/log/syslog
tail -f /var/log/uucp/Log
tail -f /var/log/mail.log
tail -f /var/log/squid/access.log
listen -ta (AX25 trace)

Appendix

Radiorouter sources

conf/: Configuration files

board/: Radioboard scripts

config/: Configuration scripts

mail/: Postfix, UUCP and BSMTP related scripts.

misc/: Miscellaneous scripts.

services/: Scripts accesible from inetd (port 541)

local/: Accesory scripts

webconf/: Web configuration (uses cherrypy library) for radiorouter