Commit graph

708 commits

Author SHA1 Message Date
wb2osz
a821a0e4ff PR 576. Used wrong variable. 2026-08-10 17:12:51 -04:00
wb2osz
7d546c6454 PR 547. Comment typo. 2026-08-10 17:12:51 -04:00
Edouard Lafargue
6fb888c070
server: optional AGWPE extension exposing per-frame signal quality (#669)
Direwolf measures a per-frame signal metric — audio level rec(mark/space)
plus the retry/FEC decode level — but only emits it to stdout and the
APRS-only CSV log, never over the AGWPE monitor API. This adds an opt-in,
backwards-compatible way for an AGWPE client to receive it in-band.

A client enables the feature with a new 'q' command; the server replies
with a 'q' frame carrying "ExtSig=1". For clients that opted in, the
per-frame metrics are packed into the four otherwise-zero user_reserved
header bytes of 'U'/'S'/'I' monitor frames:

    user_reserved[0] = rec      (0..255)
    user_reserved[1] = mark     (0..255; 0xFF = N/A for non-AFSK)
    user_reserved[2] = space    (0..255; 0xFF = N/A)
    user_reserved[3] = retries  (0 = clean copy)

Backwards compatibility is structural: the bytes are written only in the
copy sent to a client that sent 'q', after the header is zeroed, so any
client that does not opt in — every stock AGWPE client — receives
byte-identical frames. A stock Direwolf ignores the unknown 'q' command,
so a client requesting the extension against stock never sees the ACK and
leaves the feature off.

alevel and the retry count are threaded from app_process_rec_packet
through server_send_rec_packet into server_send_monitored. Own
transmitted ('T') frames and synthetic packets (AIS objects, APRStt) pass
a rec = -1 sentinel, which suppresses the reserved-byte write.
2026-08-10 16:54:51 -04:00
Kristian Glass
4ec63a0f9e
Fix minor typo ("dynamic") (#583) 2026-08-10 16:51:37 -04:00
wb2osz
00591b8e17 Fix compile error. 2026-08-10 16:09:11 -04:00
wb2osz
de75c0035b Aligh with ITU standard. 2026-08-10 15:58:44 -04:00
Kristian Glass
edb621090f
Remove duplicate (likely incorrect) morse definition for '-' (#597)
The Morse table contains two conflicting definitions for '-':

1. "-...-" on L101 (henceforth "3dit")
2. "-....-" on L108 ("4dit")

The order of the list meant that 3dit was used as it came first.
However it also used 3dit for `=` (L107).

Multiple sources, most notably the International Telecommunication Union
Recommendation for Morse code (ITU-R;
https://www.itu.int/dms_pubrec/itu-r/rec/m/R-REC-M.1677-1-200910-I!!PDF-E.pdf),
use 4dit for `-`, and I found nobody else using 3dit.

As such, especially given the conflicting definitions, I think 3dit is
an error, and this commit removes it.
2026-08-10 15:12:53 -04:00
wb2osz
249f79f33d Merge branch 'mfncooper-expand_dnssd_support' into dev
Pull Request 603.
2026-08-10 14:50:33 -04:00
wb2osz
e285ba4646 Fix compile error. 2026-08-10 14:38:42 -04:00
wb2osz
d786e3b55b
Merge branch 'dev' into expand_dnssd_support 2026-08-10 14:17:33 -04:00
Kristian Glass
b0aa22c9f7
Fix warning message for repeated IGFILTER configuration (#634)
The message was the opposite way round from the logic
2026-08-10 13:57:27 -04:00
Kristian Glass
9ac67f56ab
fix: Break when failing to create AX.25 frame from AGWPE M frame (#641)
Without this, the command handler will go on to try to process and
enqueue a null packet
2026-08-10 13:48:10 -04:00
chris_debian
90dc60001d
fix: remove leftover debug output from aprs_general_query (#656)
Two unconditional DW_COLOR_DEBUG / dw_printf("DEBUG: ...") statements
were left in aprs_general_query() with TODO comments marking them for
removal. They printed on every General Query packet regardless of any
debug flag, adding noise to normal operation.

Removes both blocks (query type at line 2649 and footprint coordinates
at line 2726) and their associated TODO comments.
2026-08-10 13:19:36 -04:00
Marc Thomson
c88d451cba
Add TIMESTAMP config file directive (#668)
* Fix -T precedence so it does not clobber a future config-file timestamp setting

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>

* Add TIMESTAMP config file directive

Adds a config-file equivalent for the -T command-line option, so
timestamps can be enabled when launching Direwolf from a supervisor
that cannot pass CLI arguments (e.g. Winlink Express). Closes #625.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>

* Document TIMESTAMP config directive in sample config and changelog

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>

* Address final-review minor findings for TIMESTAMP directive

- man/direwolf.1: mention the TIMESTAMP config directive alongside -T,
  matching the -h help text.
- config.c: warn (rather than silently truncate) when a TIMESTAMP
  format string exceeds the 40-byte field.
- dtime_now.c: harden timestamp_user_format() against strftime()
  returning 0 on overflow, whose buffer contents are unspecified per
  the C standard. Pre-existing gap also reachable via -T; fixed here
  since this change adds a second entry point to the same code path.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>
2026-08-10 12:43:45 -04:00
wb2osz
e62d608109 Better reliability. 2026-08-04 21:35:33 -04:00
wb2osz
ddfc5ec31a Better debug output. 2026-08-04 21:32:22 -04:00
wb2osz
ae961a7573 Window size refinement. 2026-08-04 10:25:21 -04:00
wb2osz
f24021b7fb Generate SREJ spans. 2026-07-29 16:44:25 -04:00
wb2osz
4849a7fa43 Recognize spans for SREJ-Multi. 2026-07-29 10:51:45 -04:00
wb2osz
e8ab49a5e4 Issue 664. Double max number of beacon definitions. 2026-07-19 15:33:22 -04:00
wb2osz
078b2e8484 Point out additional message id after end of ack. 2026-07-15 20:22:54 -04:00
wb2osz
160cbb40a3 Provide mod 128 hint in Source Addr RR. 2026-07-06 15:34:06 -04:00
wb2osz
eb16e430b9 Safer buffer size. 2026-07-05 15:51:12 -04:00
wb2osz
37400add85 Better TX window size negotiation. 2026-07-05 15:50:09 -04:00
wb2osz
8d0f866964 Mention new KISSPTY. 2026-07-05 15:44:58 -04:00
wb2osz
3827837391 Better message for AGW client going away. 2026-07-05 14:31:55 -04:00
chris_debian
d6151874ec
fix: suppress false CTCSS tone warning for percentage values (#657)
The bad_tone_re pattern matched numbers like 100, 67, 77, 123 when they
appeared in a comment, warning that they look like CTCSS tones in
non-standard format. The trailing boundary group ($|[^0-9.]) also
matched '%', so a comment like "Battery voltage 100%" triggered a
spurious warning.

Exclude '%' from the trailing boundary: ($|[^0-9.%]). This means
"100%", "67%", etc. no longer match the pattern, while standalone
numeric values that genuinely look like misformatted tones still do.

Addresses the TODO at decode_aprs.c line 4941.
2026-05-27 17:41:24 -04:00
chris_debian
cfaa64ac19
fix: use gmtime_r in get_timestamp for thread safety (#655)
gmtime(3) returns a pointer to a static internal buffer shared across
all threads. In a multi-threaded decoder, concurrent calls to
get_timestamp() could race on that buffer, corrupting decoded timestamps.

gmtime_r(3) takes a caller-supplied struct tm buffer, eliminating the
race. It is already used consistently elsewhere in the codebase
(log.c, waypoint.c, encode_aprs.c, beacon.c) and the portability shim
that makes it available on all platforms is in direwolf.h.

Add a null-return guard as the FIXME comment requested.

Fixes the FIXME at decode_aprs.c line 4041.
2026-05-27 17:16:19 -04:00
wb2osz
78d6559c67 Cleanup kiss pty for client apps. 2026-03-18 13:06:07 -04:00
wb2osz
0663670550 Merge remote-tracking branch 'refs/remotes/origin/dev' into dev 2026-03-12 19:25:33 -04:00
Martin Cooper
146f3d83ec
Add support for Heard Stations via AGWPE (#615)
An AGWPE client request for Heard Stations ('H' frame) requires that
data for the most recent 20 heard callsigns be returned. Much of the
data for this was already being collected, and displayed with the
'-d m' command line option, but was not available via AGWPE.

The following changes have been made to support requests for Heard
Stations:

* Last heard times are now saved on a per-channel basis, since the
  AGWPE request specifies the channel for which data is being
  requested. The most recently heard time on any channel is still
  available using the 'chan' value, reflecting the channel on which
  the callsign was most recently heard.

* First heard times are saved in addition to last heard times.

* Two new functions, mheard_latest_for_channel and mheard_latest_for_is,
  are exposed from the mheard code, for use by the AGWPE server code.
  These two functions parallel the separation between the existing
  mheard_save_rf and mheard_save_is functions.

* The AGWPE server responds to 'H' frame requests by constructing and
  returning 20 'H' frame responses (including blank responses if fewer
  stations have been heard). The responses include both the text and
  binary forms of the first and last heard times, as described in the
  AGWPE spec.

* Macros are used to wrap the platform differences for qsort_r /
  qsort_s, needed to sort heard times on a per-channel basis.

Tested on Linux Mint 22.1, macOS Sequoia 15.6.1, and Windows 10.
2026-03-12 19:19:29 -04:00
wb2osz
ee4d3e4510 More weather fields. 2026-03-11 17:38:53 -04:00
wb2osz
3b20d8210a Fix Ubuntu compiler warning & error. 2026-03-08 21:08:51 -04:00
wb2osz
d0eb822fcf Issue 635 - Multiple kiss pty and channel mapping. 2026-03-08 20:02:47 -04:00
wb2osz
041f396de0 Issue 633 - better error message. 2026-01-08 11:43:51 -05:00
wb2osz
9aba4b386f AX.25 v2.2 improvements 2026-01-03 18:23:52 -05:00
wb2osz
485ccbf1cd Don't use my call for example. 2026-01-03 18:08:31 -05:00
wb2osz
01c3114571 Minor symbol table correction & tweaks. 2025-12-28 12:19:17 -05:00
wb2osz
1924999dbd Linux compile error. 2025-12-19 14:49:19 -05:00
wb2osz
591a897161 Improved generation of SREJ frames for more efficient AX.25 v2.2 connected mode. 2025-12-19 14:27:17 -05:00
Martin Cooper
c8319fcc7b
Add new build config for Direwolf with Hamlib on Windows (#626)
* Add new build config for Direwolf with Hamlib on Windows

In parallel with the existing 64-bit Windows build, these changes add
a new matrix config for the same build but including Hamlib as part of
the build and package distribution. The resultant package zip file has
"-hamlib" appended to the name to distinguish it from the standard
Windows build.

Installing Hamlib as a build dependency using a package manager isn't
a viable option on Windows. Instead, we interrogate the GitHub release
assets to find the latest 4.x release of Hamlib, download and expand
the zip file for that release, and provide the path to the directory
for CMake configuration.

* Fix WIndows build errors

* Include Hamlib license-related files in Windows Hamlib zip
2025-11-30 16:51:24 -05:00
wb2osz
f97d5b202e Add delay before retrying serial TNC. 2025-11-30 15:55:25 -05:00
wb2osz
cfabdfb62a New text background options. 2025-11-30 11:42:35 -05:00
wb2osz
297be70046 Issue 627 - Just add a comment for possible future use. 2025-11-30 11:11:04 -05:00
ars-ka0s
4bf4fe3b3e Add text color options with black background. 2025-11-30 10:52:53 -05:00
wb2osz
694c95485b Issue 617 - Buffer Overflow in KISS code. 2025-11-16 15:46:15 -05:00
wb2osz
610fbc0a95 Investigate Issue 620. 2025-11-15 11:14:40 -05:00
wb2osz
3acf4debd0 Add delay so any messages can be seen before window disappears. 2025-11-14 11:25:20 -05:00
wb2osz
8be2dd2c3c notes for future 2025-11-13 14:45:48 -05:00
wb2osz
88042431b5 Recognize info field beginning with DX. 2025-11-13 14:34:41 -05:00