Commit graph

254 commits

Author SHA1 Message Date
Thomas Kolb aa5ffee872 digipeater: remove empty packet from current connection after burst 2024-12-03 21:37:29 +01:00
Thomas Kolb 627eed7426 Remove data callbacks in connection and digipeater modules
Some checks failed
/ build-hamnet70 (push) Failing after 31s
/ build-doc (push) Successful in 49s
/ deploy-doc (push) Has been skipped
2024-11-17 18:26:18 +01:00
Thomas Kolb e3a06685e4 digipeater: rename interval to cycle
Interval suggests a regular timing structure which is not intended in this
construct and therefore is misleading.
2024-11-17 17:05:07 +01:00
Thomas Kolb c5aa117240 digipeater: improve beacon handling 2024-11-17 17:03:20 +01:00
Thomas Kolb 8a4619bb0b digipeater: enqueue packets in the correct connection queue
Some checks failed
/ build-hamnet70 (push) Failing after 17s
/ build-doc (push) Successful in 18s
/ deploy-doc (push) Has been skipped
So far, only IPv6 is supported.
2024-11-14 22:28:59 +01:00
Thomas Kolb c1af786a70 WIP: handle packets from the TUN device in digipeater
Some checks failed
/ build-hamnet70 (push) Failing after 18s
/ build-doc (push) Successful in 17s
/ deploy-doc (push) Has been skipped
This is only a backup commit.
2024-11-10 23:13:54 +01:00
Thomas Kolb 61814584a2 tundev: remove IFF_NO_PI
Some checks failed
/ build-hamnet70 (push) Failing after 18s
/ build-doc (push) Successful in 17s
/ deploy-doc (push) Has been skipped
Without this flag the kernel adds packet information to each packet. The
interesting part of that information is the EtherType of the packet, which
simplifies handling.
2024-11-10 23:10:32 +01:00
Thomas Kolb 49fe1fff29 l2udptest_client: fix compilation
Some checks failed
/ build-hamnet70 (push) Failing after 17s
/ build-doc (push) Successful in 17s
/ deploy-doc (push) Has been skipped
2024-11-10 21:40:07 +01:00
Thomas Kolb 4862c09bdd connection: calculate IPv6 address for peer 2024-11-10 21:39:15 +01:00
Thomas Kolb e44cfb722d Add missing call to digipeater_end_interval()
Some checks failed
/ build-hamnet70 (push) Failing after 17s
/ build-doc (push) Successful in 17s
/ deploy-doc (push) Has been skipped
2024-11-10 21:01:13 +01:00
Thomas Kolb 3a8f469e8e digipeater: add one-shot packet queue and interval handling
Some checks failed
/ build-hamnet70 (push) Failing after 18s
/ build-doc (push) Successful in 17s
/ deploy-doc (push) Has been skipped
The oneshot queue is for connection management frames that are only sent once,
at the beginning of the next burst. An example is the Connection Reset packet.

Intervals define the boundary between the handling of different connections.
The interval can be either ended by a packet with TX Request set, or by a
timeout. In either case, forwarding of packets to the current connection stops
and the connection is re-scheduled to a later point in time.
2024-11-10 20:18:10 +01:00
Thomas Kolb 93d74be000 WIP: managing multiple connections
Some checks failed
/ build-hamnet70 (push) Failing after 18s
/ build-doc (push) Successful in 20s
/ deploy-doc (push) Has been skipped
Working towards handling multiple connections. A lot is still missing.
2024-11-10 17:02:14 +01:00
Thomas Kolb 31a627d434 WIP: digipeater module managing multiple connections
Some checks failed
/ build-hamnet70 (push) Failing after 18s
/ build-doc (push) Successful in 17s
/ deploy-doc (push) Has been skipped
Backup commit. This is a basic setup with lots of TODOs and errors. Will not
compile yet.
2024-11-03 14:40:11 +01:00
Thomas Kolb bfdb174324 l2/connection: refactoring
Some checks failed
/ build-hamnet70 (push) Failing after 18s
/ build-doc (push) Successful in 18s
/ deploy-doc (push) Has been skipped
- split handle_packet() in two functions: the first does basic checks and calls
  the second one. This allows to do the basic checks externally (in the
  multi-connection management module) without duplicating them.
- use the new layer2_encode_packet() function.
2024-11-03 14:35:01 +01:00
Thomas Kolb 0345dc589b l2/packet_structs: add function to encode a complete packet 2024-11-03 14:34:03 +01:00
Thomas Kolb 8c79185df6 Handle retransmits inside the connection module 2024-11-02 20:20:39 +01:00
Thomas Kolb c4e6028d42 Add a module to manage a list of connections 2024-11-02 18:30:25 +01:00
Thomas Kolb 03912a6185 Do all time calculations in uint64_t
This prevents loss of precision that occurs with double-precision floats if
timestamps become very large. Timestamps are already large if they contain a
UNIX time value (requires 60 bits; double has 53 bit resolution).
2024-11-02 16:17:52 +01:00
Thomas Kolb 4281ae4be7 l2udptest: replace by two programs: client and digipeater
Both are identical so far, this is just an infrastructure commit.
2024-11-02 16:07:25 +01:00
Thomas Kolb 04397c2c95 Remove empty packet from queue after burst was transmitted
Some checks failed
/ build-hamnet70 (push) Failing after 28s
/ build-doc (push) Successful in 15s
/ deploy-doc (push) Has been skipped
2024-09-22 18:46:32 +02:00
Thomas Kolb 8c3eca658c connection: do not send ACKs for empty packets
Some checks failed
/ build-hamnet70 (push) Failing after 27s
/ build-doc (push) Successful in 15s
/ deploy-doc (push) Has been skipped
2024-09-22 15:56:43 +02:00
Thomas Kolb dedad8b81f connection: handle ACKs from empty packets correctly
Some checks failed
/ build-hamnet70 (push) Failing after 29s
/ build-doc (push) Successful in 16s
/ deploy-doc (push) Has been skipped
2024-09-22 15:52:44 +02:00
Thomas Kolb f0770baf31 Handle received packets
Some checks failed
/ build-hamnet70 (push) Failing after 29s
/ build-doc (push) Successful in 16s
/ deploy-doc (push) Has been skipped
2024-09-22 15:34:50 +02:00
Thomas Kolb a07ffa265e connection: use correct addresses for empty packets
Some checks failed
/ build-hamnet70 (push) Failing after 28s
/ build-doc (push) Successful in 15s
/ deploy-doc (push) Has been skipped
2024-09-22 15:28:24 +02:00
Thomas Kolb 0a77109ab5 l2udp: Use the new layer2 connection module
Some checks failed
/ build-hamnet70 (push) Failing after 29s
/ build-doc (push) Successful in 16s
/ deploy-doc (push) Has been skipped
2024-09-22 15:24:20 +02:00
Thomas Kolb 85ec105d0f Pass received packets to layer 2 processing
All checks were successful
/ build-hamnet70 (push) Successful in 29s
/ build-doc (push) Successful in 16s
/ deploy-doc (push) Has been skipped
2024-09-22 14:45:24 +02:00
Thomas Kolb ec6dd92444 Basic infrastructure for layer2-over-udp test
All checks were successful
/ build-hamnet70 (push) Successful in 29s
/ build-doc (push) Successful in 17s
/ deploy-doc (push) Has been skipped
2024-09-22 14:32:49 +02:00
Thomas Kolb 159c3f1518 ci/docker: add graphviz to documentation build container
All checks were successful
/ build-hamnet70 (push) Successful in 28s
/ build-doc (push) Successful in 16s
/ deploy-doc (push) Has been skipped
2024-09-22 14:31:33 +02:00
Thomas Kolb 1ae421e876 doc: add state diagrams
All checks were successful
/ build-hamnet70 (push) Successful in 27s
/ build-doc (push) Successful in 16s
/ deploy-doc (push) Has been skipped
2024-09-21 00:55:25 +02:00
Thomas Kolb a455fac050 connection.h: fix comment 2024-09-20 23:38:54 +02:00
Thomas Kolb 44921bd65d Decrease the AGC bandwidth during signal acquisition
All checks were successful
/ build-hamnet70 (push) Successful in 32s
/ build-doc (push) Successful in 29s
/ deploy-doc (push) Has been skipped
This prevents rapid squelch activation/deactivation if only noise is present.
The AGC bandwidth was tuned such that it still allows preambles to be detected
reliably.
2024-09-20 23:10:49 +02:00
Thomas Kolb ccd9af6664 Delay squelch activation by 2 ms
Delaying the squelch activation by 2 ms helps to avoid dropped samples if the
signal is barely above the squelch threshold.
2024-09-20 23:08:43 +02:00
Thomas Kolb 4dc2c60c8b rx: reduce squelch threshold from 10 to 6 dB
All checks were successful
/ build-hamnet70 (push) Successful in 27s
/ build-doc (push) Successful in 19s
/ deploy-doc (push) Has been skipped
During tests it was determined that this is much more reliable. The theory is
that the first packet of a burst was frequently not detected because the
squelch opened too late if the channel was very noisy.

Unfortunately, the squelch now opens very often even if no signal is present.
This will be improved in the future.
2024-09-12 23:52:33 +02:00
Thomas Kolb 706a1eb437 freq_est: make ramp-up delta phase check more strict
This should help with occasional jumps in the estimated carrier frequency on
receivers running frequency tracking.
2024-09-12 23:49:57 +02:00
Thomas Kolb eb802629a1 layer1/rx: calculate EVM during header and data reception 2024-09-07 00:48:11 +02:00
Thomas Kolb c61a7a7cf7 doc: start documenting the Layer 2 packets (WIP)
All checks were successful
/ build-hamnet70 (push) Successful in 26s
/ build-doc (push) Successful in 15s
/ deploy-doc (push) Has been skipped
2024-08-30 23:46:47 +02:00
Simon Ruderich 3f4a50bdce doc: don't use external resources
All checks were successful
/ build-hamnet70 (push) Successful in 26s
/ build-doc (push) Successful in 15s
/ deploy-doc (push) Has been skipped
Embedding (only) parts of MathJax is a bit ugly ...
2024-08-28 13:42:33 +02:00
Thomas Kolb b46b2536e1 Add a CI workflow compiling the hamnet70 program
All checks were successful
/ build-hamnet70 (push) Successful in 25s
/ build-doc (push) Successful in 14s
/ deploy-doc (push) Has been skipped
2024-08-27 22:01:51 +02:00
Thomas Kolb 1bcc8c2fea Add Dockerfile with hamnet70 build dependencies 2024-08-27 22:01:51 +02:00
Thomas Kolb c342cf656e Move documentation docker scripts to /ci/docker 2024-08-27 21:28:09 +02:00
Thomas Kolb 03829e058b Run deployment only on main branch 2024-08-27 21:23:40 +02:00
Thomas Kolb f686635837 doc: automatic builds and deployment using Forgejo Actions
All checks were successful
/ build-doc (push) Successful in 14s
/ deploy-doc (push) Successful in 9s
Actions run in a custom Docker image built by the scripts in `doc/docker`.
There are two jobs that run in sequence:

- `build-doc`: builds the documentation from the AsciiDoc sources.
- `deploy-doc`: Uploads the generated files to http://0fm.de
2024-08-27 21:10:30 +02:00
Thomas Kolb 10f634d144 doc: translate message sequence diagrams to mscgen
Mermaid is more beautiful, but the tool stack is really annoying. A Chrome
browser should not be necessary to generate some SVGs.
2024-08-27 18:07:12 +02:00
Thomas Kolb 79c340c20d connection: add state checks 2024-08-25 23:27:22 +02:00
Thomas Kolb fc9e5c5229 Combine layer2_rx and layer2_tx in a new connection module
The new module is not used yet, but this is a preparation for the future
multi-client networking support.
2024-08-25 22:26:56 +02:00
Thomas Kolb 899152a530 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.
2024-08-25 20:26:41 +02:00
Thomas Kolb 303bfaec4f doc: enable stem processing for formulas 2024-08-25 01:14:38 +02:00
Thomas Kolb 76f9f37b5d doc/Makefile: add clean target 2024-08-25 01:14:28 +02:00
Thomas Kolb 9d86bc3c97 doc: write generated files to separate directory 2024-08-25 00:52:51 +02:00
Thomas Kolb c52d0766d7 Remove obsolete compile_flags.txt 2024-08-23 19:52:24 +02:00