Important: Use only Compass Linux images. They contain support specific to the UDRC™. Source is available for review on GitHub.
During initial startup do not modify the basic Raspberry Pi setup. For example, do not overclock the Raspberry Pi, it is not needed as performance is more than adequate, and doing so can change clocking values on busses used by the UDRC™ causing it to either not function or be unstable. If you make any changes not listed in these instructions, and your UDRC™ does not function, return to the original settings.
Mount your UDRC™ or UDRC™-II on a Raspberry Pi 2 or 3
Note: Raspberry Pi 3 Addendum
Make sure the pins are properly aligned and use the supplied standoffs to support the board above the HDMI port.
Universal Digital Radio Controller
Create the Boot Image
- Obtain a high quality microSD card. A Class-10 card of 8GB or more is recommended.
- Download a Compass Linux image from archive.compasslinux.org
- The 'lite' version is without a GUI. The full version has graphic interface and is recommended if you plan to have a GUI application running.
- Unzip and copy the uncompressed image to the SD card using the procedure outlined on the Raspberry Pi site.
Boot for the First Time
- Place the microSD card in the Raspberry Pi.
- Attach a monitor and keyboard/mouse to the Raspberry Pi
- Attach Ethernet via the RJ-45 jack to your network.
- Apply power
- Using the micro USB port next to the HDMI port
- There are solder pads to apply 12 vdc to the UDRC if that is more convenient
- Allow the Raspberry Pi to boot up
- Login (User: pi, Password: raspberry)
- From a terminal command line, verify that the UDRC™ is recognized by typing the command aplay -l (that's a lowercase l) and observe that udrc is listed as a card. If you do not see it listed, power down and remount the UDRC™.
- Perform any Linux configuration specific to your installation, e.g. assign specific network addresses, install favorite tools, etc. (This is beyond the scope of NW Digital Radio support, please use Linux support resources for assistance.)
Note: DO NOT RUN raspi-update - it will break your install
- You may wish to edit the /etc/hosts file and add reference to the hostname, for example if you keep the default 'compass' hostname, add a line
- To preset the pins and levels on the UDRC™ for direwolf we provide a script. Execute the following
curl -L -s https://goo.gl/7rXUFJ | sudo sh
(the 'pipe' or | is usually above the \ key on most keyboards -- if you want to see what the script does, leave off '| sudo sh')
- Optionally disable the internal sound chip by editing /boot/config.txt and commenting out this line (recommended unless you need it for something else):
- To gracefully shutdown the Raspberry Pi, you may use the command sudo halt
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install direwolf
Read the README
Download the User's Guide
Peruse other documents on the WB2OSZ Github for ideas and troubleshooting -- however, you do not need to perform the items in Raspberry Pi document. The UDRC only needs a few edits in direwolf.conf
Use your favorite editor, e.g. nano or vi to edit file direwolf.conf
Set the following parameters (BOLD are specific to your station). Any additional values should be set based on the direwolf User Guide.
MYCALL YOURCALLSIGN AND SSID
PTT GPIO 12
PTT GPIO 12
MYCALL YOURCALLSIGN AND SSID
PBEACON delay=1 every=10 overlay=S symbol="digi" lat=17^51.00N long=102^18.36W power=5 height=20 gain=6 comment="UDRC" via=WIDE1-1,WIDE2-1
DIGIPEAT 0 0 ^WIDE[3-7]-[1-7]$|^TEST$ ^WIDE-$ TRACE
IGLOGIN YOUR INTERNET LOGIN AND PASSCODE FOR APRS REPORTING
PBEACON sendto=IG delay=0:30 every=60:00 symbol="igate" overlay=R lat=17^51.00N long=102^18.36W
IGTXLIMIT 6 10
# if you have GPSD running, uncomment the following line
# GPSD localhost
Under CHANNEL 0 -- Choose MODEM (1200 and 9600 for VHF/UHF) and set the PTT to use the GPIO pin
PTT GPIO 12
The modem value under CHANNEL 1 should match the value chosen under CHANNEL 0.
Attach a Radio and Start Direwolf
Use the Mini Din-6 connector to attach a radio with a 9600 baud packet port. Many radios have a Mini Din-6 socket specifically for this purpose, use a straight through male to male Mini Din-6 cable. If you selected Mini Din-6 when ordering the UDRC, use that cable. If you need a specialized cable to go to another radio, you can build one or see Cable and Connectors on the NW Digital Radio blog.
The values set by the script should be sufficient, but controls exist in the alsamixer program to adjust LO/PCM (modulation for TX, use LO as the main control) and ADC (receive), after selecting the UDRC as the sound device. Use them judiciously and save changes with the command
sudo alsactl store
You may wish to save the initial script and change the db values you pick in alsamixer.
cd ~Use your favorite editor to modify the new shell script. You can execute it at any time
curl -L -s https://goo.gl/7rXUFJ > my-udrc-setup.sh
chmod +x my-udrc-setup.sh
Many applications can be used with direwolf
Xastir InstallTo install Xastir use apt-get
sudo apt-get install xastir
sudo apt-get install openjdk-7-jre librxtx-java unzip wget
sudo wget http://www.ka2ddo.org/ka2ddo/YAAC.zip
java -jar YAAC.jar
Adding a GPS Using GPSD
Adding a GPS to your Raspberry Pi is easy and can be made available to various programs like Direwolf, Xaster, and YAAC. These programs typically can take GPS data directly from an attached GPS or use GPSD, a program that makes a GPS data available via a network socket.
In our example we will use a common USB attached GPS, like the reasonably priced GlobalSat BU-353.
Plug the USB GPS into one of the 4 USB ports on your Raspberry Pi. If it is the only serial device it will typically be a /dev/ttyUSB0. If you have other USB serial devices, it may be at some other /dev/ttyUSBx (where x is a digit).
Install gpsd and some clients.
sudo apt-get update
sudo apt-get upgrade #optional
sudo apt-get install gpsd gpsd-clients
Configure gpsd by editing /etc/default/gpsd - for /dev/ttyUSB0 the file will contain
# Default settings for the gpsd init script and the hotplug wrapper.
# Start the gpsd daemon automatically at boot time
# Use USB hotplugging to add new USB devices automatically to the daemon
# Devices gpsd should collect to at boot time.
# They need to be read/writeable, either by user gpsd or the group dialout.
# Other options you want to pass to gpsd
Then start gpsd
sudo systemctl start gpsd
sudo systemctl enable gpsd # So that it will start and restart automatically
If your GPS has acquired satellites sufficient for a fix, you can see what it is reporting by running the client program
Use the 'q' key to stop cgps.
Using GPSD for Your Real Time Clock
Once gpsd is running you can also use it update your system clock by editing /etc/ntp.conf and adding these lines
# Server from shared memory provided by gpsd
server 127.127.28.0 minpoll 4 maxpoll 4
fudge 127.127.28.0 time1 +0.350 refid SHM stratum 15
sudo systemctl restart ntp
ntpq -prcv #to see that it is listed as SHM
This is useful when you don't have a network time server available such as when running a mobile tracker.
Running Two Radios on the UDRC™ II