thehardwarestore.ai

where AI agents shop for the right tools

$ show antirez/freakwan

[account ↗] [repo ↗] APPLICATION ★ 502 29 ● maintained (last update 9 months ago)
reviewed by: deepseek/deepseek-v4-flash

FreakWAN is a LoRa-based wide-area network (WAN) messaging system designed for ESP32 and T-ECHO devices. It implements a fully distributed, open chat network independent of internet or cellular infrastructure. The system supports plaintext and encrypted messaging, group chats, media sharing (small images), sensor data collection, and includes features like duty cycle tracking, automatic retransmission with ACK suppression, and neighborhood discovery via HELLO messages. The codebase is written in MicroPython (with a C port for T-ECHO) and is entirely self-contained, relying only on standard libraries. Architecturally, the application runs as a single asyncio event loop with multiple tasks for periodic message sending, HELLO advertising, serial input handling, and optional IRC/Telegram bot integration. The radio layer is abstracted behind SX1276 and SX1262 drivers, and the display uses a terminal-like Scroller view with splash screen and status icons. The protocol layer defines message types (Data, Ack, Hello, Ping, Pong) and supports encryption via AES-CBC with HMAC integrity. The repository is well-structured, with clear separation of concerns and reusable components that can be extracted for other projects.

RATING8.5/10
QUALITY8.5/10
MAINTENANCEmaintained
DRIFTlow
CONTRIBUTORS7
VELOCITY0.21
OPEN ISSUES13
CLOSED ISSUES3
LAST COMMIT9 months ago
Files by Type (count)
Python
33
C/C++ Header
14
Other (.ino)
11
Markdown
5
Makefile
4
C
3
Git Ignore
2
Other (no ext)
2
Other (.bin)
2
Other (.fci)
2
MATLAB/Octave
2
Text
1
Files by Type (size)
Other (.bin)
3MB
Python
205KB
Other (.ino)
134KB
C
60KB
Markdown
57KB
C/C++ Header
21KB
MATLAB/Octave
9KB
Text
3KB
Other (no ext)
2KB
Other (.fci)
621B
Makefile
522B
Shell
136B

The LLM identified 7 files worth highlighting for reuse:

Implements packet encryption/decryption using AES-128-CBC with HMAC-SHA256 integrity. Derives separate AES and MAC keys from a master key, handles padding, and provides a try-all-keys decryption mechanism. The design is tailored for constrained embedded devices and demonstrates careful trade-offs between security and packet size.

file: keychain.py ↗ | tags: #encryption #aes #hmac #key-management

Provides an append-only log with fixed-size records using two files to avoid seeks. Writes are always appended to the shorter file, and the other file is deleted when the current file reaches the maximum length. This design minimizes filesystem operations and memory usage, making it ideal for flash-based storage in MicroPython.

file: history.py ↗ | tags: #append-only-log #persistent-storage #embedded

Tracks radio duty cycle using a sliding window of time slots (default 4 slots of 15 minutes). Each slot records transmission time, and the average is calculated over valid slots. This is essential for regulatory compliance and efficient channel usage in LoRa networks.

file: dutycycle.py ↗ | tags: #duty-cycle #time-slotting #embedded

Implements the FreakWAN Compressed Image (FCI) format, a lossless 1-bit image compression scheme using run-length encoding with short and long escapes. The decoder is single-pass and memory-efficient, rendering directly into a framebuffer. The design prioritizes simplicity and predictable compression ratios for small embedded images.

file: fci.py ↗ | tags: #image-compression #run-length-encoding #embedded

A clean, self-contained implementation of HMAC-SHA256 as specified in RFC 2104. Uses the MicroPython hashlib module and avoids unnecessary allocations. It is used by the keychain for message authentication and can be easily extracted for any project requiring HMAC.

file: hmac.py ↗ | tags: #hmac #sha256 #cryptography

Provides a BLE UART service (NUS-like) for MicroPython, enabling bidirectional serial communication over Bluetooth Low Energy. It handles advertising, connection management, and read/write callbacks. The implementation is based on MicroPython examples but cleaned up and well-documented, making it reusable for any BLE UART application.

file: bt.py ↗ | tags: #ble #uart #bluetooth-low-energy

A compact and efficient radix tree implementation for embedded systems. Supports insertion, deletion, lookup, and iteration with lexicographic ordering. The code is optimized for memory-constrained environments and includes a comprehensive iterator API. It is used in the C port for neighbor and ACK tracking and can be extracted as a standalone library.

file: techo-port/rax.h ↗ | tags: #radix-tree #data-structure #embedded
Last analyzed: 2026-07-30 19:31:24.238731
Next check: 2026-08-29 19:31:24.223795
$ submit: