JEEFS EEPROM header parser (JetHome EEPROM File System)
Project description
JEEFS Header — Python Package
Pure Python library for parsing and generating JEEFS EEPROM headers. The main API class EEPROMHeaderV3 handles v3 headers; constants and field offsets for all versions (v1/v2/v3) are available via jeefs.constants. No native dependencies.
Installation
pip install jeefs
Dependencies
- Python >= 3.10
- No external runtime dependencies (uses stdlib
struct,binascii)
Building / Development
cd python
uv venv .venv && uv pip install -e ".[test]"
.venv/bin/python -m pytest tests/ -v
API
EEPROMHeaderV3 — main dataclass
from jeefs.header import EEPROMHeaderV3
Creating a header
header = EEPROMHeaderV3(
boardname="JetHub-D1p",
boardversion="2.0",
serial="SN-2024-001",
mac="F0:57:8D:01:02:03",
)
binary = header.to_bytes() # 256-byte binary
Parsing from binary
header = EEPROMHeaderV3.from_bytes(raw_data)
print(header.boardname) # "JetHub-D1p"
print(header.mac) # "F0:57:8D:01:02:03"
print(header.serial) # "SN-2024-001"
CRC verification
# Instance method
header = EEPROMHeaderV3.from_bytes(data)
is_valid = header.verify_crc(data)
# Static method (no instance needed)
is_valid = EEPROMHeaderV3.verify_crc_static(data)
Validation
errors = header.validate()
if errors:
print("Invalid:", errors)
Partition image
image = header.to_partition_image() # 4096-byte flash image
Fields
| Field | Type | Description |
|---|---|---|
boardname |
str |
Board name (max 31 chars) |
boardversion |
str |
Board version (max 31 chars) |
serial |
str |
Serial number (max 31 chars) |
usid |
str |
CPU eFuse USID |
cpuid |
str |
CPU ID |
mac |
str |
MAC address ("AA:BB:CC:DD:EE:FF") |
signature |
bytes |
ECDSA signature (raw r||s) |
signature_algorithm |
SignatureAlgorithm |
NONE / SECP192R1 / SECP256R1 |
timestamp |
int | None |
Unix timestamp (auto-set if None/0) |
SignatureAlgorithm enum
from jeefs.constants import SignatureAlgorithm
SignatureAlgorithm.NONE # 0
SignatureAlgorithm.SECP192R1 # 1 (48-byte signature)
SignatureAlgorithm.SECP256R1 # 2 (64-byte signature)
Constants
from jeefs.constants import (
EEPROM_MAGIC, # b"JETHOME\x00"
EEPROM_HEADER_SIZE, # 256
EEPROM_FIELDS, # dict of {field: (offset, size)}
EEPROM_CRC_COVERAGE, # 252
EEPROM_PARTITION_SIZE, # 4096
)
Usage example
See examples/python/read_header.py — reads an EEPROM binary, prints version, CRC status, board name, MAC address, and full v3 fields.
Testing
cd python
python -m pytest tests/ -v # 58 tests
Format specification
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file jeefs-0.1.3.tar.gz.
File metadata
- Download URL: jeefs-0.1.3.tar.gz
- Upload date:
- Size: 12.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
681e4f19ce166f685ad8fd1eb6661d11b174693048c4c9d2c5d827363696dc9d
|
|
| MD5 |
b20481c419fe72e92c613069ce83f9fd
|
|
| BLAKE2b-256 |
f77cd3151303708800b5a09c25b5ee2cb9ebc5e87cb03875cfbdbd19967f5546
|
Provenance
The following attestation bundles were made for jeefs-0.1.3.tar.gz:
Publisher:
ci.yml on jethome-iot/jeefs
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
jeefs-0.1.3.tar.gz -
Subject digest:
681e4f19ce166f685ad8fd1eb6661d11b174693048c4c9d2c5d827363696dc9d - Sigstore transparency entry: 991701972
- Sigstore integration time:
-
Permalink:
jethome-iot/jeefs@c936651d84aec37166d738120184d18caf4a4c83 -
Branch / Tag:
refs/tags/v0.1.3 - Owner: https://github.com/jethome-iot
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
self-hosted -
Publication workflow:
ci.yml@c936651d84aec37166d738120184d18caf4a4c83 -
Trigger Event:
push
-
Statement type:
File details
Details for the file jeefs-0.1.3-py3-none-any.whl.
File metadata
- Download URL: jeefs-0.1.3-py3-none-any.whl
- Upload date:
- Size: 8.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
babe0698ac5883043471519a33787d1a6f53f0c2c41c8b50cc2bedd9b92affb0
|
|
| MD5 |
31e70fcdf6b98296f8eaf96fa17976c2
|
|
| BLAKE2b-256 |
f6dba0e49677e291cd60b636df2343c8ff7107b5d0a81db543acb51feeb0ca80
|
Provenance
The following attestation bundles were made for jeefs-0.1.3-py3-none-any.whl:
Publisher:
ci.yml on jethome-iot/jeefs
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
jeefs-0.1.3-py3-none-any.whl -
Subject digest:
babe0698ac5883043471519a33787d1a6f53f0c2c41c8b50cc2bedd9b92affb0 - Sigstore transparency entry: 991701973
- Sigstore integration time:
-
Permalink:
jethome-iot/jeefs@c936651d84aec37166d738120184d18caf4a4c83 -
Branch / Tag:
refs/tags/v0.1.3 - Owner: https://github.com/jethome-iot
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
self-hosted -
Publication workflow:
ci.yml@c936651d84aec37166d738120184d18caf4a4c83 -
Trigger Event:
push
-
Statement type: