From 092c0eaa100709bb792a6087ec6ffcf659d29c22 Mon Sep 17 00:00:00 2001 From: Federico Lolli <federico.lolli@skywarder.eu> Date: Thu, 14 Mar 2024 02:20:49 +0100 Subject: [PATCH] Updated README --- README.md | 56 +++++++++++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 50 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index c63421f..dbe01c9 100644 --- a/README.md +++ b/README.md @@ -13,32 +13,70 @@ In brief, ARPIST is a tool for simulating the transmission of telemetry data fro ### Prerequisites - **Rust**: Rust need to be installed on the machine where you want to build and run ARPIST. You can find the installation instructions [here](https://www.rust-lang.org/tools/install). +- **C++**: The boardcore library, which is used by ARPIST, is written in C++. Consult the [Boardcore repo](https://git.skywarder.eu/avn/swd/skyward-boardcore) for the installation instructions. ### Installation -If you want to install ARPIST on your machine, you can do it with the following command: +#### Host-side + +If you want to install ARPIST (host tool) on your machine, you can do it with the following command: ```bash cargo install --git ssh://git@git.skywarder.eu/federico.lolli/arpist.git ``` +#### Board-side + +If you want to install ARPIST (board tool) on your board, you can do it with the following command: + +```bash +git clone --recurse-submodules ssh://git@git.skywarder.eu/federico.lolli/arpist.git +cd arpist/on-device +./sbs -f arpist-device-sender +``` + +The above procedure should flash an entrypoint capable of decoding any mavlink messages coming from serial and sending it to the radio. + ### Developing -If you want to develop ARPIST, you can clone the repository and build it with the following commands: +Both the host-side and the board-side scripts can be found in the justfile file for the sake of simplicity and ease of development. + +First clone the repository: ```bash -git clone git@git.skywarder.eu:federico.lolli/arpist.git +git clone --recurse-submodules git@git.skywarder.eu:federico.lolli/arpist.git cd arpist +``` + +#### Host-side + +If you want to develop the host side of ARPIST, you can move to `on-host` directory and build it with the following command: + +```bash cargo build --release ``` -The executable will be located in the `target/release` folder. +The executable will be located in the `target/release` relative subfolder. + +#### Board-side + +If you want to develop the board side of ARPIST, you can move to `on-device` directory and build it with the following command: + +```bash +./sbs -f arpist-device-sender +``` + +To flash the sender, if you want to test on a receiver board, you can flash a dummy receiver with the following command: + +```bash +./sbs -f arpist-device-receiver +``` ## Usage -ARPIST needs a board with a radio module connected to a serial port to work. The board must have a specific entrypoint flashed, which can be found on the [Boardcore repo](https://git.skywarder.eu/avn/swd/skyward-boardcore), [here](https://git.skywarder.eu/avn/swd/skyward-boardcore/-/blob/nokia-tm-dev/src/entrypoints/sx1278-mav-raw.cpp) precisely. +ARPIST needs a board with a radio module connected to a serial port to work. The board must have a specific entrypoint flashed _(please refer to the installation paragraph above for this)_. -Once the board has the correct entrypoint flashed, is connected to the serial port and the serial port, you can run ARPIST with the following command: +Once the board has the correct entrypoint flashed and is connected to the serial port, you can run ARPIST (host-side) with the following command (here we assume that the executable is in scope, if not, you can use the full path to the executable): ```bash arpist --port <serial_port> <telemetry_file> @@ -46,4 +84,10 @@ arpist --port <serial_port> <telemetry_file> Where `<serial_port>` is the serial port where the board is connected and `<telemetry_file>` is the file containing the telemetry data to send to the board. +To have a more detailed debug output, you can pass the environment variable `RUST_LOG` with the value `debug`: + +```bash +RUST_LOG=debug arpist --port <serial_port> <telemetry_file> +``` + **NOTE**: if a single STM32 compatible board is connected to the serial port, ARPIST will automatically detect it and use it, so you can omit the `--port <serial_port>` option. -- GitLab