AX.25 Amateur Radio Link-Layer Protocol
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

OCaml 66.3%
C 21.3%
Python 4.9%
PHP 1.4%
Dune 1.0%
Roff 0.5%
Shell 0.3%
Other 4.3%
57 1 0

Clone this repository

https://tangled.org/gazagnaire.org/ocaml-ax25 https://tangled.org/did:plc:jhift2vwcxhou52p3sewcrpx/ocaml-ax25
git@git.recoil.org:gazagnaire.org/ocaml-ax25 git@git.recoil.org:did:plc:jhift2vwcxhou52p3sewcrpx/ocaml-ax25

For self-hosted knots, clone URLs may differ based on your setup.

Download tar.gz
README.md

Pure OCaml implementation of the AX.25 Link Access Protocol for amateur radio packet communications.

Supports:

  • Callsign parsing and validation (with SSID 0-15)
  • Address encoding/decoding with digipeater support
  • Control field types: I, RR, RNR, REJ, UI, SABM, DISC, UA, DM, FRMR
  • Protocol identifiers: No_layer3, IP, ARP, FlexNet, NET/ROM
  • CRC-16-CCITT frame check sequence
  • HDLC framing with bit stuffing
  • KISS TNC protocol framing

Installation#

Install with opam:

$ opam install ax25

If opam cannot find the package, it may not yet be released in the public opam-repository. Add the overlay repository, then install it:

$ opam repo add samoht https://tangled.org/gazagnaire.org/opam-overlay.git
$ opam update
$ opam install ax25

Usage#

open Ax25

(* Create a UI frame *)
let src = callsign_exn ~call:"N0CALL" ~ssid:1
let dst = callsign_exn ~call:"CQ" ~ssid:0
let frame = ui_frame ~src ~dst (Bytes.of_string "Hello!")

(* Encode for transmission *)
let encoded = kiss_encode frame

(* Decode received frame *)
let () =
  match kiss_decode encoded with
  | Ok frame -> Format.printf "%a@." pp frame
  | Error e -> Format.printf "Error: %a@." pp_error e

Reference#