From d2927d6d7da7c6665737209e30dc2e39263cbdc7 Mon Sep 17 00:00:00 2001 From: wb2osz Date: Fri, 3 Oct 2025 17:22:53 -0400 Subject: [PATCH 1/4] Fix graph. --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 148c7b1c..ccb60e6c 100644 --- a/README.md +++ b/README.md @@ -243,4 +243,4 @@ Here are some good places to ask questions and share your experience: The github "issues" section is for reporting software defects and enhancement requests. It is NOT a place to ask questions or have general discussions. Please use one of the locations above. -[![Star History Chart](https://api.star-history.com/svg?repos=hkociemba/RubiksCube-TwophaseSolver&type=Date)](https://star-history.com/#wb2osz/direwolf&Date) +[![Star History Chart](https://api.star-history.com/svg?repos=wb2osz/direwolf&type=Date)](https://star-history.com/#wb2osz/direwolf&Date) From 81ed8d0669633d395d5d463b92ec868a06ec2368 Mon Sep 17 00:00:00 2001 From: wb2osz Date: Sat, 4 Oct 2025 17:34:44 -0400 Subject: [PATCH 2/4] More debug info, better error message. --- src/igate.c | 68 +++++++++++++++++++++++++++++++---------------------- 1 file changed, 40 insertions(+), 28 deletions(-) diff --git a/src/igate.c b/src/igate.c index 95ca657d..0880c550 100644 --- a/src/igate.c +++ b/src/igate.c @@ -174,7 +174,7 @@ static struct s_server { } is_server[MAX_IS_HOSTS]; -int num_is_servers = 0; // Number of element used above for CWOP mode. +static int num_is_servers = 0; // Number of elements used above for CWOP mode. // Should be 1 for normal ham APRS-IS. @@ -371,6 +371,7 @@ int igate_get_dnl_cnt (void) { * 1 plus packets sent TO server or why not. * 2 plus duplicate detection overview. * 3 plus duplicate detection details. + * 4 plus DNS details. * * Description: Originally: This starts two threads: * @@ -572,21 +573,20 @@ static void setup_cwop_connect_threads(void) freeaddrinfo(ai_head); } -#if DEBUG_DNS - text_color_set(DW_COLOR_DEBUG); - dw_printf ("cwop getaddrinfo returns:\n"); -#endif + if (s_debug >= 4) { + text_color_set(DW_COLOR_DEBUG); + dw_printf ("cwop getaddrinfo returns:\n"); + } num_is_servers = 0; for (ai = ai_head; ai != NULL; ai = ai->ai_next) { -#if DEBUG_DNS - text_color_set(DW_COLOR_DEBUG); dwsock_ia_to_text (ai->ai_family, ai->ai_addr, is_server[num_is_servers].ipaddr_str, sizeof(is_server[num_is_servers].ipaddr_str)); strlcpy (is_server[num_is_servers].server_port_str, server_port_str, sizeof(is_server[num_is_servers].server_port_str)); - dw_printf (" %s\n", is_server[num_is_servers].ipaddr_str); -#endif + if (s_debug >= 4) { + dw_printf (" [%d] %s\n", num_is_servers, is_server[num_is_servers].ipaddr_str); + } // Don't run off end if too many. if (num_is_servers < MAX_IS_HOSTS) num_is_servers++; @@ -757,17 +757,17 @@ static void * connnect_thread_aprs (void *arg) continue; } -#if DEBUG_DNS - text_color_set(DW_COLOR_DEBUG); - dw_printf ("getaddrinfo returns:\n"); -#endif + if (s_debug >= 4) { + text_color_set(DW_COLOR_DEBUG); + dw_printf ("getaddrinfo returns:\n"); + } num_hosts = 0; for (ai = ai_head; ai != NULL; ai = ai->ai_next) { -#if DEBUG_DNS - text_color_set(DW_COLOR_DEBUG); - dwsock_ia_to_text (ai->ai_family, ai->ai_addr, ipaddr_str, sizeof(ipaddr_str)); - dw_printf (" %s\n", ipaddr_str); -#endif + if (s_debug >= 4) { + text_color_set(DW_COLOR_DEBUG); + dwsock_ia_to_text (ai->ai_family, ai->ai_addr, ipaddr_str, sizeof(ipaddr_str)); + dw_printf (" [%d] %s\n", num_hosts, ipaddr_str); + } hosts[num_hosts] = ai; if (num_hosts < MAX_IS_HOSTS) num_hosts++; } @@ -780,14 +780,14 @@ static void * connnect_thread_aprs (void *arg) shuffle (hosts, num_hosts); -#if DEBUG_DNS - text_color_set(DW_COLOR_DEBUG); - dw_printf ("after shuffling:\n"); - for (n=0; nai_family, hosts[n]->ai_addr, ipaddr_str, sizeof(ipaddr_str)); - dw_printf (" %s\n", ipaddr_str); + if (s_debug >= 4) { + text_color_set(DW_COLOR_DEBUG); + dw_printf ("after shuffling:\n"); + for (n=0; nai_family, hosts[n]->ai_addr, ipaddr_str, sizeof(ipaddr_str)); + dw_printf (" [%d] %s\n", n, ipaddr_str); + } } -#endif // Try each address until we find one that is successful. @@ -822,7 +822,8 @@ static void * connnect_thread_aprs (void *arg) } #endif -#ifndef DEBUG_DNS +//#ifndef DEBUG_DNS +#if 1 err = connect(is, ai->ai_addr, (int)ai->ai_addrlen); #if __WIN32__ if (err == SOCKET_ERROR) { @@ -1670,7 +1671,7 @@ static int get1ch (int my_server_index) n = SOCK_RECV (is_server[my_server_index].igate_sock, (char*)(&ch), 1); - if (n == 1) { + if (n == 1) { // Success #if DEBUG9 dw_printf (log_fp, "%02x %c %c", ch, isprint(ch) ? ch : '.' , @@ -1682,8 +1683,19 @@ static int get1ch (int my_server_index) return(ch); } + // Linux man page: "These calls return the number of bytes received, or -1 if an error occurred + // The return value will be 0 when the peer has performed an orderly shutdown. + + // I saw 0 when two different clients were logged in with same callsign-ssid. + text_color_set(DW_COLOR_ERROR); - dw_printf ("\nError reading from IGate server. Closing connection.\n\n"); + if (n == 0) { + dw_printf ("\nServer %s has closed connection.\n\n", + is_server[my_server_index].ipaddr_str); + } + else { + dw_printf ("\nError reading from server %s. Closing connection.\n\n", is_server[my_server_index].ipaddr_str); + } #if __WIN32__ closesocket (is_server[my_server_index].igate_sock); #else From 0b34cb1f5ebb39e4b33e559e9dfededfc321c1cd Mon Sep 17 00:00:00 2001 From: wb2osz Date: Mon, 6 Oct 2025 14:33:37 -0400 Subject: [PATCH 3/4] Clean up sample direwolf.conf file. --- conf/generic.conf | 60 ++++++++++++++++++++++++++--------------------- 1 file changed, 33 insertions(+), 27 deletions(-) diff --git a/conf/generic.conf b/conf/generic.conf index 58c4ea16..5e053f00 100644 --- a/conf/generic.conf +++ b/conf/generic.conf @@ -12,7 +12,7 @@ %R% The sample config file was getting pretty messy %R% with the Windows and Linux differences. %R% It would be a maintenance burden to keep most of -%R% two different versions in sync. +%R% three different versions in sync. %R% This common source is now used to generate the %R% three different variations while having only a single %R% copy of the common parts. @@ -38,8 +38,12 @@ %M%# /usr/local/share/doc/direwolf/ or /usr/share/doc/direwolf/ %M%# Concise "man" pages are also available for Mac OSX. %C%# -%C%# Recommended Reading for everyone: -%C%# "Understanding APRS Packets" in https://github.com/wb2osz/aprsspec +%C%######################################################################### +%C%# # +%C%# Recommended Reading for everyone: # +%C%# "Understanding APRS Packets" in https://github.com/wb2osz/aprsspec # +%C%# # +%C%######################################################################### %C%# %C%# %C%# Questions??? Join the discussion forum: https://groups.io/g/direwolf @@ -54,19 +58,17 @@ %C%# (1) MYCALL - call sign and SSID for your station. %C%# %C%# Look for lines starting with MYCALL and -%C%# change NOCALL to your own. +%C%# change NOCALL to your own callsign and optional SSID. %C%# %C%# (2) PBEACON - enable position beaconing. %C%# %C%# Look for lines starting with PBEACON and -%C%# modify for your call, location, etc. +%C%# modify for your location, symbol, comment, etc. %C%# %C%# (3) DIGIPEATER - configure digipeating rules. %C%# %C%# Look for lines starting with DIGIPEATER. -%C%# Most people will probably use the given example. -%C%# Just remove the "#" from the start of the line -%C%# to enable it. +%C%# Most people will probably use of of the two examples. %C%# %C%# (4) IGSERVER, IGLOGIN - IGate server and login %C%# @@ -104,7 +106,7 @@ %C%# %C%# %C%# Many examples of radio interfaces and PTT options can be found in: -%C%# https://github.com/wb2osz/direwolf-doc/blob/main/Radio-Interface-Guide.pdf +%C%# https://raw.githubusercontent.com/wb2osz/direwolf-doc/main/Radio-Interface-Guide.pdf %C%# %C%# %R% ---------- Windows ---------- @@ -179,7 +181,7 @@ %M%# %M% %C%# Many more details and examples can be found in: -%C%# https://github.com/wb2osz/direwolf-doc/blob/main/Radio-Interface-Guide.pdf +%C%# https://raw.githubusercontent.com/wb2osz/direwolf-doc/main/Radio-Interface-Guide.pdf %C% %C%############################################################# %C%# # @@ -193,7 +195,7 @@ %C%# Station identifier for this channel. %C%# Multiple channels can have the same or different names. %C%# -%C%# It can be up to 6 letters and digits with an optional ssid. +%C%# It can be up to 6 letters and digits with an optional ssid in range of 1 to 15. %C%# The APRS specification requires that it be upper case. %C%# %C%# Example (don't use this unless you are me): MYCALL WB2OSZ-5 @@ -223,7 +225,7 @@ %C%# %C% %C%# Push to Talk (PTT) can be confusing because there are so many different cases. -%C%# https://github.com/wb2osz/direwolf-doc/blob/main/Radio-Interface-Guide.pdf +%C%# https://raw.githubusercontent.com/wb2osz/direwolf-doc/main/Radio-Interface-Guide.pdf %C%# goes into detail about the various options. %C% %C%# If using a C-Media CM108/CM119 or similar USB Audio Adapter, @@ -236,7 +238,7 @@ %C% %C%# There are other possibilities such as serial port RTS, Raspberry Pi GPIO pins, %C%# and hamlib for CAT control. For more details see: -%C%# https://github.com/wb2osz/direwolf-doc/blob/main/Radio-Interface-Guide.pdf +%C%# https://raw.githubusercontent.com/wb2osz/direwolf-doc/main/Radio-Interface-Guide.pdf %C% %C% %C%############################################################# @@ -271,17 +273,19 @@ %C%# Each has a series of keywords and values for options. %C%# See User Guide for details. %C%# -%C%# Example: PLEASE change the latitude and longitude. -%C%# +%C%# Example: Change the latitude and longitude or your location +%C%# will show you about to go over Niagara Falls. %C% -%C%#PBEACON overlay=S symbol="digi" lat=42^37.14N long=071^20.83W power=50 height=20 gain=4 comment="Chelmsford MA" +%C%#PBEACON lat=43.077104 long=-79.075674 symbol="canoe" comment="Niagara Falls" %C% +%C%# Run "direwolf -S" (upper case S) to get a list of symbols that can +%C%# be used rather than "canoe." Specify a unique substring of description. %C%# %C%# Did you know that APRS comments and messages can contain UTF-8 characters, not only plain ASCII? %C%# -%C%#PBEACON delay=1 every=30 overlay=S symbol="digi" lat=42^37.14N long=071^20.83W comment=" Did you know that APRS comments and messages can contain UTF-8 characters? \xe0\xb8\xa7\xe0\xb8\xb4\xe0\xb8\x97\xe0\xb8\xa2\xe0\xb8\xb8\xe0\xb8\xaa\xe0\xb8\xa1\xe0\xb8\xb1\xe0\xb8\x84\xe0\xb8\xa3\xe0\xb9\x80\xe0\xb8\xa5\xe0\xb9\x88\xe0\xb8\x99" -%C%#PBEACON delay=11 every=30 overlay=S symbol="digi" lat=42^37.14N long=071^20.83W comment=" Did you know that APRS comments and messages can contain UTF-8 characters? \xce\xa1\xce\xb1\xce\xb4\xce\xb9\xce\xbf\xce\xb5\xcf\x81\xce\xb1\xcf\x83\xce\xb9\xcf\x84\xce\xb5\xcf\x87\xce\xbd\xce\xb9\xcf\x83\xce\xbc\xcf\x8c\xcf\x82" -%C%#PBEACON delay=21 every=30 overlay=S symbol="digi" lat=42^37.14N long=071^20.83W comment=" Did you know that APRS comments and messages can contain UTF-8 characters? \xe3\x82\xa2\xe3\x83\x9e\xe3\x83\x81\xe3\x83\xa5\xe3\x82\xa2\xe7\x84\xa1\xe7\xb7\x9a" +%C%#PBEACON delay=1 every=30 overlay=S symbol="digi" lat=43.077104 long=-79.075674 comment=" Did you know that APRS comments and messages can contain UTF-8 characters? \xe0\xb8\xa7\xe0\xb8\xb4\xe0\xb8\x97\xe0\xb8\xa2\xe0\xb8\xb8\xe0\xb8\xaa\xe0\xb8\xa1\xe0\xb8\xb1\xe0\xb8\x84\xe0\xb8\xa3\xe0\xb9\x80\xe0\xb8\xa5\xe0\xb9\x88\xe0\xb8\x99" +%C%#PBEACON delay=11 every=30 overlay=S symbol="digi" lat=43.077104 long=-79.075674 comment=" Did you know that APRS comments and messages can contain UTF-8 characters? \xce\xa1\xce\xb1\xce\xb4\xce\xb9\xce\xbf\xce\xb5\xcf\x81\xce\xb1\xcf\x83\xce\xb9\xcf\x84\xce\xb5\xcf\x87\xce\xbd\xce\xb9\xcf\x83\xce\xbc\xcf\x8c\xcf\x82" +%C%#PBEACON delay=21 every=30 overlay=S symbol="digi" lat=43.077104 long=-79.075674 comment=" Did you know that APRS comments and messages can contain UTF-8 characters? \xe3\x82\xa2\xe3\x83\x9e\xe3\x83\x81\xe3\x83\xa5\xe3\x82\xa2\xe7\x84\xa1\xe7\xb7\x9a" %C%# %C% %C%############################################################# @@ -291,14 +295,15 @@ %C%############################################################# %C% %C%# -%C%# For most common situations, use something like this by removing -%C%# the "#" from the beginning of the line below. -%C%# +%C%# Remove the "#" from the beginning of the first digipeat below for short range fill-in digi +%C%# or remove the "#" from the beginning of the second digipeat below for wide area digi. %C% +%C%#DIGIPEAT 0 0 ^TEST$ ^WIDE1-1$ %C%#DIGIPEAT 0 0 ^WIDE[3-7]-[1-7]$|^TEST$ ^WIDE[12]-[12]$ %C% -%C%# See User Guide and "APRS-Digipeaters.pdf" for more explanation of what -%C%# this means and how it can be customized for your particular needs. +%C%# See https://raw.githubusercontent.com/wb2osz/direwolf-doc/main/APRS-Digipeaters.pdf +%C%# and User Guide for more explanation of what this means and +%C%# how it can be customized for your particular needs. %C% %C% %C%# Traditional connected mode packet radio uses a different @@ -334,7 +339,8 @@ %C% %C%#IGTXVIA 0 WIDE1-1,WIDE2-1 %C% -%C%# For more information see Successful-IGate-Operation.pdf. +%C%# For more information see +%C%# https://raw.githubusercontent.com/wb2osz/direwolf-doc/main/Successful-APRS-IGate-Operation.pdf %C% %C% %C%############################################################# @@ -345,8 +351,8 @@ %C% %C%# %C%# Dire Wolf can receive DTMF (commonly known as Touch Tone) -%C%# messages and convert them to packet objects. +%C%# messages and convert them to packet objects. Details in: %C%# -%C%# See separate "APRStt-Implementation-Notes" document for details. +%C%# https://raw.githubusercontent.com/wb2osz/direwolf/master/doc/APRStt-Implementation-Notes.pdf %C%# From 551d95ce5cd4e662b7caf511ee1b76a670e973c0 Mon Sep 17 00:00:00 2001 From: Kristian Glass Date: Wed, 8 Oct 2025 12:04:53 +0100 Subject: [PATCH 4/4] Fix copy/paste error in assertion in multi_modem_process_rec_frame They happen to both be 9 right now, fortunately! --- src/multi_modem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/multi_modem.c b/src/multi_modem.c index 0ec1524e..30bb5a9b 100644 --- a/src/multi_modem.c +++ b/src/multi_modem.c @@ -321,7 +321,7 @@ void multi_modem_process_rec_frame (int chan, int subchan, int slice, unsigned c assert (chan >= 0 && chan < MAX_RADIO_CHANS); assert (subchan >= 0 && subchan < MAX_SUBCHANS); - assert (slice >= 0 && slice < MAX_SUBCHANS); + assert (slice >= 0 && slice < MAX_SLICERS); // Special encapsulation for AIS & EAS so they can be treated normally pretty much everywhere else.