Skip to content

Commit 5a54179

Browse files
committed
more work on mic-e device id.
1 parent 4d2d814 commit 5a54179

File tree

4 files changed

+145
-18
lines changed

4 files changed

+145
-18
lines changed

data/README.txt

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

data/tocalls.yaml

+111-2
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,11 @@ mice:
146146
model: Tracker
147147
class: tracker
148148

149+
- suffix: ":2"
150+
vendor: SQ8L
151+
model: VP-Tracker
152+
class: tracker
153+
149154
#
150155
# mic-e legacy devices, with an unique comment suffix and prefix
151156
#
@@ -237,6 +242,15 @@ tocalls:
237242
- tocall: APAH??
238243
model: AHub
239244

245+
- tocall: APAIOR
246+
vendor: J. Angelo Racoma DU2XXR/N2RAC
247+
model: APRSPH net bot based on Ioreth
248+
class: service
249+
os: linux
250+
contact: info@aprsph.net
251+
features:
252+
- messaging
253+
240254
- tocall: APAM??
241255
vendor: Altus Metrum
242256
model: AltOS
@@ -248,6 +262,12 @@ tocalls:
248262
os: Android
249263
class: app
250264

265+
- tocall: APAR??
266+
vendor: Øyvind, LA7ECA
267+
model: Arctic Tracker
268+
class: tracker
269+
os: embedded
270+
251271
- tocall: APAT51
252272
vendor: Anytone
253273
model: AT-D578
@@ -364,6 +384,12 @@ tocalls:
364384
model: WinphoneAPRS
365385
class: app
366386

387+
- tocall: APD5T?
388+
vendor: Geoffrey, F4FXL
389+
model: Open Source DStarGateway
390+
class: dstar
391+
contact: f4fxl@dstargateway.digital
392+
367393
- tocall: APDF??
368394
model: Automatic DF units
369395

@@ -448,6 +474,19 @@ tocalls:
448474
model: Balloon tracker
449475
class: tracker
450476

477+
- tocall: APEML?
478+
vendor: Leszek, SP9MLI
479+
model: SP9MLI for WX, Telemetry
480+
class: software
481+
contact: sp9mli@gmail.com
482+
483+
- tocall: APEP??
484+
vendor: Patrick EGLOFF, TK5EP
485+
model: LoRa WX station
486+
class: wx
487+
os: embedded
488+
contact: pegloff@gmail.com
489+
451490
- tocall: APERS?
452491
vendor: Jason, KG7YKZ
453492
model: Runner tracking
@@ -525,6 +564,17 @@ tocalls:
525564
vendor: HP3ICC
526565
model: Python APRS WX
527566

567+
- tocall: APHRM?
568+
vendor: Giovanni, IW1CGW
569+
model: Meteo
570+
class: wx
571+
contact: iw1cgw@libero.it
572+
573+
- tocall: APHRT?
574+
vendor: Giovanni, IW1CGW
575+
model: Telemetry
576+
contact: iw1cgw@libero.it
577+
528578
- tocall: APHT??
529579
vendor: IU0AAC
530580
model: HMTracker
@@ -702,11 +752,29 @@ tocalls:
702752
os: embedded
703753
contact: cfr34k-git@tkolb.de
704754

755+
- tocall: APLFM?
756+
vendor: DO1MA
757+
model: FemtoAPRS
758+
class: tracker
759+
os: embedded
760+
705761
- tocall: APLG??
706762
vendor: OE5BPA
707763
model: LoRa Gateway/Digipeater
708764
class: digi
709765

766+
- tocall: APLHI?
767+
vendor: Giovanni, IW1CGW
768+
model: LoRa IGate/Digipeater/Telemetry
769+
class: digi
770+
contact: iw1cgw@libero.it
771+
772+
- tocall: APLHM?
773+
vendor: Giovanni, IW1CGW
774+
model: LoRa Meteostation
775+
class: wx
776+
contact: iw1cgw@libero.it
777+
710778
- tocall: APLIG?
711779
vendor: TA2MUN/TA9OHC
712780
model: LightAPRS Tracker
@@ -736,14 +804,14 @@ tocalls:
736804
contact: sq9p.peter@gmail.com
737805

738806
- tocall: APLRG?
739-
vendor: Ricardo, CD2RXU
807+
vendor: Ricardo, CA2RXU
740808
model: ESP32 LoRa iGate
741809
class: igate
742810
os: embedded
743811
contact: richonguzman@gmail.com
744812

745813
- tocall: APLRT?
746-
vendor: Ricardo, CD2RXU
814+
vendor: Ricardo, CA2RXU
747815
model: ESP32 LoRa Tracker
748816
class: tracker
749817
os: embedded
@@ -919,12 +987,18 @@ tocalls:
919987
vendor: SQ8L
920988
model: VP-Digi
921989
os: embedded
990+
class: digi
922991

923992
- tocall: APNV1?
924993
vendor: SQ8L
925994
model: VP-Node
926995
os: embedded
927996

997+
- tocall: APNV2?
998+
vendor: SQ8L
999+
model: VP-Tracker
1000+
class: tracker
1001+
9281002
- tocall: APNV??
9291003
vendor: SQ8L
9301004

@@ -947,6 +1021,11 @@ tocalls:
9471021
vendor: N0AGI
9481022
model: POCSAG
9491023

1024+
- tocall: APODOT
1025+
vendor: Mike, NA7Q
1026+
model: Oregon Department of Transportion Traffic Alerts
1027+
class: service
1028+
9501029
- tocall: APOG7?
9511030
vendor: OpenGD77
9521031
model: OpenGD77
@@ -958,6 +1037,12 @@ tocalls:
9581037
model: Oscar
9591038
class: satellite
9601039

1040+
- tocall: APOPYT
1041+
vendor: Mike, NA7Q
1042+
model: NA7Q Messenger
1043+
class: software
1044+
contact: mike.ph4@gmail.com
1045+
9611046
- tocall: APOSAT
9621047
vendor: Mike, NA7Q
9631048
model: Open Source Satellite Gateway
@@ -1014,6 +1099,12 @@ tocalls:
10141099
features:
10151100
- messaging
10161101

1102+
- tocall: APPS??
1103+
vendor: Øyvind, LA7ECA (for the Norwegian Radio Relay League)
1104+
model: Polaric Server
1105+
class: software
1106+
os: Linux
1107+
10171108
- tocall: APPT??
10181109
vendor: JF6LZE
10191110
model: KetaiTracker
@@ -1276,11 +1367,25 @@ tocalls:
12761367
os: Linux/Unix
12771368
contact: kl7af@foghaven.net
12781369

1370+
- tocall: APTHUR
1371+
model: APRSThursday weekly event mapbot daemon
1372+
contact: harihend1973@gmail.com
1373+
vendor: YD0BCX
1374+
class: service
1375+
os: linux/unix
1376+
features:
1377+
- messaging
1378+
12791379
- tocall: APTKJ?
12801380
vendor: W9JAJ
12811381
model: ATTiny APRS Tracker
12821382
os: embedded
12831383

1384+
- tocall: APTLVC
1385+
vendor: TA5LVC
1386+
model: TR80 APRS Tracker
1387+
class: tracker
1388+
12841389
- tocall: APTNG?
12851390
vendor: Filip YU1TTN
12861391
model: Tango Tracker
@@ -1418,6 +1523,10 @@ tocalls:
14181523
model: Python APRS
14191524
class: software
14201525

1526+
- tocall: "APZ*"
1527+
vendor: Unknown
1528+
model: Experimental
1529+
14211530
- tocall: APZ18
14221531
vendor: IW3FQG
14231532
model: UIdigi

src/decode_aprs.c

+9-14
Original file line numberDiff line numberDiff line change
@@ -1638,28 +1638,23 @@ static void aprs_mic_e (decode_aprs_t *A, packet_t pp, unsigned char *info, int
16381638

16391639

16401640

1641-
// Possible altitude. 3 characters followed by }
1641+
// Possible altitude at beginning of remaining comment.
1642+
// Three base 91 characters followed by }
16421643

16431644

1644-
if (strlen(trimmed) >=4 && trimmed[3] == '}') {
1645+
if (strlen(trimmed) >=4 &&
1646+
isdigit91(trimmed[0]) &&
1647+
isdigit91(trimmed[1]) &&
1648+
isdigit91(trimmed[2]) &&
1649+
trimmed[3] == '}') {
16451650

16461651
A->g_altitude_ft = DW_METERS_TO_FEET((trimmed[0]-33)*91*91 + (trimmed[1]-33)*91 + (trimmed[2]-33) - 10000);
16471652

1648-
if ( ! isdigit91(trimmed[0]) || ! isdigit91(trimmed[1]) || ! isdigit91(trimmed[2]))
1649-
{
1650-
if ( ! A->g_quiet) {
1651-
text_color_set(DW_COLOR_ERROR);
1652-
dw_printf("Invalid character in MIC-E altitude. Must be in range of '!' to '{'.\n");
1653-
dw_printf("Bogus altitude of %.0f changed to unknown.\n", A->g_altitude_ft);
1654-
}
1655-
A->g_altitude_ft = G_UNKNOWN;
1656-
}
1657-
1658-
process_comment (A, mcomment+4, strlen(mcomment) - 4);
1653+
process_comment (A, trimmed+4, strlen(trimmed) - 4);
16591654
return;
16601655
}
16611656

1662-
process_comment (A, mcomment, strlen(mcomment));
1657+
process_comment (A, trimmed, strlen(trimmed));
16631658

16641659
} // end aprs_mic_e
16651660

src/deviceid.c

+7-2
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,11 @@ int main (int argc, char *argv[])
107107
assert (strcmp(comment_out, "Comment") == 0);
108108
assert (strcmp(device, "Kenwood TM-D710") == 0);
109109

110+
deviceid_decode_mice ("]\"4V}=", comment_out, sizeof(comment_out), device, sizeof(device));
111+
dw_printf ("%s %s\n", comment_out, device);
112+
assert (strcmp(comment_out, "\"4V}") == 0);
113+
assert (strcmp(device, "Kenwood TM-D710") == 0);
114+
110115

111116
// Modern MIC-E.
112117

@@ -622,13 +627,13 @@ void deviceid_decode_mice (char *comment, char *trimmed, size_t trimmed_size, ch
622627
strncmp_z(comment, // prefix from table
623628
pmice[n].prefix,
624629
strlen(pmice[n].prefix)) == 0 &&
625-
strncmp_z(comment + strlen(comment) - strlen(pmice[n].suffix), //suffix
630+
strncmp_z(comment + strlen(comment) - strlen(pmice[n].suffix), // possible suffix
626631
pmice[n].suffix,
627632
strlen(pmice[n].suffix)) == 0) ||
628633

629634
(strlen(pmice[n].prefix) == 0 && // Later
630635
(comment[0] == '`' || comment[0] == '\'') && // prefix ` or '
631-
strncmp_z(comment + strlen(comment) - strlen(pmice[n].suffix), //suffix
636+
strncmp_z(comment + strlen(comment) - strlen(pmice[n].suffix), // suffix
632637
pmice[n].suffix,
633638
strlen(pmice[n].suffix)) == 0) ) {
634639

0 commit comments

Comments
 (0)