From 899152a530ac9aaf2d65f89d9c20c6b1e5e12861 Mon Sep 17 00:00:00 2001 From: Thomas Kolb Date: Sun, 25 Aug 2024 20:26:41 +0200 Subject: [PATCH] Remove config.h from Git; must be adapted by the user A template for the config file is provided in src/config.h.template. It must be copied to src/config.h and adapted for force users to set their own station call sign. --- impl/README.md | 22 ++++++++++++++++++++++ impl/src/{config.h => config.h.template} | 4 ++++ 2 files changed, 26 insertions(+) create mode 100644 impl/README.md rename impl/src/{config.h => config.h.template} (95%) diff --git a/impl/README.md b/impl/README.md new file mode 100644 index 0000000..c230fbe --- /dev/null +++ b/impl/README.md @@ -0,0 +1,22 @@ +# Hamnet70 Implementation + +This directory contains an implementation of the Hamnet70 protocol. + +Before you can compile and use this code, some additional steps are necessary: + +1. Copy `src/config.h.template` to `src/config.h` and set the following variables: + - `MY_CALL`: the station call sign (i.e. your amateur radio call sign). + This will be encoded into the address fields of outgoing packets. +2. Install dependencies: + - _libliquid_ compiled with _libfec_ support + - _libfec_ + - _fftw3_ + - _libhackrf_ + +After everything is prepared, compile the code using `./make.sh`. +Parameters to this script are forwarded to `make` so you can speed things up a little with `./make.sh -j4` (on a CPU with 4 threads). + +When compiled, you have two options for running Hamnet70: + +1. In digipeater (base station) mode: `build/hamnet70 -c`. This will broadcast beacons and wait for clients to connect. +2. In client mode: `build/hamnet70`. This will wait for a beacon to arrive and connect to it. diff --git a/impl/src/config.h b/impl/src/config.h.template similarity index 95% rename from impl/src/config.h rename to impl/src/config.h.template index 4abb898..b9ffc23 100644 --- a/impl/src/config.h +++ b/impl/src/config.h.template @@ -9,6 +9,10 @@ #include +/*** LAYER 2 CONFIG ***/ + +#define MY_CALL undefined // define MY_CALL to your call sign as a C string, e.g. "DL5TKL" + /*** TIMING CONFIG ***/ #define TX_SWITCH_BACKOFF_PREAMBLE_MS 42 // only relevant if packet cannot be decoded (maximum packet duration)