Skip to content

Instantly share code, notes, and snippets.

View philpem's full-sized avatar

philpem

View GitHub Profile
@philpem
philpem / mptcheck.c
Created March 28, 2025 21:43
MPT1327/MPT1343 Check Byte calculation
// This code takes the Electronic Serial Number (ESN) of an MPT1327 radio and calculates the 8-bit Check Byte
// as defined in MPT1343 section 7.
// This algorithm was formerly secret - one would have to ask the Radiocommunications Agency for a copy.
//
// The original intent was to stop radios from being illicitly cloned using only tha information on the label.
// Unfortunately the radio transmits the check byte (the whole thing) as part of the network registration sequence,
// so it does precisely nothing if you can sniff a radio registraion request on the control uplink channel.
//
// These days it's of historical interest, or of interest to people who are curious about MPT1327/MPT1343 (or whether
// their fellow hams have figured out how to change their radios' ESNs... if you know any hams using MPT/Taitnet kit)
@philpem
philpem / rp2040_sdlc.pio
Last active September 16, 2024 16:55
SDLC in Pi 2040 PIO
; This is a first pass attempt at making a Pi Zero PIO module handle zero-bit stuffing and flag transmission
; It will need cycle delays adding, etc. to turn it into usable code.
; I got half-way through it, then realised it wasn't going to work for my use case (NABU Adaptor packet generation) because
; the NABU Adaptor has a LFSR-based bitstream randomizer (scrambler) after the SDLC block.
;
; Set up autopull, and a bit length of 9 (if such a thing is possible, I haven't checked).
; The first bit shifted is a 0 for normal data, or a 1 for 'raw' sending, which is used to send flags (0x17E).
.program sdlc
.side_set 1
@philpem
philpem / hyperbolic.ipynb
Last active December 4, 2018 12:19
Hyperbolic radio navigation proofs
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@philpem
philpem / rrcfilter.ipynb
Created October 19, 2018 14:36
Root raised cosine filter using SciPy
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@philpem
philpem / si44xxClE.ipynb
Created October 19, 2018 13:15
Si44xx Class E matching (Jupyter notebook)
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

Keybase proof

I hereby claim:

  • I am philpem on github.
  • I am philpem (https://keybase.io/philpem) on keybase.
  • I have a public key ASBkTwASXx0xo0kS4P1bKk8l5bz7sZGLHDr6hUxO87ytWwo

To claim this, I am signing this object: