15th July 2023
DISCLAIMER: This is not yet a comprehensive HOWTO. It is a Direwolf newbie's account of her first 10 minutes with Direwolf and XRouter.
Using a non-root terminal I downloaded and built Direwolf using the following sequence..
git clone https://github.com/wb2osz/direwolf.git/ cd direwolf mkdir build && cd build cmake .. make -j4 sudo make install make install-conf
Then I typed “direwolf” and got this:
Dire Wolf version 1.6 Reading config file direwolf.conf Audio device for both receive and transmit: default (channel 0) Channel 0: 1200 baud, AFSK 1200 & 2200 Hz, E+, 44100 sample rate. Note: PTT not configured for channel 0. (Ignore this if using VOX.) Ready to accept KISS TCP client application 0 on port 8001 ... Ready to accept AGW client application 0 on port 8000 ...
Next I added an interface in XROUTER.CFG…
# Interface for Direwolf INTERFACE=10 ID=Direwolf Kiss over TCP TYPE=TCP PROTOCOL=KISS MTU=1500 IOADDR=127.0.0.1 INTNUM=8001 ENDINTERFACE
Note that I was experimenting with Direwolf on the same laptop as XRLin, hence 127.0.0.1. If Direwolf is on a different machine, IOADDR should specify that machine's IP address instead.
The above interface can suport up to 16 “ports”, each using a different KISS “channel”. I used a single port, which defaults to KISS channel A
PORT=8 ID=Direwolf tests INTERFACENUM=10 ENDPORT
I don't know if Direwolf supports multiple KISS channels, but if it does, you could add additional ports like this:
PORT=9 ID=Direwolf channel B INTERFACENUM=10 CHANNEL=B ENDPORT
PORT=10 ID=Direwolf Channel C INTERFACENUM=10 CHANNEL=C ENDPORT
(Note that for clarity I've only shown the ESSENTIAL keywords. Everything else defaults to sensible values).
I started XRLin, and Direwolf reported this:
Attached to KISS TCP client application 0... Ready to accept KISS TCP client application 1 on port 8001 ... KISS protocol set TXDELAY = 30 (*10mS units = 300 mS), port 0 KISS protocol set Persistence = 64, port 0 KISS protocol set SlotTime = 10 (*10mS units = 100 mS), port 0 KISS protocol set TXtail = 3 (*10mS units = 30 mS), port 0 KISS protocol set FullDuplex = 0, port 0
XRLin sent its ID frame and Direwolf reported:
[0L] G8PZT-1>ID:Mobile Router (MOBILE)<0x0d> Transmit timing error: PTT is on 152 mSec too long.
152ms is a matter of OPINION, not fact! Unless Direwolf is psychic, it cannot know how long the transmitter takes to key up and become stable, nor how long the other end's squelch takes to open, nor for all the coupling capacitors in the audio chain to stabilise! Some rigs produce severe distortion or thumps when the squelch opens.
The default TXdelay on XRouter is 300ms. You can use TXDELAY to override that. e.g. TXDELAY=200 will reduce it to 200ms.
At the XRLin console I typed “C 8 FRED-1”, and Direwolf started sending:
[0L] G8PZT-11>FRED-1:(SABM cmd, p=1)
5 minutes after starting XRLin, Direwolf said:
KISS client application 0 has gone away.
This is because XRouter's TCP interface has a 5 minute inactivity timeout, which needs to be increased (I'll increase it in the next version). It immediately reconnected anyhow.
Next, I tried an AGW interface:
INTERFACE=7 TYPE=AGW MTU=256 # IP addr of AGWPE. Default is localhost # IOADDR=192.168.0.76 # AGWPE port. Default is 8000 # INTNUM=8086 # CONFIG=MyAgwPassword ; Password for AGWPE ENDINTERFACE
As I was using localhost and the default AGW port, IOADDR and INTNUM were not required. And it looks like Direwolf by default doesn't need a password, so CONFIG was not required either.
I redirected XRouter's port 8 at the new interface.
PORT=8 ID=Direwolf tests INTERFACENUM=7 ENDPORT
When I restarted XRLin, Direwolf reported this:
Attached to AGW client application 0... Ready to accept AGW client application 1 on port 8000 ...
Once again it worked OK, and this interface didn't time out.
I accidentally closed Direwolf, and XRLin carried on running ok. When I restarted Direwolf everything seamlessly started working again.
I can hear packet coming out of the laptop speakers, so I guess I could use VOX to control the PTT. I haven't looked at the Direwolf config or documentation yet. As I said, this is my first ever experience with Direwolf, and I wanted to see how easy it was for a complete noob to interface!
The latest versions of XRouter (XRPi and XRLin) can be obtained from the files area of the XRouter group at https://groups.io/g/xrouter where you will also find plenty of help from XRouter experts.
Comprehensive documentation (a little out of date) is available on the following site: http://ohiopacket.org/xrpi