PacSat - alanbjohnston/CubeSatSim GitHub Wiki

PacSat Mode

There is a new experimental CubeSatSim mode called PacSat. PacSat is short for Packet Satellite, and is a type of amateur radio digital store-and-forward satellite that has been around for decades. Early PacSats include PacSat AO-16 launched in 1990 and AO-51 Echo launched in 2004 and MIR-Sat 1 MO-112 launched in 2021. The most recent operational PacSat was FalconSAT-3 or FO-62 launched in 2007 and re-entered in 2023. AMSAT is currently building a PacSat which will hopefully launch in the future. In the meantime, you can try out this mode using the v2 CubeSatSim hardware and an experimental code branch.

The CubeSat PacSat mode is known as the PacSatSim, and uses 1200 bps AFSK transmissions. A PacSat system has two components: a satellite and a ground station. The satellite functions as a file store and forward file server, like an old fashioned Bulletin Board Service (BBS). Using the ground station, users can get a directory of files, and download and upload files to the satellite. In this way, contacts can be made across the globe using this store-and-forward approach of exchanging messages.

There are other digital satellites in orbit right now known as Digipeaters or Digital Packet Repeaters. Here's is a list: https://www.amsat.org/live-digipeater-satellites/ A PacSat is different than a Digipeater since a Digipeater immediately repeats the packet and does not store it or keep a directory of packets received. The CubeSatSim PacSat will also act as a Digipeater.

Here is a video of Chris Thompson VE2TCp/G0KLA demoing the PacSat Ground Station at the 2023 AMSAT Space Symposium.

CubeSatSim PacSat

A CubeSatSim can act as the PacSat satellite or the PacSat Ground Station. The PacSat satellite transmits telemetry APRS packets as well as allocating a download queue known as a PacSat Broadcast (PB) to users. A typical exchange begins with a ground station requesting a directory fill (DIR) from the PacSat which is a list of files that are available. With this list downloaded, the ground station can request a specific file fill (FILE), or upload new files. After a file or message has been downloaded, the user can reply or comment and upload that message to the PacSat.

The PacSat code used by the CubeSatSim is developed by Chris Thompson VE2TCP/G0KLA of FoxTelem fame. His PacSat Ground Station looks similar to FoxTelem, and is open source Java code which can run on Linux, Windows, or Mac computers. Unlike FoxTelem, which is just a receiver of telemetry, the PacSat Ground Station receives and transmits. If run on a CubeSatSim or a CubeSatSim Lite, it utilizes the FM transceiver board, or, in low power Safe mode, the rpitx software transmitter. It can also work with a FM radio transceiver using audio in, audio out, and Push To Talk (PTT) or VOX for transmit control. The easiest way to do this is to have two CubeSatSims, or a CubeSatSim and a Lite, or two Lites.

A CubeSatSim will transmit on 434.9 MHz and receive on 435 MHz by default. But to have a pair of them act as a PacSat and a PacSat Ground Station, they have to have their transmit and receive frequencies opposite of each other. Typically, I will leave the PacSat transmitting at 434.9 MHz but change the PacSat Ground Station to transmit at 435 MHz. The CubeSatSim PacSat operates in half-duplex, so in theory they could receive and transmit on the same frequency, but having them on different frequencies makes it much easier to see the interaction between them.

Chris Thompson's PacSat Page has lots of information about PacSat and the AX.25 protocols used to implement it https://www.g0kla.com/pacsat/

This document details the PacSat protocol and the FTL0 protocol operation.

Running the PacSat

To try out the PacSat mode, you need to be running the master-b software branch https://github.com/alanbjohnston/CubeSatSim/tree/master-b

There is an experimental Raspberry Pi Bookworm Disk Image which you can use with balenaEtcher to write to your 16GB or larger micro SD card: https://cubesatsim.org/download/cubesatsim-v2.2-bookworm.iso.zip

You can also use these commands to update your software if your Pi Zero 2 is connected to the internet:

   cd
   cd CubeSatSim
   git pull
   git checkout master-b
   ./update
   CubeSatSim/config -G

You might need to run the update command more than once and reboot. There is a chance that this update might fail in which case you will need to reinstall the software from scratch, or start from a v2.2 Disk image and run the update commands.

After a reboot, you should see APRS packets transmitted at 434.9 MHz (or at a different frequency if you modified it using the CubeSatSim/config -F command) about every 10 seconds or so.

Here's what they will look like in Direwolf:

If you didn't set your callsign during installation or using the CubeSatSim/config -c command, the callsign will just be AMSAT. Direwolf tries to interpret them as APRS packets, so it gives errors and unknown messages, but that's fine.

PacSat Packets

You will see three types of packets transmitted by the CubeSatSim PacSat.

  • PBLIST packets list the status of the PacSat Broadcast or PB. The PB indicates who is currently able to request files to be broadcast or downloaded. The default is PB Empty which means anyone can request the PB.

  • BBSTAT packets indicate the status of the PacSat Broadcast. The default is Open which indicates that uplink is available. The CubeSatSim has only one uplink frequency, so it will only ever say Open A. Real PacSats can have multiple uplinks so you might see that A, B, and C are open.

  • TLM1 packets are telemetry packets and contain a binary data block with the same information as is displayed in FoxTelem FSK or BPSK.

PBLIST and BBSTAT packets are sent about every 30 seconds, while TLM1 packets are sent every 10 seconds.

To see other packets, you will need a PacSat Ground Station capable of transmitting request packets.

Reset the PacSat

You can reset the PacSat configuration by typing this command:

   CubeSatSim/config -k

The directory will then just have two items in it. You will likely have to also reset the PacSat Ground Station (see below).

PacSat Ground Station on the CubeSatSim

There are two options for the PacSat Ground Station. One is to use a CubeSatSim or CubeSatSim Lite. You will need to run the Ground Station in the Desktop GUI, so you will either need to plug an HDMI monitor into your Pi Zero 2, or use VNC over your WiFi network to access the GUI.

The other option is to plug a CubeSatSim Lite into a Raspberry Pi 4 and run the latest FIABv4 (Fox-in-a-Box version 4) Ground Station image which has the PacSat Ground Station installed. Note that this is a receive-only ground station that uses the RTL-SDR to receive packets.

The PacSat Ground Station software is included in the master-b branch. However, it must be run in the Desktop GUI, not the command line. If you have used the downloaded disk image, your Pi Zero 2 will already boot to the Desktop GUI. If it does not, you can configure your Pi Zero 2 to boot to the Desktop GUI by running raspi-config:

   sudo raspi-config

Use the up/down arrows and the return key to select the System Options:

Then select Boot / Auto Login:

Then select either Desktop or Desktop Autologin:

After exiting, select Yes to reboot and you will have the Desktop GUI running. You can access it using the HDMI connector, mouse, and keyboard or remotely logging in from your PC or Mac using VNC (VNC Viewer by RealVNC is a free download).

In the Desktop, open a Terminal window by double clicking on the black rectangle icon at the top left of the screen:

Now type this command in the terminal window:

   CubeSatSim/config -F

This command allows you to change the transmit and receive frequencies. The Ground Station transmit and receive frequencies must be the opposite of the Satellite, otherwise, they won't receive what the other transmits. If your PacSat Satellite is using the default transmit 434.9 MHz and receive 435 MHz, then for the PacSat Ground Station, enter 435 for transmit and 434.9 for receive.

Now type this command in the terminal window to switch to the PacSat Ground Station mode:

   CubeSatSim/config -I 

After you reboot, double click on the PacSat icon on the Desktop:

Alternatively, you can type this command into a Terminal window:

   CubeSatSim/groundstation/pacsat-run.sh

Select the first option to Run PacSat Ground Station in the popup menu:

If you are running it for the first time, you may get this prompt to make a new directory file in a "New Directory" popup window. Select OK to proceed.

When the ground station runs, you will see this window:

Direwolf will be running in another terminal window - don't close it! You can look at it to see the Direwolf log of packets sent and received.

Setting Callsign and Latitude and Longitude

You can go under File menu then Settings and set your callsign. You will also have to put in latitude and longitude or a grid square to save your changes when you select Save.

PacSat Ground Station with Simulated PacSat Satellite

This is the simplest way to experience PacSat operation. You only need one CubeSatSim or CubeSatSim Lite. From the Desktop, double click on the PacSat icon on the Desktop, but select the Run a Locally Simulated PacSat option:

You should see this after about 30 seconds:

One open terminal window will show the Direwolf log of the locally simulated PacSat packets. Another open terminal window will show the Direwolf log of the PacSat Ground Station packets. The packets are not sent over the radio, but instead looped back as audio.

The telemetry packet count at the bottom (Telem) should increase every 10 seconds or so. If you select the TLMP1 tab, you will see the telemetry data:

If you click on the tiny down arrow near the list of data just above the RESET column, the list will go away and the whole window will display the latest telemetry data:

If you are using a CubeSatSim Lite, the telemetry data will be simulated (under Computer Software, it will say Simulated Telemetry ON. If you are using a CubeSatSim, the telemetry data will be real (under Computer Software, it will say Simulated Telemetry OFF).

Just like in FoxTelem, you can double click on a telemetry value and generate a graph. Once you have a graph, you can use the + icon to add a second field to see the two values graphed together.

If you select the Directory tab, you can download any of the files listed in the Directory. Select the file in the list so it is highlighted, then select the FILE button to send a file fill request. You will see DL (Download) and FILE packets, then the Status of the file will change to NEW and Holes will show 0 with download percentage at 100%.

Now you can double click on it and view the file.

You can reply to this message by clicking the Reply button and then clicking Send and the file will be uploaded. You will see a series of messages below and the file will be uploaded.

If you select the Outbox tab, the State should show as SENT. If it hasn't sent yet, it will show QUE.

The uploaded file won't show up in the Directory unless you request a directory fill using the DIR button, but then it will show up at the top of the Directory list.

PacSat Operation with two CubeSatSims

You can have a full PacSat Satellite and Ground Station interaction if you have two CubeSatSims, two CubeSatSim Lites, or a CubeSatSim and a Lite.

You will configure one as the PacSat Satellite (CubeSatSim/config -G) and the other as the PacSat Ground Station (CubeSatSim/config -I then run the PacSat Ground Station) and make sure their transmit and receive frequencies are opposite.

Then you can run the PacSat Ground Station and you should receive packets from the Satellite and you will see this:

If instead you see something like this:

where no Directory downloads, and instead of telemetry packets (TELEM FRAME) you see random characters. If you see this, it probably means that your Ground Station does not have the correct callsign for the PacSat. The Telem count at the bottom will not increase. If you try to download the Directory with the DIR button, you will see the DIR REQ packets but no answer:

If you go under the Spacecraft menu then PacSatSim you can see what callsign is configured:

In this case, the default callsign AMSAT is set, but the PacSat has been configured with my callsign KU2Y. You can configure this by exiting the PacSat Ground Station, double clicking the PacSat icon again but this time select Configure the PacSat Ground Station:

Type 1 for the menu item to Configure your PacSat Ground Station:

Then type 2 for the menu item to set the Remote PacSat Callsign.

If I enter my callsign KU2Y then run the PacSat Ground Station again, the telemetry packets will be decoded and displayed, and the Directory can be requested.

If you had previous been running the Locally Simulated PacSat Ground Station or another CubeSatSim mode, when you run the PacSat Ground Station, you might get this prompt:

Type a y then return. After the reboot you will be able to run the PacSat Ground Station.

I like to look at an SDR waterfall that shows both 434.9 and 435 MHz so you can see the packets being transmitted. For example, if the PacSat is transmitting on 434.9 MHz, you might see this when you first run the PacSat and the PacSat Ground Station:

SDR Waterfall Views

To see packets from the PacSat Ground Station, you need to make a request, such as request a Directory with the DIR button. It will look like this in the waterfall:

The one packet from the PacSat Ground Station on 435 MHz causes the PacSat to transmit the large directory packets on 434.9 MHz.

Here's what a sending a message or replying to a message on the PacSat Ground Station looks like:

Here's what requesting a download of a large file, such as a JPG image looks like:

You can try uploading a JPG image by clicking on New Msg then under Select Type choose JPG. Don't select a large JPG or it will take forever to upload! I use the smallest JPGs I can generate, around 2.3 kilobytes.

Reset the PacSat Ground Station

Sometimes, the directory on the PacSat Ground Station can get out of sync with the Directory on the PacSat. One symptom of this is that the Ground Station requests the Directory over and over again, wanting entries that don't exist. To fix this, you want to reset the PacSat Ground Station to clear the stored data. Do this by selecting Configure the PacSat Ground Station when you double click on the PacSat icon:

Then, select menu option 1 then menu option 3 to Reset the Ground Station configuration.

Note that the next time you run the PacSat Ground Station, you may get the prompt to "Overwrite Existing spacecraft config file". Select Yes to proceed.

Pacsat Radio Ground Station

If you can connect your FM radio to your computer, you can setup a Pacsat Ground Station.

Radio Setup

Tune your radio to 434.9 MHz with your CubeSatSim in PacSat mode and you should hear packets every 10 seconds or so. Adjust the squelch so that it is triggered only by the packets. Connect your radio to your computer audio microphone and headphones. If it is Baofeng or similar, you will need a K1 cable from the radio and plug it into the mic/headphone jack on your computer. If your computer doesn't have a built-in microphone (such as a Raspberry Pi), you can add a USB sound card, such as the one used in the CubeSatSim. You will need a cable to turn a TRRS plug into separate mic and speaker TRS plugs. While you can use VOX (voice activated transmit) on the radio, having proper PTT (Push To Talk) control will result in much more reliable operation. If you are configuring VOX, make sure your squelch is set to the right level and the VOX sensitivity too. Set your radio on the lowest power output setting.

If your PacSat is using the standard 434.9 MHz transmit and 435 MHz receive, your radio will need to be configured for a + 100 kHz offset for transmit. Alternatively, you can have no offset and use the CubeSatSim/config -F command on the CubeSatSim to set the transmit and receive frequencies to be the same.

Direwolf Setup

You will need to install Direwolf, version 1.8 or later on your computer. For Windows, this means gong to the GitHub Releases page https://github.com/wb2osz/direwolf/releases and downloading the zip file installer. For Mac, you can use Macports or Brew to install Direwolf. For Linux such as on the Raspberry Pi, you will download the source file and compile it.

To run Direwolf on Windows, unzip the executables to a directory, then run a Command Window in that directory. Plug in your cable to the radio and select the microphone and headphones as the default audio devices. Then you can just run Direwolf by typing direwolf in the Command Window. If your PacSat is transmitting, you should see APRS packets decoded. To transmit, configure your PTT for Direwolf or use VOX.

PacSat Ground Station Configuration

Finally, you will need to download and install the Pacsat Ground Station software version 0.46q or later. You can find the latest test development version here https://www.g0kla.com/pacsat/downloads/test/ For Windows, download the installer exe file and run it to install the ground station. Run it by running the PsatGround application. For Linux, download the zip file and extract it to a directory. In the terminal window in that directory, use the command java -jar PacSatGround.jar to run it. If you don't have Java, install openjdk for Linux.

The first time you run the PsatGround application, you will need to add the PacSatSim spacecraft. Under the Spacecraft menu, select Add, then click on the PacSatSim.properties file. You will need to exit the ground station and run it again to use the configuration. Run Direwolf before you run the ground station in another window or you will get an Error popup saying can't connect to the TNC and you will have to restart the ground station. The first time you will need to click OK to the New Directory popup message. In the File menu, select Settings then set your Callsign, Latitude and Longitude (or six character grid square). Change the TX Delay to 750 then click Save.

You will need edit the PacSatSim.properties file in the spacecraft directory to set the PacSat Callsign. Change the callsign letters for these three lines where you replace AMSAT with the callsign of your PacSat but don't change the SSID numbers. If your PacSat callsign hasn't been set, leave these values unchanged.

   digiCallsign=AMSAT-1
   broadcastCallsign=AMSAT-11
   bbsCallsign=AMSAT-12

Now run the PsatGround application again with Direwolf running and you should see packets from your PacSat. If you click on the DIR button, your radio should transmit, and the PacSat should respond with QST packets.

Your Radio Pacsat Ground Station is operational!

Digipeater Operation

In PacSat mode, the CubeSatSim will act as a Digipeater - an APRS Packet Repeater. You just need to set the Digipeater Via Path to contain WIDE1-1 and transmit the APRS packet on the receive frequency of the PacSat, 435 MHz if it hasn't been changed. Here is an example packet input decoded by Direwolf:

   W3YP-2 audio level = 14(5/5)   [NONE]   _||||||__
   [0.3] W3YP-2>APK5C1,WIDE1-1:!4000.00N/07000.00WD
   Position, was originally undefined
   N 40 00.0000, W 070 00.0000

And here is the Digipeater output on 434.9 MHz:

   Digipeater KU2Y-1 audio level = 18(6/5)   [NONE]   ||||||___
   [0.2] W3YP-2>APK5C1,KU2Y-1*:!4000.00N/07000.00WD
   Position, was originally undefined
   N 40 00.0000, W 070 00.0000

I used my Quansheng UV-5 to generate this APRS packet.