Setting up Direwolf/Xastir on a Raspberry Pi

March 22, 2015

A long time ago I set up Soundmodem for Ubuntu. Recently, I tried setting up an igate using WB2OSZ’s Direwolf instead. Things are much nicer these days.

The Direwolf site includes a very nice guide to setting up a Raspberry Pi as an igate, so I won’t go over it here. Instead, this is just to record the steps I took to set up my Raspberry Pi v2 as an igate server.

1. Set up the Raspberry Pi to run Raspbian
2. Follow along with the setup guide:

sudo apt-get remove --purge pulseaudio # I didn't need to do this since it wasn't installed, but better safe than sorry
sudo apt-get install libasound2-dev xastir # Note that I'm installing xastir at the same time - this is different from the direwolf guide
cd ~
git clone https://www.github.com/wb2osz/direwolf
cd direwolf
git checkout 1.2
make
sudo make install
make install-rpi
make install-conf

Next, make sure the sound card is plugged into USB (I used the bottom slot). When I plugged it in, the system rebooted, so it’s probably smart to shut down before plugging the sound card in. For a sound card, I used the Syba SD-CM-UAUD USB Stereo Audio Adapter, C-Media Chipset from Amazon.

From there, run
aplay -l
to see:
card 1: Device [C-Media USB Audio Device], device 0: USB Audio [USB Audio]

Now I know the device is card 1 device 0. We’re almost ready to edit direwolf.conf. First, though – something that wasn’t documented on the Direwolf site. Igates need a secret code so they can log into the tier 2 servers. It’s based on your callsign, and there’s a utility called callpass in Xastir that will compute it for you.

callpass {my-real-call}

This gives you a 5 or 6 digit integer that you should remember. I’ll call it {my-code}.

Now edit direwolf.conf:

  1. uncomment ADEVICE plughw:1,0 – if you got a different number from aplay above, you might have to modify it.
  2. change MYCALL NOCALL to MYCALL {my-real-call}-10. I used -10 because that’s the APRS SSID for igates. (APRS SSIDs are documented here.) In the direwolf.conf that I got, the NOCALL had a ^J after it; I had to take that out
  3. uncomment IGSERVER noam.aprs2.net (maybe use a different server if you’re not in North America)
  4. uncomment IGLOGIN and change it to IGLOGIN {my-real-call} {my code}
  5. direwolf

Yay, you’re igating. But what’s around? Set up Xastir for that:

  1. xastir
  2. In the first menu that comes up, set your callsign to {my-real-call}-10 and (if desired) set your lat/long/position ambiguity
  3. Interface -> Interface Control, Add, Networked AGWPE, Add. Leave Pass-code blank, save and Start. Now you’re getting APRS from over the air displayed on your Xastir maps.
  4. Not enough for you? Interface -> Interface Control, Add, Internet Server, Add. Set Pass-code to {my-code}, save and Start. Now you’re getting APRS from the network as well.
  5. Want to see it on maps? I wasn’t able to get all the maps going, but things worked when I picked Maps -> Map Chooser and selected only Online/osm_tiled_mapnik.geo and worldhi.map.
Advertisements

Setting up soundmodem on Ubuntu 10.04

June 29, 2011

After a long delay, I finally decided to upgrade to 10.04 LTS and get soundmodem running again.

Luckily, there was help this time. I started with my config, and merged with this post:
ubuntuforums.org/showthread.php?p=10864691

Here’s the config I ended up using:

Configuration: AX.25
IO:
Mode: soundcard
Audio Driver: /dev/dsp
Half Duplex: selected
PTT Driver: none

Channel Access:
TxDelay: 150
Slot Time: 100
P-Persistence: 40
Full Duplex: not selected
TxTail: 10

Channel 0:
Modulator:
Mode: afsk
Bits/s: 1200
Freq 0: 1200
Freq 1: 2200
Differential: selected

Demodulator:
Mode: afsk
Bits/s: 1200
Freq 0: 1200
Freq 1: 2200
Differential: selected

Packet IO:
Mode: MKISS
Interface: sm0
Callsign: mycall
IP address: 10.0.0.1
Network mask: 255.255.255.0
Broadcast addr: 10.0.0.255

I also set up /etc/ax25/axports to have:

sm0 mycall 1200 255 7 144.39 APRS (1200 bps)

Finally, I made sure Avahi was set to ignore sm0. This is easier than it was prevously – now you just add:

deny-interfaces=sm0

to /etc/avahi/avahi-daemon.conf

Once that’s done, don’t forget to chmod 4755 /usr/bin/xastir so it can open sm0 and things are good.


Compiling soundmodem-0.14 on Ubuntu 9.10

November 21, 2009

The soundmodem that ships with Ubuntu 9.10 is not the latest. The latest is available here:

http://www.baycom.org/~tom/ham/soundmodem/

In order to compile it, you need to install a bunch of development packages. Here’s what I did:

sudo aptitude install libasound2-dev
sudo aptitude install libxml2-dev
sudo aptitude install libgtk2.0-dev 
sudo aptitude install libaudiofile-dev

Also, if you don’t have the compiler already you’ll need:

sudo aptitude install g++

Then:

tar xzvf soundmodem-0.14.tar.gz
cd soundmodem-0.14
sh ./configure
make

To test it, go to the configapp/src directory and run

sudo ./soundmodemconfig

to set up the configuration. Finally, go to the soundcard directory and run:

sudo ./soundmodem -v5

Assuming you’ve configured everything correctly, you should see something like:

sm[10093]: mkiss: ifname sm0 mtu 256 hwaddr CALLSIGN-0 ipaddr 10.0.0.1 netmask 255.255.255.0 broadcast 10.0.0.255
sm[10093]: unknown node "text"
ALSA: Using sample rate 9600, sample format 2, significant bits 16, buffer size 4800, period size 150
ALSA: Using sample rate 9600, sample format 2, significant bits 16, buffer size 4800, period size 150
sm[10093]: audio: starting "plughw:0,0"

In a different terminal, you can then ifconfig sm0 to see that it’s there.


Stopping the squeaks with soundmodem as ax.25

October 17, 2009

I tried to set up soundmodem as an AX.25 device in order to run xastir on my machine. Unfortunately, Ubuntu by default has a bunch of services installed that prevent this. (Not so much prevent it as try to shove 100k of data through the 1200-baud soundmodem, which kills it and drives you nutty if the audio is turned up.)

Here’s what I did to get around this:

1. Change /etc/samba/smb.conf to include only the eth0 interface.

interface = eth0

2. Go into /etc/cups/cupsd.conf and turn off broadcasting (instructions here):

# Browsing was on.
#Browsing On
Browsing Off
BrowseInterval 0
# end trying to get around sm0 problem

3. Stop the AVAHI daemon by moving /etc/rc5.d/S18avahi-daemon to /etc/rc5.d/K18avahi-daemon and running /etc/rc5.d/K18avahi-daemon stop

Note that on Ubuntu 9.10, avahi has been moved into Upstart. Stop it with

sudo stop avahi-daemon

then edit /etc/init/avahi-daemon.conf and comment out the

#start on (filesystem
#         and started dbus)

and

#respawn