ham radio applications of linux single board · pdf fileham radio applications of linux...

69
Ham Radio Applications of Linux Single Board Computers Willem A. Schreüder AC0KQ [email protected] HamCon Colorado 2016 This talk is available online at http://www.prinmath.com/ham/talks/

Upload: doankhue

Post on 06-Mar-2018

222 views

Category:

Documents


5 download

TRANSCRIPT

Page 1: Ham Radio Applications of Linux Single Board  · PDF fileHam Radio Applications of Linux Single Board Computers ... Node 40552 ... Build and install rtl-sdr module

Ham Radio Applications ofLinux Single Board Computers

Willem A. Schreüder [email protected]

HamCon Colorado 2016

This talk is available online at

http://www.prinmath.com/ham/talks/

Page 2: Ham Radio Applications of Linux Single Board  · PDF fileHam Radio Applications of Linux Single Board Computers ... Node 40552 ... Build and install rtl-sdr module

Single Board Computers

● Full Linux boxes (today's topic)– Raspberry Pi

– Beaglebone

● Microcontrollers (not covered)– Arduino

– PICAXE

– BASIC Stamp

Page 3: Ham Radio Applications of Linux Single Board  · PDF fileHam Radio Applications of Linux Single Board Computers ... Node 40552 ... Build and install rtl-sdr module

Linux SBCs

● Runs a full Linux OS● Usable stand alone computer or server● Built in connectivity

– Ethernet networking

– USB and serial

– General purpose IO

● Expandable using daughter boards● Inexpensive ($50 for a working system)

Page 4: Ham Radio Applications of Linux Single Board  · PDF fileHam Radio Applications of Linux Single Board Computers ... Node 40552 ... Build and install rtl-sdr module

Potential Applications

● This talk:– AllStarLink repeater

– ADSB receiver

– Software Defined Receiver (SDR)

● Other talks– BPQ BBS, RMS and iGate

– Site monitoring

Page 5: Ham Radio Applications of Linux Single Board  · PDF fileHam Radio Applications of Linux Single Board Computers ... Node 40552 ... Build and install rtl-sdr module

Pros and Cons

● Pros– Inexpensive

– No moving parts

– 5V power

– Expandable

● Cons– SD cards corrupted by bad power

Page 6: Ham Radio Applications of Linux Single Board  · PDF fileHam Radio Applications of Linux Single Board Computers ... Node 40552 ... Build and install rtl-sdr module

AllStarLink Repeater

Page 7: Ham Radio Applications of Linux Single Board  · PDF fileHam Radio Applications of Linux Single Board Computers ... Node 40552 ... Build and install rtl-sdr module

ADSB SDR Receiver

Page 8: Ham Radio Applications of Linux Single Board  · PDF fileHam Radio Applications of Linux Single Board Computers ... Node 40552 ... Build and install rtl-sdr module

Raspberry Pi

● Most Popular● Best supported● rPi2 most powerful● Lots of USB ports● Lots of daughterboards● No analog inputs● $35 plus SD card

Page 9: Ham Radio Applications of Linux Single Board  · PDF fileHam Radio Applications of Linux Single Board Computers ... Node 40552 ... Build and install rtl-sdr module

BeagleBone

● Less well supported● Onboard eMMC● Power & Reset buttons● More GPIO pins● 8 analog inputs● $50 street price

Page 10: Ham Radio Applications of Linux Single Board  · PDF fileHam Radio Applications of Linux Single Board Computers ... Node 40552 ... Build and install rtl-sdr module

Power and Storage

● Runs on 5V DC– Needs clean power

● Micro SD card storage– Finite life

– Bad power kills SD

Page 11: Ham Radio Applications of Linux Single Board  · PDF fileHam Radio Applications of Linux Single Board Computers ... Node 40552 ... Build and install rtl-sdr module

What is AllStarLink?

● Asterisk VOIP software for radio● Interfaces with radio via URIx

– CM119 USB audio chip

– DB25 connector

● Can roll your own withequivalent fob

Page 12: Ham Radio Applications of Linux Single Board  · PDF fileHam Radio Applications of Linux Single Board Computers ... Node 40552 ... Build and install rtl-sdr module

Installing AllStarLink

● Download from www.hamviop.com– Burn image to SD card

● Program your radio/repeater– Set radio to encode/decode CTCSS

– On Motorola set accessories to output COS & PL on pin 8

Page 13: Ham Radio Applications of Linux Single Board  · PDF fileHam Radio Applications of Linux Single Board Computers ... Node 40552 ... Build and install rtl-sdr module

Initial Login

Page 14: Ham Radio Applications of Linux Single Board  · PDF fileHam Radio Applications of Linux Single Board Computers ... Node 40552 ... Build and install rtl-sdr module

Set Time Zone 1

Page 15: Ham Radio Applications of Linux Single Board  · PDF fileHam Radio Applications of Linux Single Board Computers ... Node 40552 ... Build and install rtl-sdr module

Set Time Zone 2

Page 16: Ham Radio Applications of Linux Single Board  · PDF fileHam Radio Applications of Linux Single Board Computers ... Node 40552 ... Build and install rtl-sdr module

Network Configuration

Page 17: Ham Radio Applications of Linux Single Board  · PDF fileHam Radio Applications of Linux Single Board Computers ... Node 40552 ... Build and install rtl-sdr module

Set Hostname

Page 18: Ham Radio Applications of Linux Single Board  · PDF fileHam Radio Applications of Linux Single Board Computers ... Node 40552 ... Build and install rtl-sdr module

Configure ssh

Page 19: Ham Radio Applications of Linux Single Board  · PDF fileHam Radio Applications of Linux Single Board Computers ... Node 40552 ... Build and install rtl-sdr module

Node Setup 1

Page 20: Ham Radio Applications of Linux Single Board  · PDF fileHam Radio Applications of Linux Single Board Computers ... Node 40552 ... Build and install rtl-sdr module

Node Setup 2

Page 21: Ham Radio Applications of Linux Single Board  · PDF fileHam Radio Applications of Linux Single Board Computers ... Node 40552 ... Build and install rtl-sdr module

Node Setup 3

Page 22: Ham Radio Applications of Linux Single Board  · PDF fileHam Radio Applications of Linux Single Board Computers ... Node 40552 ... Build and install rtl-sdr module

Node Callsign

Page 23: Ham Radio Applications of Linux Single Board  · PDF fileHam Radio Applications of Linux Single Board Computers ... Node 40552 ... Build and install rtl-sdr module

Stats

Page 24: Ham Radio Applications of Linux Single Board  · PDF fileHam Radio Applications of Linux Single Board Computers ... Node 40552 ... Build and install rtl-sdr module

CW or Voice ID

Page 25: Ham Radio Applications of Linux Single Board  · PDF fileHam Radio Applications of Linux Single Board Computers ... Node 40552 ... Build and install rtl-sdr module

Network Port

Page 26: Ham Radio Applications of Linux Single Board  · PDF fileHam Radio Applications of Linux Single Board Computers ... Node 40552 ... Build and install rtl-sdr module

Duplex

Page 27: Ham Radio Applications of Linux Single Board  · PDF fileHam Radio Applications of Linux Single Board Computers ... Node 40552 ... Build and install rtl-sdr module

Node Password

Page 28: Ham Radio Applications of Linux Single Board  · PDF fileHam Radio Applications of Linux Single Board Computers ... Node 40552 ... Build and install rtl-sdr module

IAX Password

Page 29: Ham Radio Applications of Linux Single Board  · PDF fileHam Radio Applications of Linux Single Board Computers ... Node 40552 ... Build and install rtl-sdr module

Simple USB Configuration 1

Page 30: Ham Radio Applications of Linux Single Board  · PDF fileHam Radio Applications of Linux Single Board Computers ... Node 40552 ... Build and install rtl-sdr module

Simple USB Configuration 2

Page 31: Ham Radio Applications of Linux Single Board  · PDF fileHam Radio Applications of Linux Single Board Computers ... Node 40552 ... Build and install rtl-sdr module

Select Radio

Page 32: Ham Radio Applications of Linux Single Board  · PDF fileHam Radio Applications of Linux Single Board Computers ... Node 40552 ... Build and install rtl-sdr module

EEPROM on URI

Page 33: Ham Radio Applications of Linux Single Board  · PDF fileHam Radio Applications of Linux Single Board Computers ... Node 40552 ... Build and install rtl-sdr module

URI Type

Page 34: Ham Radio Applications of Linux Single Board  · PDF fileHam Radio Applications of Linux Single Board Computers ... Node 40552 ... Build and install rtl-sdr module

Audio Boost

Page 35: Ham Radio Applications of Linux Single Board  · PDF fileHam Radio Applications of Linux Single Board Computers ... Node 40552 ... Build and install rtl-sdr module

Carrier Detect (COR or COS)

Page 36: Ham Radio Applications of Linux Single Board  · PDF fileHam Radio Applications of Linux Single Board Computers ... Node 40552 ... Build and install rtl-sdr module

CTCSS Decode

Page 37: Ham Radio Applications of Linux Single Board  · PDF fileHam Radio Applications of Linux Single Board Computers ... Node 40552 ... Build and install rtl-sdr module

Transmit Left Channel

Page 38: Ham Radio Applications of Linux Single Board  · PDF fileHam Radio Applications of Linux Single Board Computers ... Node 40552 ... Build and install rtl-sdr module

Transmit Right Channel

Page 39: Ham Radio Applications of Linux Single Board  · PDF fileHam Radio Applications of Linux Single Board Computers ... Node 40552 ... Build and install rtl-sdr module

PTT

Page 40: Ham Radio Applications of Linux Single Board  · PDF fileHam Radio Applications of Linux Single Board Computers ... Node 40552 ... Build and install rtl-sdr module

Filter CTCSS

Page 41: Ham Radio Applications of Linux Single Board  · PDF fileHam Radio Applications of Linux Single Board Computers ... Node 40552 ... Build and install rtl-sdr module

Flat or Speaker Audio

Page 42: Ham Radio Applications of Linux Single Board  · PDF fileHam Radio Applications of Linux Single Board Computers ... Node 40552 ... Build and install rtl-sdr module

Flat or Mic Audio

Page 43: Ham Radio Applications of Linux Single Board  · PDF fileHam Radio Applications of Linux Single Board Computers ... Node 40552 ... Build and install rtl-sdr module

Audio Delay

Page 44: Ham Radio Applications of Linux Single Board  · PDF fileHam Radio Applications of Linux Single Board Computers ... Node 40552 ... Build and install rtl-sdr module

Set Audio Levels

Page 45: Ham Radio Applications of Linux Single Board  · PDF fileHam Radio Applications of Linux Single Board Computers ... Node 40552 ... Build and install rtl-sdr module

Receive Audio Levels

Page 46: Ham Radio Applications of Linux Single Board  · PDF fileHam Radio Applications of Linux Single Board Computers ... Node 40552 ... Build and install rtl-sdr module

Transmit Left Audio Levels

Page 47: Ham Radio Applications of Linux Single Board  · PDF fileHam Radio Applications of Linux Single Board Computers ... Node 40552 ... Build and install rtl-sdr module

Transmit Right Audio Levels

Page 48: Ham Radio Applications of Linux Single Board  · PDF fileHam Radio Applications of Linux Single Board Computers ... Node 40552 ... Build and install rtl-sdr module

Done

Page 49: Ham Radio Applications of Linux Single Board  · PDF fileHam Radio Applications of Linux Single Board Computers ... Node 40552 ... Build and install rtl-sdr module

Make it Transmit

Page 50: Ham Radio Applications of Linux Single Board  · PDF fileHam Radio Applications of Linux Single Board Computers ... Node 40552 ... Build and install rtl-sdr module

Set Levels

Page 51: Ham Radio Applications of Linux Single Board  · PDF fileHam Radio Applications of Linux Single Board Computers ... Node 40552 ... Build and install rtl-sdr module

Set Receive Levels

Page 52: Ham Radio Applications of Linux Single Board  · PDF fileHam Radio Applications of Linux Single Board Computers ... Node 40552 ... Build and install rtl-sdr module

/etc/asterisk/simpleusb.conf

[usb]eeprom=0hdwtype=0rxboost=1carrierfrom=usbctcssfrom=usbtxmixa=voicetxmixb=noinvertptt=0duplex=0plfilter=yesdeemphasis=nopreemphasis=yesrxaudiodelay=0

● Configuration for Motorola SM50

Page 53: Ham Radio Applications of Linux Single Board  · PDF fileHam Radio Applications of Linux Single Board Computers ... Node 40552 ... Build and install rtl-sdr module

Update /srv/httpd/index.html

<html><head><title>40552</title></head><body><b>Node 40552</b><br><a href=allmon2/link.php?nodes=40552>AllMon</a><br><a href=cgi-bin/lsnodes_web?node=40552>lsnodes</a></body></html>

Page 54: Ham Radio Applications of Linux Single Board  · PDF fileHam Radio Applications of Linux Single Board Computers ... Node 40552 ... Build and install rtl-sdr module

Edit AllMon Files

● Edit /srv/httpd/allmon2/allmon.ini.php– Change XXXXX to node number

– Change passwd

● Edit /etc/asterisk/manager.conf– Add the same password to secret =

● Restart allstar– astres.sh

Page 55: Ham Radio Applications of Linux Single Board  · PDF fileHam Radio Applications of Linux Single Board Computers ... Node 40552 ... Build and install rtl-sdr module

Base Access

Page 56: Ham Radio Applications of Linux Single Board  · PDF fileHam Radio Applications of Linux Single Board Computers ... Node 40552 ... Build and install rtl-sdr module

AllMon2

Page 57: Ham Radio Applications of Linux Single Board  · PDF fileHam Radio Applications of Linux Single Board Computers ... Node 40552 ... Build and install rtl-sdr module

lsnode

Page 58: Ham Radio Applications of Linux Single Board  · PDF fileHam Radio Applications of Linux Single Board Computers ... Node 40552 ... Build and install rtl-sdr module

Observations

● By default the node list is updated daily via a cron job

● The rPi uses simpleusb due to limited CPU performance

● AllStar uses ArchLinux● There is no need to expand the OS

to fill the SD card (image size 4GB)

Page 59: Ham Radio Applications of Linux Single Board  · PDF fileHam Radio Applications of Linux Single Board Computers ... Node 40552 ... Build and install rtl-sdr module

ADSB SDR Receiver

● Receiver based on RTL2832 USB● About $20 on Amazon● Also used in

many ham relatedSDR projects

Page 60: Ham Radio Applications of Linux Single Board  · PDF fileHam Radio Applications of Linux Single Board Computers ... Node 40552 ... Build and install rtl-sdr module

Software Build

Build and install rtl-sdr modulegit clone git://git.osmocom.org/rtl-sdr.gitcd rtl-sdrmkdir buildcd buildcmake ../ -DINSTALL_UDEV_RULES=ONmakecd ..

Build and install dump1090git clonegit://github.com/MalcolmRobb/dump1090.gitcd dump1090makecd ..

Page 61: Ham Radio Applications of Linux Single Board  · PDF fileHam Radio Applications of Linux Single Board Computers ... Node 40552 ... Build and install rtl-sdr module

Command line interface

● ./view1019

Page 62: Ham Radio Applications of Linux Single Board  · PDF fileHam Radio Applications of Linux Single Board Computers ... Node 40552 ... Build and install rtl-sdr module

Running web interface

● ./dump1090 --net --lon -105 --lat 39

--net enables web interface port 8080

--lon and –lat sets location

● Run at boot from rc.local

Page 63: Ham Radio Applications of Linux Single Board  · PDF fileHam Radio Applications of Linux Single Board Computers ... Node 40552 ... Build and install rtl-sdr module

Building a high gain antenna

● Colinear made from coax

● Mount on N femaleinside PVC pipe

Page 64: Ham Radio Applications of Linux Single Board  · PDF fileHam Radio Applications of Linux Single Board Computers ... Node 40552 ... Build and install rtl-sdr module

Installation

● Mount the receiver as close to the antenna as possible– RTL-SDR is not weather proof

– 18” N to micro-UHF jumper

● Run long USB cable to rPi

Page 65: Ham Radio Applications of Linux Single Board  · PDF fileHam Radio Applications of Linux Single Board Computers ... Node 40552 ... Build and install rtl-sdr module

Running

Page 66: Ham Radio Applications of Linux Single Board  · PDF fileHam Radio Applications of Linux Single Board Computers ... Node 40552 ... Build and install rtl-sdr module

Other Projects

● The rPi 3 is a 1.2GHz 64 bit quad core machine with 1GB memory– Processing power to do cool stuff

● GNU radio● Adafruit

Freq Show

Page 67: Ham Radio Applications of Linux Single Board  · PDF fileHam Radio Applications of Linux Single Board Computers ... Node 40552 ... Build and install rtl-sdr module

SmokePi (SmokePing rPi)

Page 68: Ham Radio Applications of Linux Single Board  · PDF fileHam Radio Applications of Linux Single Board Computers ... Node 40552 ... Build and install rtl-sdr module

SmokePi = Bad Idea

● SD storage not suitable for database applications– Lots of writes wears out flash

● SmokePi generates lots of graphs– SD slow compared to disk

– Lots of writes wears out flash

Page 69: Ham Radio Applications of Linux Single Board  · PDF fileHam Radio Applications of Linux Single Board Computers ... Node 40552 ... Build and install rtl-sdr module

Questions?