APRS

From Stu2
Jump to: navigation, search

Recommendations

For windows:

  • UIView32
  • AWGPE

For Linux (Ubuntu):

  • soundmodem (user space is OK)
  • xastir

Links

Packet

A few notes about getting the packet stuff to work

I used Ubuntu and the package manager to get the soundmodem software. Use "sudo soundmodemconfig" to set up the interface. Follow the instructions.

soundmodemconfig has diagnostic tools. It took me a while to find them, but they are invaluable for ensuring the volume levels are correct. I ended up using the Mic IN connector with the boost. Used 'alsamixer' to set the volume.

Used a home made interface with transformers for 1200 baud packet. Look on the soundcard packet site at: http://www.kc2rlm.info/soundcardpacket/ for more info.

Sound card:

Green (Line Out) -> TX - rig pin 9 (DR-135 1200TX)
Pink  (Mic In)   <- RX - rig pin 4 (DR-135 1200RX)

Blue  (LINE IN) not used

PTT: Pin 7 DR-135
GND: Pin 5 DR-135

aprs4r Notes

We use a linksys router and the aprs4r software package at W4IY in Woodbridge, VA to provide an iGATE function for the Woodbridge Wireless Amateur Radio Club. I also had aprs4r installed under Ubuntu at NI4VA-5 in Corbin, VA. You can jump to some aprs4r Configuration Notes, jump to a documented configuration file or look at the notes below. After finding all the parts and pieces, I discovered this excellent documentation from Chris, K6DBG, which helped me figure out the configuration files for aprs4r. In the pages below are my notes to help further explain how I did things. I hope you find them useful. Send corrections/additions/deletions to stu at stu2 dot net.


Linksys-aprs.png


Picture of the Rig and Router‎ - The blocks between the router and the Opentracker+ include the USB to serial adapter, null modem adapter and 'gender-bender'. The current configuration uses an opentracker, which is installed inside the Alinco.This simplifies the wiring by eliminating the gender-bender and null modem adapter. The USB/serial adapter attaches directly to the Alinco DB-9. The Alinco must be in the 'data' mode, which enables the internal Opentracker TNC.

Here are some notes for getting the Linksys WRTSL54GS v1.1 to work with aprs4r. aprs4r is a ruby based package that fits within an openwrt enabled router. Many of the linksys routers have serial ports on the board, but the hardware port is NOT exposed to the outside. I was going to crack the case of a buffalo WHR-HP-G54 and extend the serial port, but discovered there wasn't enough RAM for the program. So I found a WRTSL54GS laying around - it has the minimum 32MB RAM. It also has an USB port. So I used an adapter to provide a serial interface. Note: Look for the new WNR3500L. It looks like a good replacement for the WRTSL54GS. April 4, 2010 update - WNR3500L and APRS4R.

Recognized USB adapater based on the FTDI chipset. The router did NOT recognize belkin adapter. Note: serial port is: /dev/usb/tts/0, which will be required for the config files. Here's how to check to ensure the USB device is recognized.

dmesg

usbserial.c: PL-2303 converter detected
usbserial.c: PL-2303 converter now attached to ttyUSB0 (or usb/tts/0 for devfs)
  • Browse to http://localhost:8085/ - aprs4r (not web) default username/password is aprs4r/aprs4r gets you to the config screen, but it's better to edit by hand because the instructions are in German.
  • Built and tested the Opentracker+: http://www.argentdata.com/images/otplus-rev1_1.jpg Nothing real special. I strapped the jumpers for 5VDC to the GPS and NOT HI and NOT HT.
  • Upload the ot1+kiss firmware: http://www.argentdata.com/support/otplus.html
  • Use a NULL modem cable between the Linksys and the Opentracker. Baud rate is 9600. Make sure the TNC is in KISS mode.
  • Edit the config files by hand. /etc/aprs4r/ Each plugin has a set of parameters that need a value. Make sure you enable the plugin. Here is an example file from NI4VA's node. Make sure you rename the file and make the extension .yaml. Check out the configuration sections below.

I used this beacon text and checked http://aprs.fi/ to make sure the packet was valid. The spaces make the text look better on a D700 display. The aprs4 web interface let's you set all this up. You can look at the APRS protocol spec to find out more. The / after the N indicates primary symbol table. The - is a house.

!3827.19N/07724.56W-APRS4R    STAFFORD   VA

Server function works. Enable the IS Server Plugin and you can create an interface in Xastir to pull the data from the Linksys/APRS4R node. You can watch incoming packets by looking at the log files in /var/log/aprs4r/. Use 'tail -f'.

More on the APRS4R Configuration File

APRS4r works really well under open-wrt and it works just as well under Ubuntu. To get it going, you need to edit two configuration files. The general strategy is as follows:

  • Install the APRS4R packages
  • Configure the yaml file (aprs4r config file in /etc/aprs4r)
  • Enable the aprs4r daemon
  • Troubleshoot as needed

Install APRS4R

Follow the installation instructions on the aprs4r web site under Debian Installation, which involves adding a repository to your software sources and installing the required files. http://www.aprs4r.org/cgi-bin/trac.cgi/wiki/DebianAPRS4RInstallation I didn't have any trouble following the sequence, but under Ubuntu, I used the Synaptic Package Manager to install the ruby components. I stuck with version 1.8.

Configure the YAML file

You can use the web interface, but it's written in German and even though Chris posted some excellent instructions on his web page, I got lost during trouble shooting and ended up erasing my configuration files. So I eventually elected to do it by hand.

Grab this example file from NI4VA, rename it, copy it to /etc/aprs4r/ and edit it to fit your circumstances.

cp ni4va-yaml.txt /etc/aprs4r/gw.yaml
cd /etc/aprs4r

Now comes the fun part! Edit the yaml file. Set up the interfaces and enable the plugins.

Detailed Documentation - dissecting the configuration file.

Enable APRS4R

Next, enable aprs4r by changing the settings in /etc/default/aprs4r. This file specifies the aprs4r configuration file and it's referenced by the init script, which is: /etc/init.d/aprs4r.

nano -w /etc/default/aprs4r

The file will look like this:

#
# aprs4r default file
#
START_DAEMON="true"
PROFILE="ni4va-gw.yaml"
START_WATCHDOG="false"
TIMEOUT=""

Start arprs4r:

/etc/init.d/aprs4r start

Troubleshooting

If things don't work as expected, here are some troubleshooting tips you can try:

  • If you forget the IP address of the WRT, start pinging 192.168.1.1, power off, power on and rapidly press the reset button until the PING returns are constant. This is called the 'failsafe' mode. Then telnet to 192.168.1.1. Use 'mount_root' to manually mount the jffs file system. The IP info is stored in /etc/config/network.
  • Make sure the process is running: ps ax | grep aprs4r - look for the aprs
  • look at the log files: /var/log/aprs4r - use 'tail -f aprs4rxxxx.log' and look for messages coming from rf0 and is0, etc. (replace xxxx with the latest number you see in the list.) This is a great way to make sure the TNC is working.
  • If you don't see any spots, then use a terminal emulator (e.g. gtkterm) to connect to the TNC. Make sure the TNC is in KISS mode. (e.g. KISS ON, Restart) You should see raw messages flowing.
  • Log into the aprs server you used in the is0 section. For example, if you specify the host to be 'third.aprs.net' then you can browse to http://third.aprs.net:14501/ Or you can start at: http://www.aprs-is.net/APRSServers.aspx You should see your call sign in the list, if the iGate is logging on to the servers.
  • Double check your filter in the is0 device section. Make sure it's what you need. (e.g. # filter m/100)
  • Look for your iGate at: http://aprs.fi - search for your callsign, with SSID. (e.g. ni4va-5). If you're iGate is working, you'll see a section listed under Other Views (right hand side of the screen), Station Info, Stations Heard Direct. Look at the map! It's pretty neat to see the RX range of your station plotted so neatly.
  • At http://aprs.fi - look at the raw packets for your station. Sometimes, they provide clues. Note how the beacon texts show up in the various headers. You can make adjustments as needed.

More on OpenWRT Config

I set up the wireless interface to log into the local AP. That way, we don't need a wired connection from the APRS node to the network. Here are a couple of notes regarding the configuration.

  • Administration/Network/Interfaces/WAN - config as static, provide the IPs, set up the bridge between 'wl0 and eth1'
  • Administration/Network/Interfaces/LAN - static IP, 10.1.10.21
  • Administration/Network/Wifi/WL0 - setup SSID (krusty), Client, WPA-PSK2, enter the key.
  • Essentials/Network/Wifi - check the association, use the Scan button.

I rebooted after I saved/applied all the settings. It took a few minutes for the router to associate with my LAN AP. If you forget the IP addresses, see the section above.

Xastir Notes

Just a few notes about getting Xastir to work.

I compiled version 1.9.5 from scratch, using the xastir wiki. Everything is fairly normal, except you need to edit ~/.xastir/config/xastir.cnf and change the path from /usr/share to /usr/local/share. The binary from the repository installs things in /usr/share. When you compile things from scratch, they go in /usr/local/share.

Turn OFF the X desktop special effects. I had them turned on. When I opened a 'child window' I only saw a small 'bubble' for the child that looked like the window didn't fully expand. This took me a couple of hours to find.

Execute the /usr/src/xastir-1.95/scripts/get-NWSdata file to get all the NWS base maps.

You can copy the county boundary maps to the maps subdirectory so they are visible in the map chooser. This is cool. Watch out for the automap feature. If that's on, you'll see all the automaps based on the zoom level.

Don't forget to create an interface. callpass creates the login info you need.

Adding WX maps

Get your geo file from: http://www.xastir.org/wiki/index.php/Xastir_Maps#Internet_Mapping (check out the links for geo files for US radar.) This is a small file with the description of the image file residing on the internet. Put the .geo file in the maps subdirectory to make it visible to the map chooser.

The ridge gifs are stored at: http://radar.weather.gov/ridge/RadarImg/N0R/

Info on the ridge files is located at: http://www.srh.noaa.gov/srh/jetstream/doppler/ridge_download.htm#radar

Sterling is LNX and Richmond is AKQ

Misc

http://www.mail-archive.com/[email protected]/msg03664.html - add FROM call to the /.xastir/nws-stations.txt file to gate information received from the INET to RF. This allows you to send out spots that arrive from the Internet for specific calls. This might be useful for example, if you were tracking a station and wanted to relay the position info to others via RF.

Gumstix

I was able to redirect the GPS serial port (/dev/ttyS2) on the gumstix using 'socat' to the ethernet port. Then, on a laptop running Ubuntu and VMware, I was able to connect to the gumstix over the network and redirect the connection to a local named pipe. In VMware, I connected the named pipe to a serial port. This allowed me to run U-Center under XP in the VMWare guest.

on Gumstix:

[email protected]:~$ socat tcp-l:22554,reuseaddr,fork file:/dev/ttyS2,nonblock,b9600,raw,echo=0,clocal=1

on Linux:

[email protected]:~$ socat -d unix-listen:/tmp/serial0 tcp:169.203.41.55:22554

in VMware:

use named pipe: /tmp/serial0, select 'This end is the client' and 'The other end is an application'

socat remote serial port

To extend serial ports without using a pipe for VMWARE, do the following. On the side with the 'real' serial port:

socat tcp-l:2022,reuseaddr,fork file:/dev/ttyS2,nonblock,b9600,raw,echo=0,clocal=1

Change the device and baud rate as needed.

On the local side:

socat -d PTY,link=/dev/serial0 tcp:192.168.0.108:2022

Then use /dev/serial0 as the serial port.

APRS Enabled Repeater

Researching the idea of an APRS enabled repeater. The idea is to combine an aprs package with the app_rpt asterisk based repeater, which would enable APRS reporting on a repeater. The concept has been around for a long time and is based on MIC-E.

Muting the transmitted audio is the main problem to overcome. We don't want the APRS AFSK signals to appear on the repeater's output.

Timing Diagram

Here is a timing diagram for the aprs repeater.

DCD Delay measurement

To see if we can do this in software, using existing tools, I built a Ubuntu aprsd and soundmodem implementation and connected a packet interface to an Alinco DR-135. Then, I measured the delay from the start of a packet signal (RX Audio) to the DCD output on the LPT1 port.

Note: Parallel BIOS setting was SPP. WA0DYJ suggests this may have an affect on the timing. Update: --Stu 09:42, 31 January 2009 (EST) I changed the BIOS settings to ECP and obtained the same results. So this is NOT a timing issue forced by the LPT1 port mode.

The start-DCD delay is variable and is about 250ms +/- 50 ms, which means the delay line needs to be > 300 ms. Ideally, I think the DCD detection should be much faster in order to use the DCD signal to mute the transmitted audio. For $95 - http://www.catauto.com/dl1000.html - we can have a 500ms delay line with audio gate.

APRSD DCD delay

The blue trace is the RX audio from the Alinco DR-135. The Yellow trace is the DCD line on LPT1. (Data1) The scope triggered on the blue trace (audio.) The delta between the beginning of the audio and the DCD signal is 280ms in this measurement. Several measurements were taken and they varied, but 250ms was typical.

Note the squelch tail after the packet audio. I haven't found any parameter settings in soundmodem to tailor the DCD signal. (rising or falling)

Some references: