wb2osz / direwolf

Dire Wolf is a software "soundcard" AX.25 packet modem/TNC and APRS encoder/decoder. It can be used stand-alone to observe APRS traffic, as a tracker, digipeater, APRStt gateway, or Internet Gateway (IGate). For more information, look at the bottom 1/4 of this page and in https://github.com/wb2osz/direwolf/blob/dev/doc/README.md
GNU General Public License v2.0
1.51k stars 300 forks source link

Duplicate UI frame when DIGIPEAT and CDIGIPEAT on at same time. #375

Open wb2osz opened 2 years ago

wb2osz commented 2 years ago

from discussion https://groups.io/g/direwolf/message/6174

version: Dire Wolf DEVELOPMENT version 1.7 A (May 10 2021) Includes optional support for: cm108-ptt dns-sd

On KH6MP-1, we have DIGIPEAT & CDIGIPEAT enabled (CDIGIPEAT is enabled for "connected-mode" users to connect to nodes on other islands). After turning on CDIGIPEAT, unconnected 'APRS' packets are being "digi'd" twice:

direwolf.conf: CDIGIPEAT 0 0 DIGIPEAT 0 0 ^WIDE[3-7]-[1-7]$ ^WIDE[12]-[12]$ TRACE

log output: KH6JUZ-15 audio level = 40(5/5) 000111+__ [0.2] KH6JUZ-15>APDW17,KH6MP-1,WIDE2-1:!2127.98NT15759.66W&PHG2040 Mililani Mauka Central Oahu Hawaii USA Position, TX igate with path set to 1 h, DireWolf, WB2OSZ, 4 W height=10 4dBi omni N 21 27.9800, W 157 59.6600 Mililani Mauka Central Oahu Hawaii USA [0H] KH6JUZ-15>APDW17,KH6MP-1,WIDE2-1:!2127.98NT15759.66W&PHG2040 Mililani Mauka Central Oahu Hawaii USA [0H] KH6JUZ-15>APDW17,KH6MP-1,WIDE2-1:!2127.98NT15759.66W&PHG2040 Mililani Mauka Central Oahu Hawaii USA

Digipeater WIDE2 (probably NH7C-5) audio level = 29(6/8) [NONE] |||____ [0.2] KH6JUZ-15>APDW17,KH6MP-1,NH7C-5,WIDE2*:!2127.98NT15759.66W&PHG2040 Mililani Mauka Central Oahu Hawaii USA Position, TX igate with path set to 1 h, DireWolf, WB2OSZ, 4 W height=10 4dBi omni N 21 27.9800, W 157 59.6600 Mililani Mauka Central Oahu Hawaii USA

When CDIGIPEAT is removed: KH6JUZ-15 audio level = 36(5/5) 420000:__ [0.3] KH6JUZ-15>APDW17,KH6MP-1,WIDE2-1:!2127.98NT15759.66W&PHG2040 Mililani Mauka Central Oahu Hawaii USA Position, TX igate with path set to 1 h, DireWolf, WB2OSZ, 4 W height=10 4dBi omni N 21 27.9800, W 157 59.6600 Mililani Mauka Central Oahu Hawaii USA [0H] KH6JUZ-15>APDW17,KH6MP-1*,WIDE2-1:!2127.98NT15759.66W&PHG2040 Mililani Mauka Central Oahu Hawaii USA

Digipeater WIDE2 (probably NH7C-5) audio level = 36(7/8) [NONE] _|||||___ [0.3] KH6JUZ-15>APDW17,KH6MP-1,NH7C-5,WIDE2*:!2127.98NT15759.66W&PHG2040 Mililani Mauka Central Oahu Hawaii USA Position, TX igate with path set to 1 h, DireWolf, WB2OSZ, 4 W height=10 4dBi omni N 21 27.9800, W 157 59.6600 Mililani Mauka Central Oahu Hawaii USA

-Jeffrey Komori, KH6JUZ

wb2osz commented 2 years ago

Thanks for sharing that.

This is a very interesting case. I think I see what is happening. The same packet is sent to both APRS and connected mode digipeat processing which use different algorithms.

APRS digipeating only applies to UI frames. The APRS digipeater is called first and the packet is retransmitted. APRS digipeating remembers what it sent in the last 30 seconds and suppresses any duplicates.

Connected mode digipeating handles all kinds of frames. Free form UI frames are sometimes used as general broadcasts. Connected mode digipeating does not suppress duplicates. Identical duplicates would be common when sending retries when there is no ack response.

This would happen only when the first digipeater field is a specific station, e.g.

KH6JUZ-15>APDW17,KH6MP-1,WIDE2-1:!

because the connected mode digipeater does not recognize the WIDEn-n form.

Since this specific case would only affect UI frames it would not be disastrous, just extra clutter.,_

I think the solution here would be for the connected mode digipeater to add any UI frames to the list of packets repeated in the last 30 seconds but not use it in any decision making.

If the digipeater order is reversed, the APRS digipeater would then suppress it as a duplicate.