Last edited · 42 revisions  

 


Datasheet: UDRCDS

Instructions

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

ARMv6 Raspberry Pis are not supported.  This includes the A/A+, Zero, Pi 1 B/B+, and Compute Module.

Make sure the pins are properly aligned and use the supplied standoffs to support the board above the HDMI port.

Universal Digital Radio Controller
Universal Digital Radio Controller

Install Compass Linux

See: https://nw-digital-radio.groups.io/g/compass/wiki/Installing-Compass-Linux-for-Raspberry-Pi

Basic Configuration

  1. 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™.
  2. To preset the pins and levels on the UDRC™ we provide a script. Execute the following:
    cd ~
    curl -L -s https://goo.gl/7rXUFJ > set-udrc-din6.sh
    chmod +x set-udrc-din6.sh
    sudo ~/set-udrc-din6.sh
  3. Optionally disable the internal sound chip by editing /boot/config.txt and commenting out this line (recommended unless you need it for something else):
    #dtparam=audio=on

Install Direwolf

sudo apt-get update
sudo apt-get remove bluez pi-bluetooth
sudo apt-mark hold libasound2 libasound2-data
sudo apt-get install direwolf

Configure 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 

cd ~

Use your favorite editor, e.g. nano or vi to edit file direwolf.conf 

vi direwolf.conf
# or
nano direwolf.conf

Set the following parameters (BOLD are specific to your station).  Any additional values should be set based on the direwolf User Guide.

UDRC™ (Original)

ADEVICE  plughw:CARD=udrc,DEV=0
ARATE 48000
ACHANNELS 2
CHANNEL 0
MYCALL YOURCALLSIGN-SSID
MODEM 1200
PTT GPIO 12
CHANNEL 1
MODEM 1200
PTT GPIO 12
MYCALL YOURCALLSIGN-SSID
AGWPORT 8000
KISSPORT 8001
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[12]-[12]$ TRACE 
IGSERVER noam.aprs2.net
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.

UDRC™ II

ADEVICE plughw:CARD=udrc,DEV=0 
ARATE 48000
ACHANNELS 2
#HD-15
CHANNEL 0
MYCALL YOURCALLSIGN-SSID
MODEM 9600
PTT GPIO 12
#DIN-6
CHANNEL 1
MYCALL YOURCALLSIGN-SSID
MODEM 1200
PTT GPIO 23 
AGWPORT 8000
KISSPORT 8001
PBEACON delay=1 sendto=0 every=10 overlay=S symbol="digi" lat=17^51.00N long=102^18.36W power=5 height=20 gain=6 comment="UDRC 9600" via=WIDE1-1,WIDE2-1
PBEACON delay=1 sendto=1 every=10 overlay=S symbol="digi" lat=17^51.00N long=102^18.36W power=5 height=20 gain=6 comment="UDRC 1200" via=WIDE1-1,WIDE2-1
#DIGIPEAT 0 0 ^WIDE[3-7]-[1-7]$|^TEST$ ^WIDE[12]-[12]$ TRACE
#DIGIPEAT 1 1 ^WIDE[3-7]-[1-7]$|^TEST$ ^WIDE[12]-[12]$ TRACE 
#DIGIPEAT 0 1 ^WIDE[3-7]-[1-7]$|^TEST$ ^WIDE[12]-[12]$ TRACE 
#DIGIPEAT 1 0 ^WIDE[3-7]-[1-7]$|^TEST$ ^WIDE[12]-[12]$ TRACE 
IGSERVER noam.aprs2.net
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 #GPSD localhost


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.

Startup direwolf

cd ~
direwolf

Adjustments

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 ~
curl -L -s 
https://goo.gl/7rXUFJ  > my-udrc-setup.sh
chmod +x my-udrc-setup.sh
Use your favorite editor to modify the new shell script.  You can execute it at any time

~/my-udrc-setup.sh

Note on how to use a RTL-SDR to set deviation.

Applications

Many applications can be used with direwolf 

Xastir Install

To install Xastir use apt-get

sudo apt-get install xastir
cd ~
xastir

YAAC Install

sudo apt-get install openjdk-7-jre librxtx-java unzip wget
cd ~
sudo wget http://www.ka2ddo.org/ka2ddo/YAAC.zip
mkdir YAAC
cd YAAC
unzip ~/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 remove bluez pi-bluetooth
sudo apt-mark hold libasound2 libasound2-data
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
START_DAEMON="true"
# Use USB hotplugging to add new USB devices automatically to the daemon
USBAUTO="true"
# Devices gpsd should collect to at boot time.
# They need to be read/writeable, either by user gpsd or the group dialout.
DEVICES="/dev/ttyUSB0"
# Other options you want to pass to gpsd
GPSD_OPTIONS=""

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

cgps -s 

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

Restart ntpd

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

See Notes