Top Banner
Application of Linux Single Board Computers to Amateur Radio Willem A Schreüder AC0KQ [email protected] RMHAM University October 15, 2016 http://www.prinmath.com/ham/talks/ http://www.rmham.org/wordpress/course-syllabus
326

Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

Mar 06, 2018

Download

Documents

doquynh
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

Application of Linux Single Board Computers

to Amateur RadioWillem A Schreüder AC0KQ

[email protected]

RMHAM UniversityOctober 15, 2016

http://www.prinmath.com/ham/talks/http://www.rmham.org/wordpress/course-syllabus

Page 2: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

Talk Outline

● Why Linux SBCs● Installing and Configuring the OS● BPQ Packet/RMS Gateway/APRS iGate● AllStarLink Repeater● Control and Monitoring● SDR● Questions and Pizza● Don't freak out over the number of slides. Most of

them take 10 seconds to cover.

Page 3: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

Single Board Computers

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

– Beaglebone

● Microcontrollers (not covered)– Arduino

– PICAXE

– BASIC Stamp

Page 4: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

Why Linux SBCs?

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

– Ethernet networking

– USB and serial

– General purpose IO

● Low power (5V 1A)● Expandable using daughter boards● Inexpensive ($50 for a working system)

Page 5: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

SBC Pros and Cons

● Pros– Inexpensive

– No moving parts

– 5V power

– Expandable

● Cons– SD cards corrupted by bad power

– SD card is not a great hard disk

Page 6: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

Raspberry Pi

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

Page 7: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

Raspberry Pi models

● Raspberry Pi– A/A+ 700 MHz CPU & 256MB SDRAM, 1xUSB

– B 700 MHz CPU & 512MB SDRAM, 2xUSB, Ethernet

– B+ 700 MHz CPU & 512MB SDRAM, 4xUSB, Ethernet

– 2B 900 MHz Quad A7 & 1GB SDRAM, 4xUSB, Ethernet

– 3B 1.2GHz Quad 64bit & 1GB SDRAM, 4xUSB, Ethernet

● Compute Module– 700MHz CPU & 512MB SDRAM

● Zero– 1GHz CPU & 512MB SDRAM

Page 8: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

Raspberry Pi 2B

Page 9: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

Beagle Bone

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

Page 10: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

Beaglebone Models

● White– Original 720 MHz A8

● Black– Most Popular 1GHz A8

● Green– Same CPU as Black

– No barrel power, two Grove connectors

● Industrial– Black with extended temperature range

Page 11: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

Beagle Bone Black

Page 12: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

Other Linux SBCs

● Examples– Intel Edison

– VoCore

– Odroid

● Less well supported● Fewer peripherals● Sometimes better performance● Mostly higher priced

Page 13: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

Power and Storage

● Runs on 5V DC– Needs clean power

– Draws 0.5-1.0 A without daughter boards

● Micro SD card storage– Finite life

– Marginal performance

– Bad power kills SD

Page 14: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

Must Have Accessories

● Micro SD card– Faster is better

● Class 10● UHS 1● UHS 3

– At least 4GB● 16GB is ample

● Real time clock– PiFace Shim RTC

– Adafruit DS1307

– Needed if nonetwork (NTP)

Page 15: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

Nice to have

● Official Raspberry 7” Touchscreen

Page 16: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

Power Control

● Andice LabsPowercape

● Adafruit Powerboost 1000C

● Charges and boosts 4V from LIPO battery

Page 17: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

TNC-X/Pi/Black

● Designed by John Hansen W2FS● Based on PIC Microcontroller● MX614 Bell 202 modem chip● KISS interface

– Serial

– USB

– I2C

Page 18: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

Why the BB/TNC-Black?

● BBB has 5 serial ports● Mechanically stable stacked capes● Powercape battery backup● Lots of pins for

site monitoring● 50% more

expensive

Page 19: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

Part 1aGetting Started on the

Raspberry Pi

Page 20: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

rPi Materials

● Raspberry Pi 2B or 3B● Micro SD card● 5V 1A power supply● USB A to micro USB B cable● Ethernet cable● Direct connection

– Monitor or TV

– HDMI cable

– USB keyboard and mouse

Page 21: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

Raspberry OS Choices● https://www.raspberrypi.org/downloads/● Debian derivatives are most popular

– Raspbian (Official Supported OS)

– Alternatives are● NOOBS (New Out Of the Box Software)● Ubuntu Mate (Ubuntu Desktop)● Windows 10 IOT (a.k.a. YGBSM)● several others, some not Linux based

● Debian 8 (Jessie) adopts systemd– This changes how system programs are run

● No more /etc/init.d/XXX and /etc/inittab● Control programs with systemctl

Page 22: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

Burning the Image

● Unzip image– 2016-09-23-raspbian-jesse.img

● Linux or OSX command line– dd if=2016-09-23-raspbian-jesse.img of=/dev/mmcblk0

– sync;sync

● Windows– Download Win32DiskImager

– Select image file name

– Select SD card drive letter

– Click Write

Page 23: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

First boot with Pixel

Page 24: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

Raspberry > Preferences >Raspberry Pi Configuration

Page 25: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

Finding your IP Address

Page 26: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

Remote Access

● Do ifconfig from the keyboard● Look for hostname raspberrypi

– Assign a reserved IP address and add DNS

● Advantages of using ssh– Can access the device from anywhere

– Automatic logins using authorized_keys

– Text based menus work great remotely

Page 27: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

Configuring rPi

● Plug in keyboard, mouse and screen– Menu >Preferences > rPi Configuration

● Plug in ethernet cable and locate the IP address– Default hostname is raspberrypi

– ssh [email protected]● password raspberry

Page 28: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

Running raspi-config

Page 29: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

Expand file system

Page 30: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

Change the Password

Page 31: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

Set timezone 1

Page 32: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

Set timezone 2

Page 33: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

Advanced Options

Page 34: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

Set Hostname

Page 35: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

Disable serial login

Page 36: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

Reboot and log in again

Page 37: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

Add user willem

Page 38: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

Install required packages

Page 39: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

Part 1bGetting Started on the

Beaglebone Black

Page 40: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

Beaglebone Materials

● Beaglebone Black or Green● Micro SD card● 5V 1A power supply● USB A to mini USB B cable or

barrel connector● Ethernet cable● Direct connection

– Monitor or TV

– HDMI to micro HDMI cable

– USB keyboard and mouse

Page 41: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

Beaglebone OS Choices● http://beagleboard.org/latest-images● Debian 8 Jessie

– Linux Kernel 4.4 (Jesse 8.4)

● Debian 7 Wheezy– Linux Kernel 3.8 (Wheezy 7.11)

● I have had trouble with Jessie on the BBB, so use Wheezy for now

Page 42: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

Burning the Image

● Images are compressed with xz– p7zip on windows

– xz-utils on Linux

● Uncompress image (Linux)– xz -d bone-debian-*.img.xz

● Burn image using dd or Win32DiskImager

Page 43: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

Beaglebone Resize Image

Reboot to apply resize

Page 44: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

Beaglebone Configuration

Page 45: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

Beaglebone User Configuration

● Set root and debian passwords– passwd

– passwd debian

● Add additional user(s)– adduser willem

– adduser willem sudo

Page 46: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

Part 1cGetting around in Linux

Page 47: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

Command Line Basics● ls list files● cd change directory● cp copy file(s)● mv move file(s)● rm remove file(s)● mkdir make new directory● rmdir remove directory● sudo run the command as root● man help● Command line parameters start with -

Page 48: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

Customizing your environment

● Create a file named .bashrc in your home directory– alias cp='cp -i'

– alias mv='mv -i'

– alias rm='rm -i'

– export PATH=$PATH:/new/location

● Files starting with . (period) are hidden unless you do ls -a

Page 49: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

Software Maintenance

● apt-get update– Download index of latest software available

● apt-get upgrade– Upgrade all packages to latest versions

● apt-get install foo– Install package foo

● apt-get remove foo– Remove package foo

Page 50: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

Editing files

● leafpad rPi editor● nano Easy to use● vi/vim/gvim The editor for real men● emacs For uber-nerds● BPQ has an editor built into the web

interface to update bpq32.cfg

Page 51: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

Part 2BPQ BBS/RMS/iGate

Page 52: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

What is BPQ?

● NET/ROM compatible Packet Switch– Multiple ports

● As many I2C or serial ports as you have available

– Multiple protocols● Packet, Pactor, IP

– Multiple functions● BBS, Chat, APRS

Page 53: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

What can we use BPQ for?

● AX25 (Packet) Access point● Bulletin Board System (BBS)● Radio Message Server (RMS)● APRS Internet Gateway● Application Gateway

Page 54: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

BPQ Web Configuration

Page 55: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

BBS Message Page

Page 56: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

Message Forwarding

Page 57: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

APRS Page

Page 58: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

Stations Heard on RF

Page 59: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

Station Map

Page 60: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

How does it work?

● BPQ is a software program– Runs on most computers

– Somewhat complex configuration file

● Connects to radio via Terminal Node Controller (TNC)– Typically serial connection

● Interconnects via IP● Built-in BBS, iGate, Chat server, ...

Page 61: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

rPi/BPQ vs. KPC3+ BBS

● rPi/BPQ Pros– Lower cost ($100)

– Much larger capacity (GB vs. kB)

– More ports (multiple RF, serial and IP)

– Sophisticated forwarding

● rPi/BPQ Cons– Higher current draw

– Less tolerant of bad power

Page 62: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

Complaint: Hard to set up BPQ

● BPQ is very sophisticated, and that necessarily adds complexity

● Solutions:– Use bpq-config to get started– Web interface for BBS etc.– Join a support group

● Yahoo BPQ32● RMHAM

Page 63: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

Why so rPi and BBB centric?

● BPQ is software – runs anywhere– Supported on Windows, OSX, Linux– Best run as a headless server

● rPi and BBB are– Inexpensive– Reliable Linux boxes– DC powered– TNC/Pi & TNC/Black daughter boards– All the cool kids have one

Page 64: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

Why the rPi/TNC-Pi?

● Extremely well supported● Complete package with screen

Page 65: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

Brief history of BPQ

● Written by John Wiseman G8BPQ● Originally called BPQCODE● Became BPQ32 in late 90s● Ported to OSX/Linux in 2000s● Ported to Raspberry Pi/TNC-PI and Beagle

Bone Black/TNC-Black

Page 66: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

Building the TNC kit

● It takes a few hours to build– Quality soldering iron time

– Simple, excellent instructions

● Test it– Check voltages, insert ICs

– LEDs should flash on power up

– Configure OS and BPQ

● John W2FS provides outstanding after-sales support

Page 67: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

Selecting a Username

● Default user name– Raspberry Pi = pi

– Beaglebone Black = debian

● The default user name is good for BPQ and similar programs with multiple users

● Create a login for each user● Create subdirectories for programs like

BPQ which will clutter the home directory

Page 68: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

Download and run bpq-config

Page 69: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

Download BPQ(Can also be used to update BPQ)

Page 70: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

Configure BPQ

Page 71: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

Node Configuration

Page 72: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

Node Callsign 1

Page 73: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

Node Callsign 2

Page 74: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

Owner Acronym 1

Page 75: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

Owner Acronym 2

Page 76: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

Owner Name 1

Page 77: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

Owner Name 2

Page 78: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

Grid Square 1

Page 79: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

Grid Square 2

Page 80: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

Winlink RMS 1(notice that it skipped items with defaults)

Page 81: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

Winlink RMS 2

Page 82: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

CMS Callsign 1(CMS call and password added when WinLink is Yes)

Page 83: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

CMS Callsign 2

Page 84: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

CMS Password 1

Page 85: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

CMS Password 2

Page 86: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

Chat Server 1

Page 87: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

Chat Server 2

Page 88: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

APRS iGate 1

Page 89: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

APRS iGate 2

Page 90: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

Finish Node Configuration

Page 91: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

Configure Port

Page 92: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

Add Port

Page 93: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

Port Type 1

Page 94: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

Port Type 2

Page 95: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

Device Type 1

Page 96: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

Device Type 2(Devices description is board specific)

Page 97: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

Device Number 1

Page 98: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

Device Number 2

Page 99: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

Frequency 1

Page 100: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

Frequency 2

Page 101: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

Transmit Power 1(Used for WinLink reporting)

Page 102: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

Transmit Power 2

Page 103: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

Antenna Height 1(Used for WinLink reporting)

Page 104: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

Antenna Height 2

Page 105: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

Antenna Gain 1(Used for WinLink reporting)

Page 106: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

Antenna Gain 2

Page 107: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

Finish Port Configuration

Page 108: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

Finish Adding Ports

Page 109: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

Add Telnet (IP) Users(You mast have at least one)

Page 110: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

Add new Telnet user

Page 111: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

User Name 1

Page 112: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

User Name 2

Page 113: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

Password 1

Page 114: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

Password 2

Page 115: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

Callsign 1

Page 116: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

Callsign 2

Page 117: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

Application 1

Page 118: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

Application 2

Page 119: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

System Operator 1

Page 120: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

System Operator 2

Page 121: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

Finish User Configuration

Page 122: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

Add Another User

Page 123: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

Finish adding second user

Page 124: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

Finish adding Telnet Users

Page 125: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

Configure AXIP Node Maps

Page 126: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

Add new AXIP map

Page 127: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

Callsign 1

Page 128: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

Callsign 2

Page 129: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

AX IP Address 1

Page 130: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

AX IP Address 2

Page 131: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

Done Adding AXIP Map

Page 132: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

Finish adding AXIP maps

Page 133: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

Write BPQ Configuration

Page 134: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

Files Written by bpq-config

Page 135: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

Done with Configuration

Page 136: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

Start BPQ

Page 137: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

Options after Starting BPQ

Page 138: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

Browse to BPQ node port 8008(if you configured a different port, use it instead)

Page 139: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

BPQ Ports

Page 140: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

Click Mail Server Pages

Page 141: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

BBS Configuration(bpq-config set most of these in linmail.cfg)

Page 142: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

BBS Users(bpq-config added RMS and telnet users)

Page 143: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

User RMS is a WinLink2000

Page 144: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

Forwarding to Winlink is Enabled

Page 145: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

Housekeeping

Page 146: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

Connect out via RF

Page 147: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

Connect in via RF (as AC0KQ)

Page 148: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

Connect via RF to WinLink

Page 149: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

BBS Messages

Page 150: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

General BBS Users

Page 151: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

WinLink User Download

Page 152: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

Forwarding BBS

Page 153: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

Forwarded Users

Page 154: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

RF > N0SZ & AXIP > K0NTS-1

`

Page 155: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

Setting up an iGate

● This iGate setup is on a BeagleBone Black– The only difference with an rPi is the serial

port names in the Port section

● The Node setup is the same as what was done previously– Some but not all the parameters are relevant

● Ports are mapped as Packet or APRS in port configuration– You can have both Packet and APRS ports on

the same BPQ node

Page 156: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

Node Configuration(Note that Winlink RMS and Chat is NO)

Page 157: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

Enable iGate

Page 158: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

iGate APRS SSID 1(note APRS specific new items)

Page 159: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

iGate APRS SSID 2

Page 160: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

APRS Symbol Set 1(used to set symbol on aprs.fi)

Page 161: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

APRS Symbol Set 2

Page 162: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

APRS Symbol 1(used to set symbol on aprs.fi)

Page 163: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

APRS Symbol 2

Page 164: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

APRS Status Message 1(used when beaconing)

Page 165: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

APRS Status Message 2

Page 166: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

iGate Latitude 1

Page 167: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

iGate Latitude 2

Page 168: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

iGate Longitude 1

Page 169: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

iGate Longitude 2

Page 170: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

APRS2 Gateway 1(where to send APRS reports)

Page 171: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

APRS2 Gateway 2(bpq-config generates password automatically)

Page 172: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

Finish iGate Node Configuration

Page 173: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

iGate Add Port Configuration

Page 174: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

Set Port Type to APRS

Page 175: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

Set Serial Port(Note that this is a Beaglebone so 4 ports)

Page 176: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

Select Serial Port Number

Page 177: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

Select Serial Port Number

Page 178: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

APRS Frequency 1

Page 179: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

APRS Frequency 2

Page 180: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

Finish Port Configuration

Page 181: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

Node Page Update

Page 182: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

APRS Main Page

Page 183: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

APRS RF Stations

Page 184: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

APRS Station Map

Page 185: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

Report on aprs.fi

Page 186: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

Data graph on aprs.fi

Page 187: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

Adding device ports

● Beaglebone has 5 serial ports– Stack 4 TNC-Blacks

– Attach external devices via headers

● Raspberry Pi has 1 serial port– Access TNC-Pi via I2C bus

– Requires reprogramming of TNC-Pi

Page 188: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

Reprogramming TNC

● Disable BPQ to have exclusive access to the TNC device– systemctl disable bpq.service

– systemctl stop bpq.service

● Turn off power between steps● Enable BPQ when done

– systemctl enable bpq.service

– systemctl start bpq.service

Page 189: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

Enable I2C kernel modules

Page 190: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

Check current parameters

Page 191: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

Set I2C address to 16 (0x10)

Page 192: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

Power off&on and check

Page 193: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

Check parameters

Page 194: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

Adding a Second RF Port

● Must use I2C since rPi has only one serial port

● Convert first TNC to I2C before mounting second TNC

● Test it to make sure it works● Add second TNC● Power down between steps

Page 195: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

Set I2C addres for 2nd TNC

Page 196: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

Reboot and check

Page 197: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

BPQ Port 1

Page 198: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

Port 1 is for BBS/RMS

Page 199: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

BPQ Port 2

Page 200: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

Port 2 is for APRS

Page 201: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

BPQ Ports Page

Page 202: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

Advanced Configuration

Page 203: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

Adding a new service

● BPQ adds new services via TCP/IP● BPQ connects to local port● Received stream piped to stdin● Transmits output from stdout● First line is connected station call

Page 204: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

Monitor service

● Written in Perl● Interprets commands● Used to get system time and disk● Bye to exit● Mapped to N0SZ-2 and port 8004

Page 205: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

Command Port

Page 206: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

Application

Page 207: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

systemd Socket Service

/lib/system/systemd/mon.socket /lib/system/systemd/[email protected]

[Unit]Description=MON socket

[Socket]ListenStream=8004Accept=yes

[Install]WantedBy=sockets.target

[Unit]Description=MON server

[Service]ExecStart=/home/willem/BPQ/mon.plStandardInput=socket

Page 208: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

mon.pl

Page 209: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

Enable the service● Enable and start the service

– sudo systemctl enable mon.socket

– sudo systemctl start mon.socket

Page 210: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

Time● rPi and BBB does not have a real time

clock, sets time using NTP● If network does not recover after power

failure, messages may be purged● Add DS1307 RTC

from Adafruit orsimilar device

Page 211: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

Power Backup● With a 6600 mAh LiPo battery the PowerCape

will run a BB and TNC for more than a day● Controlled shutdown on low battery

Page 212: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

Beaglebone Notes● The BB configuration is similar except that

up to 4 TNC can be run as /dev/ttyO1 - /dev/ttyO5

● mkbpq puts web configuration on port 8008 since 8080 is used

Page 213: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

What breaks BPQ● Things that mess with serial and I2C

– Raspberry Pi 3 (bluetooth, CPU freq)

– getty on rPi

– Debian 8 on Beaglebone

● Use lsof and i2c-tools to debug– If BPQ receives (stations in mh) but no transmit,

a device clash is likely

● Run sudo ./pilinbpq from command line

Page 214: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

Updating BPQ

● BPQ is updated regularly● bpq-config Download will dowload the

latest version of executables and the matching HTML pages

● After downloading restart BPQ

Page 215: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

BPQ with external TNC● BPQ supports Pactor modems including

channel steering● Attach via serial port● Configure in BPQ

– DRIVER=SCSpactor

– RIGCONTROL to steer

Page 216: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

About bpq-config

● bpq-config is designed to get you started– It covers most installations, but not all

● It keeps its on configuration file .bpqconfig– Easier to parse

– Hand edits are lost when using bpq-config

– Version 1.1 may parse bpq32.cfg instead

● This is new software– Bug reports and improvements are welcome

– Patches are even more welcome

Page 217: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

Part 3AllStarLink Repeater

Page 218: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

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 219: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

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

● Tune a receiver to to the radio frequency● Power up rPi

– Allison will announce the IP address

Page 220: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

Initial Login (password is root)

Page 221: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

Set Time Zone 1

Page 222: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

CW or Voice ID

Page 223: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

Network Port

Page 224: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

Duplex

Page 225: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

Node Password

Page 226: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

IAX Password

Page 227: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

Simple USB Configuration 1

Page 228: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

Simple USB Configuration 2

Page 229: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

Select Radio

Page 230: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

EEPROM on URI

Page 231: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

URI Type

Page 232: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

Audio Boost

Page 233: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

Carrier Detect (COR or COS)

Page 234: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

CTCSS Decode

Page 235: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

Transmit Left Channel

Page 236: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

Transmit Right Channel

Page 237: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

PTT

Page 238: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

Filter CTCSS

Page 239: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

Flat or Speaker Audio

Page 240: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

Flat or Mic Audio

Page 241: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

Audio Delay

Page 242: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

Set Audio Levels

Page 243: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

Receive Audio Levels

Page 244: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

Transmit Left Audio Levels

Page 245: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

Transmit Right Audio Levels

Page 246: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

Done

Page 247: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

Make it Transmit

Page 248: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

Set Levels

Page 249: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

Set Receive Levels

Page 250: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

/etc/asterisk/simpleusb.conf

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

● Configuration for Motorola SM50

Page 251: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

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 252: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

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 253: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

AllMon2

Page 254: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

Set AllMon Login

● Set AllMon2 user name(s) and password(s)– cd /srv/http/allmon2

– htpasswd -cd .htpasswd admin

– htpasswd -d .htpasswd <userid>

● Password can only contain A-Z a-z 0-9– If you want to use aditional characters change

login.php line 28 from if(!ctype_alnum($pass)){to if(preg_match("[^A-Za-z0-9\.\!\$]",$pass)){including all the characters you want to allow

Page 255: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

Base Access

Page 256: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

lsnode

Page 257: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

AllMon2

Page 258: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

Connect to node 29571

Page 259: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

Incoming Audio

Page 260: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

Example Control Panel Display

Page 261: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

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 262: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

Part 4 Control and Monitoring

Page 263: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

Raspberry Pi Header

`

Page 264: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

Pins are multiplexed

● Pins configured for different uses● GPIO 14&15 <=> UART TxD/RxD ● GPIO 2&3 <=> I2C SDA&SCL● GPIO 7&8&9&10&11 <=>

SPI MOSI&MISO&SCL&CE0&CE1● GPIO 18&19 <=> PWM 0&1● 16-26 GPIO pins

Page 265: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

Raspberry Pi Serial

● Single serial port– /dev/ttyAMA0

● Speeds up to 115200 bps● TTL level signals● By default connected to getty

Page 266: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

Raspberry Pi I2C

● Inter-Integrated Circuit– Serial bus (a.k.a SMBus)

● Default speed 400,000 bps● rPi has single external I2C bus

– 127 devices

● Control lines– SDA (data)

– SCL (clock)

Page 267: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

Enable I2C with raspi-config 1

Page 268: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

Enable I2C with raspi-config 2

Page 269: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

Viewing the Bus

Page 270: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

i2cdetect outputs

● Scans bus looking for devices- - No Device answered

UU Device in use by a driver

dd Slave found (dd hex adress)

● Watch for devices in use from user space (e.g. BPQ)– can corrupt data

Page 271: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

I2C devices

● TNC-Pi● INA219 current sensor● Temperature/pressure/RH sensors● LCD displays● Accelerometers● Digitial I/O pins● Analog<>Digital I/P pins

Page 272: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

SPI bus

● Serial Peripheral Interface● Signals (supports 2 slaves)

– MasterOutSlaveIn

– MasterInSlaveOut

– Clock

– CE0 (SS1)

– CE1 (SS2)

● Speeds up to 250 MHz

Page 273: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

raspi-config enable SPI

Page 274: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

SPI Devices

● Faster than I2C, but uses more pins● Same devices as I2C, but adds

– GPS

– Ethernet/WiFi/Bluetooth/RFID

– Memory

● Full duplex

Page 275: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

Beagle Bone Black

Page 276: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

Pins are multiplexed

● Default configuration– Power&Reset Buttons

– 4 serial ports

– 8 analog inputs (1.8V max)

– 1 external I2C bus (127 devices)

– 19-128 GPIO pins

– Switched 5V/3.3V DC

Page 277: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

Limitations

● Pins connect directly to CPU– Long wires are CPU antennas!

● rPi & BBB GPIO Pins are 3.3 V– Max current 16 mA in or out

– Max combined output current 50 mA

● BB Analog In Pins are 1.8V

Page 278: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

Device Tree

● Unix: Everything is a File● /sys maps to hardware

– In kernel virtual file system

● Get status by reading● Set status by writing

Page 279: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

Reading analog pins on BBB

● Enable analog pins in device tree

echo cape-bone-iio>/sys/devices/bone_capemgr.*/slots

● Read value of pin AIN0 in mV

cat /sys/devices/ocp.*/helper.*/AIN0

580● Voltage on pin AIN0 is 0.580V

Page 280: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

Show pin voltages in Python 1

#!/usr/bin/python

for i in range(0,8): # Snarf file fd = open("/sys/devices/ocp.3/helper.16/AIN%d" % i) text = fd.read() fd.close() # Decode voltage V = float(text)/1000 # Print voltage print "AIN%d = %5.3fV" % (i,V)

Page 281: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

Show pin voltages in Python 2

./areadAIN0 = 1.740VAIN1 = 1.481VAIN2 = 1.645VAIN3 = 0.867VAIN4 = 0.589VAIN5 = 0.709VAIN6 = 0.852VAIN7 = 1.678V

Page 282: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

Limitations

● Maximum voltage is 1.8V● Use a voltage divider to increase

– Use 1% or better resistors

– Max 1 kohm for lower leg

● No analog in on rPi– use MCP3008 or similar and SPI

Page 283: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

Assigning pins to GPIO

● /sys/class/gpio/export– Maps pin to GPIO

– echo 18 > /sys/class/gpio/export

● /sys/class/gpio/unexport– Removes pin from GPIO map

– echo 18 > /sys/class/gpio/unexport

● Root access required

Page 284: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

Manipulating GPIO

● When mapped to GPIO, a new directory is created for that pin– /sys/class/gpio/gpioXX

● Files in this directory controls pin– direction = in or out

– value = 0 or 1

Page 285: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

Checking pin value

● In or out?– cat /sys/class/gpio/gpio18/direction

● High or low?– cat /sys/class/gpio/gpio18/value

Page 286: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

Changing the GPIO direction

● Set pin for input– echo in > /sys/class/gpio/gpio18/direction

● Set pin for output– echo out > /sys/class/gpio/gpio18/direction

Page 287: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

Changing the GPIO value

● Set pin voltage high– echo 1 > /sys/class/gpio/gpio18/value

● Set pin for output– echo 0 > /sys/class/gpio/gpio18/value

Page 288: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

Setting pins at boot

● Edit /etc/rc.local– Runs at boot time as root– Enable pin 18 for output and set high

echo 18 > /sys/class/gpio/export

echo out > /sys/class/gpio/gpio18/direction

echo 1 > /sys/class/gpio18/value– Before this runs, values are unpredictable

Page 289: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

Setting many pins at boot

● Edit /etc/rc.local– Set ping 18, 23, 24 and 25 for output and high

# Set GPIO ports to out

for n in 18 23 24 25; do

echo $n > /sys/class/gpio/export

echo "out" > /sys/class/gpio/gpio$n/direction

echo 1 > /sys/class/gpio/gpio$n/value

done

Page 290: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

Turn on pin 5 minutes per hour

● Edit /etc/crontab

# This line turns on pin 18 at *:0

0 * * * * root echo 1 > /sys/class/gpio/gpio18/value

# This line turns off pin 18 at *:5

5 * * * * root echo 0 > /sys/class/gpio/gpio18/value

Page 291: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

python access to pins

● Import the GPIO packageimport Rpi.GPIO as GPIO

● Name the pins by their GPIO#GPIO.setmode(GPIO.BCM)

● Name pins by their board numberGPIO.setmode(GPIO.BOARD)

Page 292: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

python set pins for in/out

● Set pin 18 for outputGPIO.setup(18,GPIO.OUT)

● Set pins 18,23,24&25 for outputGPIO.setup([18,23,24,25],GPIO.OUT)

● Set ping 18 for inputGPIO.setup(18,GPIO.IN)

Page 293: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

python set/get pin value

● Set pin 18 highGPIO.output(18,1)

● Set pin 18 lowGPIO.output(18,0)

● Read ping 18 valuep18 = GPIO.input(18)

Page 294: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

Input pin status

● Set ping 23 to input with pull up

● GPIO.setup(24,GPIO.IN,pull_up_down=GPIO.PUD_UP)

– ground to activate

● Set pin 24 to input with pull down

● GPIO.setup(24,GPIO.IN,pull_up_down=GPIO.PUD_DOWN)

– Pull up to 3.3V

● A 1k series resistor is typically a good idea

Page 295: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

Important Limitations

● GPIO pins are 3.3 V● Current limited to 16mA● Opto-isolate

relays

Page 296: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

I2C Example: Voltage&Current

● TI INA219 I2C high side monitor● Max 26V● Current Sense

40-320mVshunt

● Chip $2.50● Adafruit $10

Page 297: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

Adafruit Breakout

● I2C address 0x40 0x41 0x42 0x43– solder jumpers

● 0.1 ohm shuntreads to 3.2A

Page 298: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

Python Usage

import Subfact_INA219 as INA219

ina = INA219()

V = ina.getBusVoltage_V()

mA = ina.getCurrent_mA()

Page 299: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

Digging deeper

● Subfact_INA219 imports Adafruit_I2C● Adafruit_I2C imports smbus

● def getBusVoltage():res = i2c.readU16(0x02)

mV = (res >> 3) * 4

return 0.001*mV

Page 300: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

Reading 1wire Temperatures

● 1wire uses a single data bus● Each device has unique address● DS18S20 is a TO-92 temperature sensor

with 0.5C resolution for $2.50● Can use parasite

power (but not on rPi)Use 4k7 pullup

Page 301: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

Building the Device Tree 1/dts-v1/;/plugin/; / { compatible = "ti,beaglebone", "ti,beaglebone-black", "ti,beaglebone-green"; part-number = "BB-W1"; version = "00A0"; exclusive-use = "P9.23"; fragment@0 { target = <&am33xx_pinmux>; __overlay__ { bb_w1_pins: pinmux_bb_w1_pins { pinctrl-single,pins = <0x68 0x37>; /* gpio1_17, OMAP_PIN_INPUT_PULLUP|OMAP_MUX_MODE7 */ }; }; };

Page 302: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

Building the Device Tree 2

fragment@1 { target = <&ocp>; __overlay__ { onewire@0 { status = "okay"; compatible = "w1-gpio"; pinctrl-names = "default"; pinctrl-0 = <&bb_w1_pins>; gpios = <&gpio2 17 0>; }; }; };};

Page 303: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

Building the Device Tree 3

● Edit w1.dts as shown above● Compile with device tree compiler

dtc -O dtb -o w1-00A0.dtbo -b 0 -@ w1.dts

mv w1-00A0.dtbo /lib/firmware

● Enableecho w1 > /sys/devices/bone_capemgr.9/slots

Page 304: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

Getting 1wire output

● ls /sys/bus/w1/devices10-000802fba50d10-000802fbe2f610-000802fbf0f9w1_bus_master1

● 10 means it is a DS18S20 temp, the test is a unique serial number

Page 305: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

Getting the Data

cat /sys/bus/w1/devices/w1_bus_master1/w1_master_slaves

10-000802fbe2f6

10-000802fbf0f9

10-000802fba50d

cat /sys/bus/w1/devices/10-000802fbe2f6/w1_slave

2c 00 4b 46 ff ff 0e 10 17 : crc=17 YES

2c 00 4b 46 ff ff 0e 10 17 t=21875

Temperature of first sensor is 21.875 OC

Page 306: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

Reading Temps in Python 1

# Snarf the slave list filefd=open("/sys/bus/w1/devices/w1_bus_master1/w1_master_slaves")text = fd.read()fd.close()# Split text on line breaksslaves = filter(None,text.split("\n"))# Sort so that order is predictableslaves.sort()

Page 307: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

Reading Temps in Python 2# Blank dictionarytemps = {}# Loop over devicesfor slave in slaves: if slave=="": continue # Snarf device file fd = open("/sys/bus/w1/devices/"+slave+"/w1_slave") text = fd.read() fd.close() # Split lines lines = text.split("\n") words = lines[1].split(" ") # Get temperature C = float(words[9][2:])/1000 F = 9*C/5+32 # Add result to dictionary temps[slave] = "%.1fF" % F

Page 308: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

Observations

● Temperature conversion occurs when you cat the file– About 700mS per device

● Temperature reads are best done using a separate thread

● rPi 1wire support in raspi-config

Page 309: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

Part 5 Software Defined Receiver

Page 310: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

ADSB SDR Receiver

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

many ham relatedSDR projects

Page 311: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

Software Build

Build and install rtl-sdr module and software

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

/usr/local/bin/rtl_tcp is a TCP server for remote monitoring

Page 312: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

dump1090 Build

Build and install dump1090 and related software

git clonegit://github.com/MalcolmRobb/dump1090.gitcd dump1090makecd ..

Page 313: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

Command line interface

● ./view1019

Page 314: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

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 315: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

Running

Page 316: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

Building a high gain antenna

● Colinear made from coax

● Mount on N femaleinside PVC pipe

Page 317: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

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 318: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

Other SDR Projects

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

● AdafruitFreq Show

● GNU radioEric SchneiderRMHAM UApril 15, 2017

Page 319: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

RasHAWK

Page 320: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

SDR TCP server

● Start rtl_tcp as root– rtl_tcp -a <ipaddress>

– Default port is 1234 (set with -p)

● Connect to it with an SDR program such as SDR# or GNU Radio on a device with enough power to process the data

Page 321: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

SDR# Screenshot

Page 322: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

Part 6 Other Projects

Page 323: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

rPi / TNC-Pi / screen / xastir

Page 324: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

SmokePi (SmokePing rPi)

Page 325: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

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

● USB-mSATA hat allows adding a hard disk– With a SSD drive this becomes feasible

Page 326: Application of Linux Single Board Computers to Amateur Radio · PDF fileSDR Questions and ... Linux or OSX command line ... Connects to radio via Terminal Node

Pizza!