Skip to content

Add flipnCGM 1.0 — Abbott FreeStyle Libre CGM serial reader (NFC)#1061

Open
darendarrow wants to merge 3 commits into
flipperdevices:mainfrom
darendarrow:darendarrow/flipncgm_1.0
Open

Add flipnCGM 1.0 — Abbott FreeStyle Libre CGM serial reader (NFC)#1061
darendarrow wants to merge 3 commits into
flipperdevices:mainfrom
darendarrow:darendarrow/flipncgm_1.0

Conversation

@darendarrow
Copy link
Copy Markdown

@darendarrow darendarrow commented May 25, 2026

Application Submission

  • This application reads the serial number of Abbott FreeStyle Libre CGMs (continuous glucose monitor) via NFC. It reads the ISO 15693 NFC tag and decodes the 8-byte UID to a human-readable serial number.

How the serial number is decoded

FreeStyle Libre sensors store their serial number inside the NFC tag's 8-byte UID.
flipnCGM reads that UID passively over ISO 15693 — no sensor activation required —
and decodes it to the 9-character serial printed on the sensor packaging.

UID layout

Byte(s) Example Role
0 E0 Fixed ISO 15693 tag identifier
1 7A Abbott Diabetes Care manufacturer code
2–7 variable 48 bits encoding the serial number

Bytes 0 and 1 are checked first to confirm the tag is a genuine Abbott Libre before
decoding is attempted.

Decode steps

  1. Concatenate bytes 2–7 into a single 48-bit big-endian integer.
    For example, C2 1C C6 45 11 7A0xC21CC645117A.

  2. Extract nine 5-bit groups, reading from the most significant bits downward.
    (9 × 5 = 45 bits; the three most significant bits are always zero and are discarded.)
    Each group is a value in the range 0–31.

  3. Map each value through a 32-character alphabet:

    0123456789ACDEFGHJKLMNPQRTUVWXYZ
    

    The letters B, I, O, and S are omitted to avoid visual ambiguity on printed labels
    (B≈8, I≈1, O≈0, S≈5).

  4. The nine resulting characters are the serial number — e.g. 0R8FDDJ8J — identical
    to what Abbott prints on the sensor box and applicator.

Extra Requirements

  • None

Author Checklist (Fill this out)

  • I've read the contribution guidelines and my PR follows them
  • I own the code I'm submitting or have code owner's permission to submit it
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have validated the manifest file(s) with python3 tools/bundle.py --nolint applications/CATEGORY/APPID/manifest.yml bundle.zip

AI usage disclosure (Fill this out):

  • Partially AI assisted (clarify below which code was AI assisted and briefly explain what it does).

  • Fully AI generated (explain what all the generated code does in moderate detail).

  • All code was generated by Claude with human guidance and testing of the application against known CGMs to validate serial numbers were decoded the same.

Reviewer Checklist (Don't fill this out!)

  • Bundle is valid
  • There are no obvious issues with the source code
  • I've ran this application and verified its functionality

Copy link
Copy Markdown
Collaborator

@xMasterX xMasterX left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi, there's one issue with your code:
You need to use different path to save app related files
Change
/ext/flipncgm
To
/ext/apps_data/flipncgm
In all 3 defines where path is specified

@xMasterX xMasterX added the fixes needed Unresolved issues with the app requiring maintainer's attention label May 26, 2026
@darendarrow
Copy link
Copy Markdown
Author

Hi, there's one issue with your code: You need to use different path to save app related files Change /ext/flipncgm To /ext/apps_data/flipncgm In all 3 defines where path is specified

Updated.

@darendarrow darendarrow requested a review from xMasterX May 30, 2026 20:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

app (new) fixes needed Unresolved issues with the app requiring maintainer's attention

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants