Red Pitaya Monitoring Station

This is the catch-all forum for anything related to radio life!!
Daniel Wee
Site Admin
Posts: 2409
Joined: Wed 25 Feb 25 2009 8:00 pm

Re: Red Pitaya Monitoring Station

Post by Daniel Wee »

Daniel Wee
Site Admin
Posts: 2409
Joined: Wed 25 Feb 25 2009 8:00 pm

Re: Red Pitaya monitoring station

Post by Daniel Wee »

The FT8 decoder basically runs on cron with a few defined functions - decoding, uploading, and so on.

You can add python3 by way of:-

Code: Select all

apk add python3
apk add python3-setuptools
apk add py3-pip
Additionally, the STEMlabs 125-14 differs from the 122.88-16 in that it has a high impedance input, thus requiring the impedance transformer, whereas the 122.88-16 has that transformer built in and the input is already at 50ohms. For the former, you need to set the jumpers to the middle position (2-5).
Attachments
RedPitayaBypassJumper.jpg
RedPitayaBypassJumper.jpg (131.2 KiB) Viewed 624 times
Daniel Wee
Site Admin
Posts: 2409
Joined: Wed 25 Feb 25 2009 8:00 pm

Re: Red Pitaya monitoring station

Post by Daniel Wee »

The 125-14 gets quite hot while running (122.88-16 supposedly gets even hotter). In order to monitor the temperature, the following script can be used:-

Code: Select all

#!/bin/sh
#
# from www.kkn.net/~n6tv/xadc.sh
# updated by Michael Hirsch, Ph.D.
#
# works in Ash (Red Pitaya ecosystem 0.95) and Bash (ecosystem 0.97)

# path to IIO device
XADC_PATH=/sys/bus/iio/devices/iio:device0

# Note: used "cat" to work in Ash instead of the typically recommended Bash "<".

OFF=$(cat $XADC_PATH/in_temp0_offset)
RAW=$(cat $XADC_PATH/in_temp0_raw)
SCL=$(cat $XADC_PATH/in_temp0_scale)

FORMULA="(($OFF+$RAW)*$SCL)/1000.0"
VAL=$(echo "scale=2;${FORMULA}" | bc)
echo "in_temp0 = ${VAL} °C"
I created a directory in ~/apps called tools and made this into temp.sh

In order to automatically run this script at ssh login, you edit or create a file /etc/ssh/sshrc containing:-

Code: Select all

#!/bin/bash
./apps/tools/temp.sh
Daniel Wee
Site Admin
Posts: 2409
Joined: Wed 25 Feb 25 2009 8:00 pm

Re: Red Pitaya monitoring station

Post by Daniel Wee »

In order to make changes that persist, you will need to enable writes to the mounted partition using:-

Code: Select all

rw
and make it read-only afterwards with

Code: Select all

ro
To commit other changes, use:-

Code: Select all

lbu commit -d
Daniel Wee
Site Admin
Posts: 2409
Joined: Wed 25 Feb 25 2009 8:00 pm

Re: Red Pitaya Monitoring Station

Post by Daniel Wee »

Daniel Wee
Site Admin
Posts: 2409
Joined: Wed 25 Feb 25 2009 8:00 pm

Re: Red Pitaya Monitoring Station

Post by Daniel Wee »

The decode process dumps the output to the /dev/shm directory. Temporary files also show up there and are subsequently deleted. It is possible to scan this directory for new receives directly.

The file of interest is ~/apps/sdr_transceiver_ft8/upload-ft8.sh which gets run under the control of ~/apps/sdr_transceiver_ft8/ft8.cron

Code: Select all

* * * * * cd /dev/shm && /media/mmcblk0p1/apps/sdr_transceiver_ft8/decode-ft8.sh >> decode-ft8.log 2>&1 &
*/6 * * * * cd /dev/shm && /media/mmcblk0p1/apps/sdr_transceiver_ft8/upload-ft8.sh >> upload-ft8.log 2>&1 &
So if we want to process the data, we need to insert a command into upload-ft8.sh at the point before the REPORT file is deleted.
Daniel Wee
Site Admin
Posts: 2409
Joined: Wed 25 Feb 25 2009 8:00 pm

Re: Red Pitaya Monitoring Station

Post by Daniel Wee »

To enable Wi-Fi for multiple SSIDs, you will need to add multiple entries into /etc/wpa_supplicant/wpa_supplicant.conf using:-

Code: Select all

wpa_passphrase SSID PASSOWRD >> /etc/wpa_supplicant/wpa_supplicant.conf
This will append the entries which then need to be committed using

Code: Select all

lbu commit -d
Additionall, you need to edit the /etc/network/interfaces to be:-

Code: Select all

auto lo
iface lo inet loopback

auto eth0
iface eth0 inet dhcp
        hostname ft8mon

allow-hotplug wlan0
iface wlan0 inet dhcp
	hostname ft8mon
wpa-roam /etc/wpa_supplicant/wpa_supplicant.conf
Note that Wi-Fi association might not be immediate at boot so give it a little time to work things out.
Daniel Wee
Site Admin
Posts: 2409
Joined: Wed 25 Feb 25 2009 8:00 pm

Re: Red Pitaya Monitoring Station

Post by Daniel Wee »

To select the bands - 7 at a time for the StemLABS 125-14 board - edit the write-c2-files.cfg

Code: Select all

// frequency correction, from -100.0 ppm to +100.0 ppm
corr = 0.0;

// comma separated list of bands
// trailing commas are not allowed
bands = (
//  { freq  =  1.841500; chan = 1; },
  { freq  =  3.574500; chan = 1; },
//  { freq  =  5.358500; chan = 1; },
  { freq  =  7.075500; chan = 1; },
  { freq  = 10.137500; chan = 1; },
  { freq  = 14.075500; chan = 1; },
  { freq  = 18.101500; chan = 1; },
  { freq  = 21.075500; chan = 1; },
  { freq  = 24.916500; chan = 1; },
  { freq  = 28.075500; chan = 1; }
//  { freq  = 50.314500; chan = 1; }
);
Daniel Wee
Site Admin
Posts: 2409
Joined: Wed 25 Feb 25 2009 8:00 pm

Re: Red Pitaya Monitoring Station

Post by Daniel Wee »

To change the hostname, you need to edit the script that sets it:-

/etc/conf.d/hostname

You need to perform and rw before and ro afterwards, as well as an lbu commit -d

I simply added:-

Code: Select all

echo ft8mon > /etc/hostname
after commenting out the original line
Daniel Wee
Site Admin
Posts: 2409
Joined: Wed 25 Feb 25 2009 8:00 pm

Re: Red Pitaya Monitoring Station

Post by Daniel Wee »

To use the RP with Wi-Fi, you need to set it to client mode as it goes into host mode by default. To do this, you run:-

Code: Select all

/root/wifi/client.sh
You may want to run lbu commit -d after this just to be sure it sticks though I'm not absolutely sure it is needed.
Post Reply