more work on mic-e device id.

This commit is contained in:
wb2osz 2024-02-16 02:52:28 +00:00
parent 4d2d814ee1
commit 5a54179c97
4 changed files with 145 additions and 18 deletions

18
data/README.txt Normal file
View File

@ -0,0 +1,18 @@
tocalls.yaml contains the encoding for the device/system/software
identifier which created the packet.
Knowing what generated the packet is very useful for troubleshooting.
TNCs, digipeaters, and IGates must not change this.
For MIC-E format, well... it's complicated.
See Understanding-APRS-Packets.pdf. Too long to repeat here.
For all other packet types, the AX.25 destination, or "tocall" field
contains a code for what generated the packet.
This is of the form AP????. For example, APDW18 for direwolf 1.8.
The database of identifiers is currently maintained by Hessu, OH7LZB.
You can update your local copy by running:
wget https://raw.githubusercontent.com/aprsorg/aprs-deviceid/main/tocalls.yaml

View File

@ -146,6 +146,11 @@ mice:
model: Tracker
class: tracker
- suffix: ":2"
vendor: SQ8L
model: VP-Tracker
class: tracker
#
# mic-e legacy devices, with an unique comment suffix and prefix
#
@ -237,6 +242,15 @@ tocalls:
- tocall: APAH??
model: AHub
- tocall: APAIOR
vendor: J. Angelo Racoma DU2XXR/N2RAC
model: APRSPH net bot based on Ioreth
class: service
os: linux
contact: info@aprsph.net
features:
- messaging
- tocall: APAM??
vendor: Altus Metrum
model: AltOS
@ -248,6 +262,12 @@ tocalls:
os: Android
class: app
- tocall: APAR??
vendor: Øyvind, LA7ECA
model: Arctic Tracker
class: tracker
os: embedded
- tocall: APAT51
vendor: Anytone
model: AT-D578
@ -364,6 +384,12 @@ tocalls:
model: WinphoneAPRS
class: app
- tocall: APD5T?
vendor: Geoffrey, F4FXL
model: Open Source DStarGateway
class: dstar
contact: f4fxl@dstargateway.digital
- tocall: APDF??
model: Automatic DF units
@ -448,6 +474,19 @@ tocalls:
model: Balloon tracker
class: tracker
- tocall: APEML?
vendor: Leszek, SP9MLI
model: SP9MLI for WX, Telemetry
class: software
contact: sp9mli@gmail.com
- tocall: APEP??
vendor: Patrick EGLOFF, TK5EP
model: LoRa WX station
class: wx
os: embedded
contact: pegloff@gmail.com
- tocall: APERS?
vendor: Jason, KG7YKZ
model: Runner tracking
@ -525,6 +564,17 @@ tocalls:
vendor: HP3ICC
model: Python APRS WX
- tocall: APHRM?
vendor: Giovanni, IW1CGW
model: Meteo
class: wx
contact: iw1cgw@libero.it
- tocall: APHRT?
vendor: Giovanni, IW1CGW
model: Telemetry
contact: iw1cgw@libero.it
- tocall: APHT??
vendor: IU0AAC
model: HMTracker
@ -702,11 +752,29 @@ tocalls:
os: embedded
contact: cfr34k-git@tkolb.de
- tocall: APLFM?
vendor: DO1MA
model: FemtoAPRS
class: tracker
os: embedded
- tocall: APLG??
vendor: OE5BPA
model: LoRa Gateway/Digipeater
class: digi
- tocall: APLHI?
vendor: Giovanni, IW1CGW
model: LoRa IGate/Digipeater/Telemetry
class: digi
contact: iw1cgw@libero.it
- tocall: APLHM?
vendor: Giovanni, IW1CGW
model: LoRa Meteostation
class: wx
contact: iw1cgw@libero.it
- tocall: APLIG?
vendor: TA2MUN/TA9OHC
model: LightAPRS Tracker
@ -736,14 +804,14 @@ tocalls:
contact: sq9p.peter@gmail.com
- tocall: APLRG?
vendor: Ricardo, CD2RXU
vendor: Ricardo, CA2RXU
model: ESP32 LoRa iGate
class: igate
os: embedded
contact: richonguzman@gmail.com
- tocall: APLRT?
vendor: Ricardo, CD2RXU
vendor: Ricardo, CA2RXU
model: ESP32 LoRa Tracker
class: tracker
os: embedded
@ -919,12 +987,18 @@ tocalls:
vendor: SQ8L
model: VP-Digi
os: embedded
class: digi
- tocall: APNV1?
vendor: SQ8L
model: VP-Node
os: embedded
- tocall: APNV2?
vendor: SQ8L
model: VP-Tracker
class: tracker
- tocall: APNV??
vendor: SQ8L
@ -947,6 +1021,11 @@ tocalls:
vendor: N0AGI
model: POCSAG
- tocall: APODOT
vendor: Mike, NA7Q
model: Oregon Department of Transportion Traffic Alerts
class: service
- tocall: APOG7?
vendor: OpenGD77
model: OpenGD77
@ -958,6 +1037,12 @@ tocalls:
model: Oscar
class: satellite
- tocall: APOPYT
vendor: Mike, NA7Q
model: NA7Q Messenger
class: software
contact: mike.ph4@gmail.com
- tocall: APOSAT
vendor: Mike, NA7Q
model: Open Source Satellite Gateway
@ -1014,6 +1099,12 @@ tocalls:
features:
- messaging
- tocall: APPS??
vendor: Øyvind, LA7ECA (for the Norwegian Radio Relay League)
model: Polaric Server
class: software
os: Linux
- tocall: APPT??
vendor: JF6LZE
model: KetaiTracker
@ -1276,11 +1367,25 @@ tocalls:
os: Linux/Unix
contact: kl7af@foghaven.net
- tocall: APTHUR
model: APRSThursday weekly event mapbot daemon
contact: harihend1973@gmail.com
vendor: YD0BCX
class: service
os: linux/unix
features:
- messaging
- tocall: APTKJ?
vendor: W9JAJ
model: ATTiny APRS Tracker
os: embedded
- tocall: APTLVC
vendor: TA5LVC
model: TR80 APRS Tracker
class: tracker
- tocall: APTNG?
vendor: Filip YU1TTN
model: Tango Tracker
@ -1418,6 +1523,10 @@ tocalls:
model: Python APRS
class: software
- tocall: "APZ*"
vendor: Unknown
model: Experimental
- tocall: APZ18
vendor: IW3FQG
model: UIdigi

View File

@ -1638,28 +1638,23 @@ static void aprs_mic_e (decode_aprs_t *A, packet_t pp, unsigned char *info, int
// Possible altitude. 3 characters followed by }
// Possible altitude at beginning of remaining comment.
// Three base 91 characters followed by }
if (strlen(trimmed) >=4 && trimmed[3] == '}') {
if (strlen(trimmed) >=4 &&
isdigit91(trimmed[0]) &&
isdigit91(trimmed[1]) &&
isdigit91(trimmed[2]) &&
trimmed[3] == '}') {
A->g_altitude_ft = DW_METERS_TO_FEET((trimmed[0]-33)*91*91 + (trimmed[1]-33)*91 + (trimmed[2]-33) - 10000);
if ( ! isdigit91(trimmed[0]) || ! isdigit91(trimmed[1]) || ! isdigit91(trimmed[2]))
{
if ( ! A->g_quiet) {
text_color_set(DW_COLOR_ERROR);
dw_printf("Invalid character in MIC-E altitude. Must be in range of '!' to '{'.\n");
dw_printf("Bogus altitude of %.0f changed to unknown.\n", A->g_altitude_ft);
}
A->g_altitude_ft = G_UNKNOWN;
}
process_comment (A, mcomment+4, strlen(mcomment) - 4);
process_comment (A, trimmed+4, strlen(trimmed) - 4);
return;
}
process_comment (A, mcomment, strlen(mcomment));
process_comment (A, trimmed, strlen(trimmed));
} // end aprs_mic_e

View File

@ -107,6 +107,11 @@ int main (int argc, char *argv[])
assert (strcmp(comment_out, "Comment") == 0);
assert (strcmp(device, "Kenwood TM-D710") == 0);
deviceid_decode_mice ("]\"4V}=", comment_out, sizeof(comment_out), device, sizeof(device));
dw_printf ("%s %s\n", comment_out, device);
assert (strcmp(comment_out, "\"4V}") == 0);
assert (strcmp(device, "Kenwood TM-D710") == 0);
// Modern MIC-E.
@ -622,13 +627,13 @@ void deviceid_decode_mice (char *comment, char *trimmed, size_t trimmed_size, ch
strncmp_z(comment, // prefix from table
pmice[n].prefix,
strlen(pmice[n].prefix)) == 0 &&
strncmp_z(comment + strlen(comment) - strlen(pmice[n].suffix), //suffix
strncmp_z(comment + strlen(comment) - strlen(pmice[n].suffix), // possible suffix
pmice[n].suffix,
strlen(pmice[n].suffix)) == 0) ||
(strlen(pmice[n].prefix) == 0 && // Later
(comment[0] == '`' || comment[0] == '\'') && // prefix ` or '
strncmp_z(comment + strlen(comment) - strlen(pmice[n].suffix), //suffix
strncmp_z(comment + strlen(comment) - strlen(pmice[n].suffix), // suffix
pmice[n].suffix,
strlen(pmice[n].suffix)) == 0) ) {