Skip to content

Running the Ground Station

Matteo Golin edited this page Feb 6, 2024 · 2 revisions

Starting the Server

NOTE: This document shows the command for running Python files as py, which is the default for Windows. Other operating systems may use python, python3, etc. Please use the appropriate command for your machine.

You can check what options are available for running the ground station server by running the main file with the help flag:

$ py main.py -h
usage: main.py [-h] [-l {debug,info,warning,error,critical}] [-o O]

Select some starting parameters for the telemetry server.

options:
  -h, --help            show this help message and exit
  -l {debug,info,warning,error,critical}
                        Selects the logging level for messages in the console.
  -o O                  Output file for logging messages. Logs to console by default.

The server will display a banner and some information about what port the websocket is running on.

Seeing Results

If not working with the ground-station-ui directly, you can instead run the static HTML page to interact with the backend server.

You can find the static HTML page here.

Once you open the static webpage, there is a small input field that should allow you to send commands to the backend server. The server should also print to the console that you (the client) have connected.

You now have two options:

Running with a Mission File

To run a mission file for testing, you can use the following command: serial rn2483_radio connect test.

This will run a mission file. You will see the server display messages in the console, and you will also see numerical data changing on the static webpage.

Running with the Radio Board

To run the server with the radio board receiving live payloads, you can use the following command: serial rn2483_radio connect <port>. You will need to substitute <port> with the port name that the radio board is connected to. On Windows that may look like COM3, or on Linux /dev/ttyUSB0.

If you ran the server after plugging in the radio board, you should see the port listed under the available_ports key of the displayed JSON text on the static page.

After running that command, you should see both the console and the static page update with the live radio payload data.