Sei sulla pagina 1di 11

QRPi software installation guide for

different HAM TX modes


Zoltan Doczi, HA7DCD
zoltan@rfsparkling.com

updated: 22/04/2016 (adding RPi 3 notes)

Mounting properly QRPi to different RaspberryPi


versions
RaspberryPi V2 B
RaspberryPi V1 B

RaspberryPi V1 B+

1
Installation of different HAM radio transmitter
programs
Modulation Program Jumper: GPIO4, Jumper: GPIO18
default setting

SSB rpitx / qtcsdr X

FSQ rpitx X

NFM rpitx / qtcsdr X

AM rpitx / qtcsdr X

WSPR WsprryPi X

CW PiCW X

SSTV PySSTV X

Freq. Sweep FREQ_PI X

rpitx uses GPIO18 this means JP1 jumper has to be cut and
opposite pad (GPIO18) + middle pad has to be soldered for that
program. All the other programs listed below using the default
GPIO4 pin! For modification please see page 6.

By factory default the RF signal generator is GPIO4 selected by


jumper short circuit is on the bottom side:

2
Just open a terminal on the Raspberry Pi and use the following
commands:

WSPR - GPIO4

sudo apt-get update


sudo apt-get dist-upgrade

sudo apt-get install git


git clone https://github.com/JamesP6000/WsprryPi.git
cd WsprryPi
make

an example command to start TX:


sudo ./wspr -r -o -s XX0XXX JN97SM 20 20m

Source: https://github.com/JamesP6000/WsprryPi

3
PiCW - GPIO4

sudo apt-get update


sudo apt-get dist-upgrade

sudo apt-get install git g++-4.7 make grep mawk ntp


git clone https://github.com/JamesP6000/PiCW.git
cd PiCW
make

an example command to start TX:


sudo ./PiCW --freq 10.140e6 --self-calibration TEST DE N9NNN

Source: https://github.com/JamesP6000/PiCW
SSTV - GPIO4

You will first need to install PySSTV, if you do not already have it. The following commands
worked for me on a stock Raspbian install.

sudo apt-get install python-setuptools


sudo apt-get install python-imaging
sudo easy_install pip
sudo pip install setuptools --no-use-wheel --upgrade
sudo pip install PySSTV
Then you will need to configure and compile tones-to-rf.c

The version of tones-to-rf.c distributed is pre-configured for the Raspberry Pi 2. If you have a
Raspberry Pi 1, find the lines that define BCM2708_PERI_BASE, and uncomment the line
relevant to your platform.

Compile tones-to-rf as follows:

gcc -Wall -O4 -o tones-to-rf tones-to-rf.c -std=gnu99 -lm


copy beacon.py from gitgub to /pi:
https://github.com/JennyList/LanguageSpy/blob/master/RaspberryPi/rf/sstv/beacon.py

Source: https://github.com/JennyList/LanguageSpy/tree/master/RaspberryPi/rf/sstv

FREQ_PI - GPIO4

sudo git clone


https://github.com/JennyList/LanguageSpy/blob/master/RaspberryPi/rf/freq_pi/freq_pi.c

!!!!

4
//Uncomment the relevant base address definition for your platform
//Base address definition for Pi 1
//#define BCM2708_PERI_BASE 0x20000000
//Base address definition for Pi 2
#define BCM2708_PERI_BASE 0x3F000000
!!!!

sudo gcc -Wall -O4 -o freq_pi freq_pi.c -std=gnu99 -lm


cp freq_pi /usr/local/bin/
sudo freq_pi

Source: https://github.com/JennyList/LanguageSpy/tree/master/RaspberryPi/rf/freq_pi

5
rpitx - GPIO18

1. You have to modify JP1 jumper on QRPi to switch to the GPIO18 RF source instead
of the GPIO4, routed from the Raspberry Pi. Cut the shortcut between the too
terminals of JP1:

2. Solder a solder joint between the middle point and the GPIO18 terminal of JP1:

6
sudo git clone https://github.com/F5OEO/rpitx
cd ./rpitx
./install.sh

To start a CW signal at 14.097 MHz type the following:


sudo ./rpitx -m VFO -f 14097

For more detailed help regarding SSB generation please check the github site at:
https://github.com/F5OEO/rpitx

An rpitx SSB output spectrum with QRPi monitored at HDSDR:

Output spectrum at Signal Hound spectrum analyzer:

7
qtcsdr - GPIO18

git clone https://github.com/ha7ilm/qtcsdr


cd qtcsdr
./rpi-install.sh
./rpi-test.sh

Notes from the author of qtcsdr:


You will definitely need a Raspberry Pi version 2 (Model B) to run qtcsdr.

I didn't test it on Raspberry Pi version 1, but I'm quite sure that it won't work, as the
CPU is not capable of doing this (it has a single-core CPU compared to the
quad-core one in the RPi 2).

You will need at least Raspbian Jessie (09/2015) if you want to install qtcsdr with
rpi-install.sh.

https://github.com/ha7ilm/qtcsdr

8
Interview with James Peroulas about
WsperryPi.
He is the one out of the seven developer who created WsperryPi
10/2015

ZD - Why and when did you started to you use WSPR mode?

JP
I'd been working on radio for 15 years professionally (3G/ 4G receiver/ transmitter
algorithms) but never really built my own communications system. I had my ham license and
discovered a $20 WSPR transmitter (Ultimate QRSS) that enabled me to actually transmit
on the cheap. This small device didn't for me out of the box and I descended into the world
of timing and synchronization and eventually put a heater on the crystal to stabilize the TX
frequency. I actually work on timing and synchronization professionally right now.

ZD - What motivated you to build the WsperryPi code?

JP
To be clear, someone else wrote the bulk of the code. I added comments, frequency
calibration, and frequency hopping. What motivated me was the fact that WSPR needed
very precise frequency calibration that was not available in the original code. For the original
code, you'd have to transmit a signal, measure it externally, adjust the frequency offset to
compensate for the error, and try again. When the temperature of the room changed, you'd
have to do it all over again :) I also wanted to add frequency hopping to reduce the
probability that you would consistently be on top of someone else's transmission.

ZD - What was the greatest challenge during the development?

JP
Understanding timing and syncrhonization in detail and actually performing the
measurements. I had to measure 1Hz offsets when the transmitter was at 10MHz :) As we
discussed in email, I also discovered a bug somewhere in the RPi stack that introduced an
error to the NTP frequency offset measurement. The frequency error I measured externally
was different than that reported by NTP. If anyone in the audience understands the NTP PLL
loop and how it interacts with the operating system, I'd love to talk with them!

- How the NTP adjust calibration idea come up? (Some HAM guys still doesn't believe
it could possible due to internet jitter :)

9
JP
I was originally going to use NTP to check the time periodically and calculate the frequency
offset on my own, effectively creating my own PLL. While digging into NTP, I found that NTP
already returns its calibration coefficient and voila! All I have to do is read this value.

Despite jitter, NTP can achieve time sync down to the ms level or so. This is hundreds of
times better than what is needed to time the start of the WSPR transmissions. If all you need
is to calibrate a frequency offset, NTP can (and does) do very very well. WCDMA (3G)
basestations need frequency accuracy to 0.050 PPM and this is possible via NTP if you do
enough averaging. NTP cannot be used to time synchronize basestations since they need 1
microsecond accuracy, but it can be used to frequency synchronize them.

James Peroulas
james@peroulas.com

https://github.com/JamesP6000/WsprryPi

10

Potrebbero piacerti anche