Thomas Kolb
b2df27bb92
digipeater: avoid writing to full packet queues
2024-12-18 21:00:46 +01:00
Thomas Kolb
d77f4d4498
Multiple fixes in packet handling
...
/ build-hamnet70 (push) Successful in 33s
/ build-doc (push) Successful in 19s
/ deploy-doc (push) Has been skipped
- add and handle layer 2 packet type correctly in data packets
- don't produce garbage packets if a packet could not be decoded or was not a
data packet
- handle beacon/connection request/connection parameters handshake
- digipeater cycle timeout does not reset beacon timer anymore. This prevented
any beacon transmission.
- Reset the connection timeout when empty packets are received
2024-12-15 22:29:47 +01:00
Thomas Kolb
f85bb7f83e
Update config.h.template to fix CI builds
/ build-hamnet70 (push) Successful in 32s
/ build-doc (push) Successful in 17s
/ deploy-doc (push) Has been skipped
2024-12-12 19:56:48 +01:00
Thomas Kolb
559283d87f
connection: process beacons and send connection requests
/ build-hamnet70 (push) Failing after 17s
/ build-doc (push) Successful in 17s
/ deploy-doc (push) Has been skipped
2024-12-12 19:44:07 +01:00
Thomas Kolb
fefacc69c3
Fixed all warnings
2024-12-12 19:44:07 +01:00
Thomas Kolb
a0ccf9699a
layer2: Remove event callbacks
...
Instead, connection and digipeater now update a event code passed by reference
to the maintain() function. This was the only place where the callback was
called before.
Minor side effect: maintain must be called multiple times if multiple events
trigger at the same time.
2024-12-12 19:44:07 +01:00
Thomas Kolb
49dacffde1
digipeater: remove empty packet from current connection after burst
2024-12-12 19:44:07 +01:00
Thomas Kolb
f376bd7db3
Remove data callbacks in connection and digipeater modules
2024-12-12 19:44:07 +01:00
Thomas Kolb
f895adf877
digipeater: rename interval to cycle
...
Interval suggests a regular timing structure which is not intended in this
construct and therefore is misleading.
2024-12-12 19:44:07 +01:00
Thomas Kolb
1c8e46f54a
digipeater: improve beacon handling
2024-12-12 19:44:07 +01:00
Thomas Kolb
580e4005ed
digipeater: enqueue packets in the correct connection queue
...
So far, only IPv6 is supported.
2024-12-12 19:44:07 +01:00
Thomas Kolb
e4961bf519
WIP: handle packets from the TUN device in digipeater
...
This is only a backup commit.
2024-12-12 19:44:07 +01:00
Thomas Kolb
816d753cfb
tundev: remove IFF_NO_PI
...
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-12-12 19:44:07 +01:00
Thomas Kolb
774f5c0420
l2udptest_client: fix compilation
2024-12-12 19:44:07 +01:00
Thomas Kolb
f51b1da9d5
connection: calculate IPv6 address for peer
2024-12-12 19:44:07 +01:00
Thomas Kolb
339dc5490c
Add missing call to digipeater_end_interval()
2024-12-12 19:44:07 +01:00
Thomas Kolb
f3b6ab1a29
digipeater: add one-shot packet queue and interval handling
...
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-12-12 19:44:07 +01:00
Thomas Kolb
01edbb1db1
WIP: managing multiple connections
...
Working towards handling multiple connections. A lot is still missing.
2024-12-12 19:44:07 +01:00
Thomas Kolb
6e303e8aed
WIP: digipeater module managing multiple connections
...
Backup commit. This is a basic setup with lots of TODOs and errors. Will not
compile yet.
2024-12-12 19:44:07 +01:00
Thomas Kolb
8572018c4e
l2/connection: refactoring
...
- 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-12-12 19:44:07 +01:00
Thomas Kolb
16f7ae5242
l2/packet_structs: add function to encode a complete packet
2024-12-12 19:44:07 +01:00
Thomas Kolb
97a23701d0
Handle retransmits inside the connection module
2024-12-12 19:44:07 +01:00
Thomas Kolb
ec3244a61f
Add a module to manage a list of connections
2024-12-12 19:44:07 +01:00
Thomas Kolb
a0623668a7
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-12-12 19:44:07 +01:00
Thomas Kolb
ec9e893c73
l2udptest: replace by two programs: client and digipeater
...
Both are identical so far, this is just an infrastructure commit.
2024-12-12 19:44:07 +01:00
Thomas Kolb
227837623c
Remove empty packet from queue after burst was transmitted
2024-12-12 19:44:07 +01:00
Thomas Kolb
02a2afbc5b
connection: do not send ACKs for empty packets
2024-12-12 19:44:07 +01:00
Thomas Kolb
307fdc657d
connection: handle ACKs from empty packets correctly
2024-12-12 19:44:07 +01:00
Thomas Kolb
547a39508b
Handle received packets
2024-12-12 19:44:07 +01:00
Thomas Kolb
be607acbc2
connection: use correct addresses for empty packets
2024-12-12 19:44:07 +01:00
Thomas Kolb
729d61feb7
l2udp: Use the new layer2 connection module
2024-12-12 19:44:07 +01:00
Thomas Kolb
3189aac2ab
Pass received packets to layer 2 processing
2024-12-12 19:44:07 +01:00
Thomas Kolb
3c7caeda1b
Basic infrastructure for layer2-over-udp test
2024-12-12 19:44:07 +01:00
Thomas Kolb
778ac7f815
doc: document connectionless frame type
/ build-hamnet70 (push) Successful in 29s
/ build-doc (push) Successful in 27s
/ deploy-doc (push) Has been skipped
2024-10-25 20:36:34 +02:00
Thomas Kolb
5848d78272
doc: document data frames
/ build-hamnet70 (push) Successful in 28s
/ build-doc (push) Successful in 18s
/ deploy-doc (push) Successful in 11s
2024-10-25 20:12:01 +02:00
Thomas Kolb
0b48995cec
workflows: use latest version of asciidoctor container
/ build-hamnet70 (push) Successful in 29s
/ build-doc (push) Successful in 17s
/ deploy-doc (push) Successful in 12s
2024-10-24 21:20:12 +02:00
Thomas Kolb
0309c042e4
doc: describe connection reset and disconnect packets
/ build-hamnet70 (push) Successful in 29s
/ build-doc (push) Successful in 23s
/ deploy-doc (push) Has been skipped
2024-10-24 21:14:30 +02:00
Thomas Kolb
159c3f1518
ci/docker: add graphviz to documentation build container
/ 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
/ 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
...
/ 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
...
/ 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)
/ 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
...
/ 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
/ 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