Skip to main content

Table of Contents:

oresat-dxwifi-software

Software for OreSat's DxWiFi board. Part of OreSat Live mission, a real-time video broadcast from space.

Install prerequisites on compatible system

At the time of writing, a compatible system is the BBB3, using the oresat-dev-2023-07-30-2gb.img.zst image, running the Debian GNU/Linux 11 (bullseye) distro on armhf architecture.

To install prerequisites needed on the BBB, run the following:

sudo apt -y update && \
sudo apt -y upgrade && \
sudo apt -y install build-essential cmake ffmpeg firmware-ath9k-htc git \
                    libgpiod-dev libpcap-dev libv4l-dev pybind11-dev \
                    python3 python3-pip tcpdump usbutils v4l-utils

Note: This step takes close to 11 minutes on the BBB3 with the oresat-dev-2023-07-30-2gb.img.zst image.

Add a configuration file to ensure the ath9k_htc driver is used with the mon0 link by switching to root:

sudo -s

and running the following:

cat <<EOF > /etc/systemd/network/50-ath9k-htc.link
[Match]
Driver=ath9k_htc
[Link]
Name=mon0
EOF

Reboot to ensure the changes are fully applied:

$ reboot now

Set up source directories

Run the following command on the BBB oresat-dev host to clone the repo and set up output directories:

mkdir /home/debian/src && \
cd /home/debian/src && \
git clone https://github.com/oresat/oresat-dxwifi-software.git && \
sudo mkdir -p /oresat-live-output/{frames,videos}

Build and install libdxwifi

Clone Repository

cd /home/debian/src && \
git clone https://github.com/oresat/oresat-libdxwifi.git

Build libdxwifi from instructions

Install the debian packages created from the libdxwifi instructions

sudo dpkg -i *.deb

Build oresat_configs

Clone Repository

cd /home/debian/src && \
git clone https://github.com/oresat/oresat-configs

Install requirements

cd oresat-configs && \
sudo pip install -r requirements.txt
sudo ./build_and_install.sh

Build and install Oresat DxWiFi Software (OLAF app) Package

Install requirements

cd src/oresat-dxwifi-software
sudo pip install -r requirements.txt

From the source directory, you can build and install the OLAF app package as follows:

./build-deb.sh \
    && sudo apt -y install ./oresat-dxwifi-software-server-*.deb \
    && sudo reboot now

Note: The reboot above is not strictly necessary but is recommended to confirm everything works correctly on startup.

Example end-to-end usage

Once you have both the BBB and the RPI set up (satellite and HGS, respectively), you can test tx and rx and see the frame output in the browser.

To set up the BBB:

To set up the RPI:

If you have set up the BBB correctly, you should be able to confirm the OLAF app services are running properly as follows:

$ sudo systemctl status oresat-mon-iface.service \
                        oresat-vcan-iface.service \
                        oresat-dxwifi-software-server.service
● oresat-mon-iface.service - Oresat MON0 IFACE Service
  Loaded: loaded (/lib/systemd/system/oresat-mon-iface.service; enabled; vendor preset: enabled)
  Active: inactive (dead) since Wed 2023-11-22 23:05:19 UTC; 24s ago
  Process: 705 ExecStart=ifconfig mon0 up (code=exited, status=0/SUCCESS)
   Main PID: 705 (code=exited, status=0/SUCCESS)
      CPU: 15ms

Nov 22 23:05:19 oresat-dev systemd[1]: Started Oresat MON0 IFACE Service.
Nov 22 23:05:19 oresat-dev systemd[1]: oresat-mon-iface.service: Succeeded.

● oresat-vcan-iface.service - Oresat VCAN0 IFACE Service
  Loaded: loaded (/lib/systemd/system/oresat-vcan-iface.service; enabled; vendor preset: enabled)
  Active: inactive (dead) since Wed 2023-11-22 23:05:19 UTC; 24s ago
  Process: 706 ExecStart=/usr/local/sbin/start-vcan (code=exited, status=0/SUCCESS)
   Main PID: 706 (code=exited, status=0/SUCCESS)
      CPU: 34ms

Nov 22 23:05:19 oresat-dev systemd[1]: Started Oresat VCAN0 IFACE Service.
Nov 22 23:05:19 oresat-dev systemd[1]: oresat-vcan-iface.service: Succeeded.

● oresat-dxwifi-software-server.service - Oresat DXWIFI Software Server
  Loaded: loaded (/lib/systemd/system/oresat-dxwifi-software-server.service; enabled; vendor preset: enabled)
  Active: active (running) since Wed 2023-11-22 23:05:19 UTC; 25s ago
   Main PID: 707 (python3)
    Tasks: 10 (limit: 1026)
  Memory: 19.9M
      CPU: 13.046s
  CGroup: /system.slice/oresat-dxwifi-software-server.service
          └─707 python3 -m oresat_dxwifi

Nov 22 23:05:40 oresat-dev python3[707]: 2023-11-22 23:05:40.520 | ERROR  | oresat_dxwifi.resources.temperature:find_temperature:83 - Unable to reach ADC

The following log messages are expected on the BBB. The OreSat Live board is connected to a temperature sensor on the satellite, but the BBB has no such sensor.

2023-11-22 02:01:21.696 | ERROR | oresat_dxwifi.resources.temperature:find_temperature:83 - Unable to reach ADC
2023-11-22 02:01:21.700 | ERROR | oresat_dxwifi.resources.temperature:_on_read_temperature:54 - Temperature outside int8 range or unable to reach ADC.

The following command follows the log with temperature messages excluded.

$ tail -f /tmp/olaf.log | grep -vi temperature

Notes on debugging

When the DxWiFi OLAF app is running in a subprocess in the background, some of the output doesn't go to the olaf.log file. To have the full debug output sent to the terminal, you can run the app in the foreground as follows:

$ sudo systemctl stop oresat-dxwifi-software-server.service;
$ sudo su -l
# cd /usr/local/sbin/
# python3 -m oresat_dxwifi | grep -vi temperature
# exit

When the app is running (either via systemd or in the foreground), it listens on 127.0.0.1:8000, and Nginx runs a reverse proxy to this port. You can administer the app in a web browser by visiting http://<bbb-address>/oresat-live (replacing <bbb-address> with the IP address or hostname of the BBB).

Olaf /oresat-live Endpoint in The Browser

Steps for transmitting

Press Read State. The page should now say "Standby." If it says "Error," there is a problem to be debugged.

Press FILMING. The logs should say something like this:

2023-11-22 02:03:21.332 | INFO  | oresat_dxwifi.services.oresat_live:on_state_write:119 - Changing state: STANDBY -> FILMING
...
2023-11-22 01:50:29.275 | INFO  | oresat_dxwifi.camera.camera:create_videos:162 - Finished, videos available at: /oresat-live-output/videos

Press TRANSMISSION. The logs should say something like this:

2023-11-22 02:05:25.199 | INFO  | oresat_dxwifi.services.oresat_live:on_state_write:119 - Changing state: STANDBY -> TRANSMISSION

After you press TRANSMISSION, go to the browser connected to the HGS app (the OreSat Live Server), and you should see the transmission coming in. It should look something like this:

Successful Transmission in HGS Browser

Metadata

Release files for oresat-dxwifi 0.3.8

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for oresat-dxwifi 0.3.8
File Size Uploaded
oresat_dxwifi-0.3.8.tar.gz 1.4 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for oresat-dxwifi 0.3.8
File Interpreter ABI Platform
oresat_dxwifi-0.3.8-py3-none-any.whl Python 3 none any Details

Total release size: 2.6 MB

Release files / oresat_dxwifi-0.3.8.tar.gz

Download URL oresat_dxwifi-0.3.8.tar.gz
Size 1.4 MB
Tags Source
SHA-256 checksum
How to use checksums
203c16af6d7c71e3551d12261eaf6a1db79ae209c2ecf70ceacf7662b24091f0
BLAKE2b-256 checksum
How to use checksums
65e77eab238cbab61b2ec2cc27e222b0fca92d4af4b9c86b6fce14c1c733f26d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.0 CPython/3.9.19

Release files / oresat_dxwifi-0.3.8-py3-none-any.whl

Download URL oresat_dxwifi-0.3.8-py3-none-any.whl
Size 1.2 MB
Tags Python 3
SHA-256 checksum
How to use checksums
4ae8d2ceef956f3045269efae20e82a1d238a9fb3653b1f5b97e023a4dc1cf64
BLAKE2b-256 checksum
How to use checksums
940f2c5a5d0b0609ed34e59ce9d854866b2d14b49b848fff1631c81dfe973651
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.0 CPython/3.9.19

Release history Release notifications | RSS feed

This release

0.3.8 This release

2 release files

0.3.7

2 release files

0.3.6

2 release files

0.3.5

2 release files

0.3.4

2 release files

0.3.3

2 release files

0.3.2

2 release files

0.3.1

2 release files

0.3.0

2 release files

0.2.0

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page