2023 05 08


Reading time: about 1 minute

Passcodes for the APRS Internet System (APRS-IS)

If you want to fetch data from the APRS Internet System (APRS-IS), you can just connect to the servers and get the data streaming to you over a network socket. This part is super easy, and doesn’t need anything special.

If you want to send data to APRS-IS, there are two ways. The first way is to just send an APRS packet over VHF radio. There are many APRS repeaters, and many APRS receivers that stream data to APRS-IS. If you are not super isolated, your packets should end up in APRS-IS naturally.

The second way, and the one used by those internet feeders, is connecting to an APRS-IS server and writing the data directly into the stream. To do this, the server needs you to send a “passcode” associated with your callsign. The way to get this is to ask software authors for your passcode, presumably by showing them your amateur radio license.

The algorithm to generate these passcodes is a really simple one. Here is a JavaScript implementation that I wrote.

/**
 * Computes the APRS passcode of a given callsign.
 * @param {!string} callsign The callsign to compute the passcode of.
 * @returns {!string} The passcode.
 * @nosideeffects
 */
function computePasscode(callsign) {
  if (callsign.includes("-")) {
    callsign = callsign.split("-")[0];
  }

  callsign = callsign.toUpperCase();

  let h = 0x73e2;

  for (let i = 0; i < callsign.length; i += 2) {
    h ^= callsign.charCodeAt(i) << 8;
    h ^= callsign.charCodeAt(i + 1);
  }

  h &= 0x7fff;
  return h.toString().padStart(5, "0");
}

I also have a page on my website that can compute it for you. It is located at https://www.gkbrk.com/aprs-passcode.

Citation

If you find this work useful, please cite it as:
@article{yaltirakli,
  title   = "2023 05 08",
  author  = "Yaltirakli, Gokberk",
  journal = "gkbrk.com",
  year    = "2024",
  url     = "https://www.gkbrk.com/journal/2023-05-08"
}
Not using BibTeX? Click here for more citation styles.
IEEE Citation
Gokberk Yaltirakli, "2023 05 08", October, 2024. [Online]. Available: https://www.gkbrk.com/journal/2023-05-08. [Accessed Oct. 10, 2024].
APA Style
Yaltirakli, G. (2024, October 10). 2023 05 08. https://www.gkbrk.com/journal/2023-05-08
Bluebook Style
Gokberk Yaltirakli, 2023 05 08, GKBRK.COM (Oct. 10, 2024), https://www.gkbrk.com/journal/2023-05-08

Comments

© 2024 Gokberk Yaltirakli