Skip to content

Instantly share code, notes, and snippets.

@ParkWardRR
ParkWardRR / orange-pi-4a-GPU-NPU-mali-g57-vip9000-llm-yolov5-acceleration-guide.md
Last active June 3, 2026 17:14
Orange Pi 4A GPU + NPU acceleration guide for running LLMs on the Mali-G57 with Mesa Rusticl + MNN and YOLOv5 on the VIP9000 NPU, including the NPU driver rebind fix, parallel GPU/NPU setup, and real benchmarks like 0% CPU LLM inference and 206ms object detection.

Orange Pi 4A GPU + NPU Acceleration Guide — LLMs on Mali-G57, YOLOv5 on VIP9000

Run LLMs at 0% CPU on the GPU and object detection in 206ms on the NPU — both on the same Orange Pi 4A. This guide covers building Mesa + MNN from source, fixing the broken NPU driver, and running both accelerators in parallel.

Hardware

Component Spec Status
Board Orange Pi 4A
SoC Allwinner T527 (8× Cortex-A55 @ 1.8GHz)
@ParkWardRR
ParkWardRR / thermal-printer-buffer-overflow.md
Created June 1, 2026 17:58
Thermal Printer Buffer Overflow — the hardest bug, 4KB receive buffer, 48-row strip solution

🔥 Thermal Printer Buffer Overflow: The Hardest Bug

Overview

The Epson TM-M30II has a 4KB receive buffer. Send data too fast → buffer overflow → gibberish and crash. Send data too slow → visible horizontal banding where the print head paused.

Think: pouring water into a cup with a hole in the bottom. Too fast overflows. Too slow leaves pour-marks.

The fix: make each raster strip fit inside the 4KB buffer.

@ParkWardRR
ParkWardRR / photo-optimization-thermal.md
Created June 1, 2026 17:58
Photo Optimization for Thermal Printers — adaptive tone curves, 4-zone brightness model, Atkinson/Stucki/Sierra dithering

📸 Photo Optimization for Thermal Printers

Overview

The Problem

Thermal printers can only print black or white — no gray, no color. Every pixel is a binary decision. Reproducing a photograph means compressing 256 brightness levels into 2.

The Pipeline

@ParkWardRR
ParkWardRR / iPod 30-pin MFi authentication reverse engineering plan for Apple composite AV cable and donor accessories including dual 30-pin passthrough wiring internal MCU-to-auth coprocessor bus sniffing iAP frame capture UART and I2C logging chip transplant a
Created May 19, 2026 07:27
Deep technical guide for reverse engineering Apple 30-pin MFi authentication using composite AV cable donors, including full pinout context, dual 30-pin passthrough wiring, how to sniff iAP over dock UART, how to find and probe the internal donor MCU-to-authentication-coprocessor bus (likely I2C), practical use of cheap FX2 USB logic analyzers a…

A. What to hook up (concise but complete)

Goal: observe a real 30-pin auth sequence end-to-end, then be able to move the auth IC to your own board.

A1. Blocks you need

  • Host device: iPod / iPhone / iPad with 30-pin dock.
  • Donor: Apple 30-pin composite AV cable (e.g., MC748ZM/A, MB129LL/A). These are documented to contain a small 8‑pin auth IC in the dock hood plus an accessory MCU.
  • Edge MCU: 3.3 V microcontroller board for later experiments (Raspberry Pi Pico / Pico W / Pico WH is ideal).
  • Logic analyzer: Cheap 8‑channel 24 MHz USB logic analyzer (CY7C68013A/FX2-based “Saleae clone”).
@ParkWardRR
ParkWardRR / mfi-dual-connector-hypothesis.md
Created May 7, 2026 14:41
MFi Auth Hypothesis: Dual 30-Pin Passthrough for Digital USB Audio

Teuta DT-1 — MFi Auth Hypothesis: Dual 30-Pin Passthrough for Digital USB Audio

Project Summary

Teuta DT-1 is an open-hardware iPod digital transport. Goal: extract Red Book digital audio (16-bit/44.1kHz PCM) from an iPod Classic via its 30-pin male dock port, route it through a hi-fi DAC (DACBerry ONE+ — WM8804 + PCM5142), output analog.

  • MCU: STM32F405RGT6 (WeAct Core Board)
  • Audio path: iPod → USB UAC1 (pins 15/16) → STM32 → I²S DMA → DACBerry ONE+ → analog out
  • Control path: iAP over USB HID + serial UART fallback (pins 12/13)
  • Power: USB-C PD via RotoPD (AP33772S)
@ParkWardRR
ParkWardRR / apple-30pin-mfi-authentication-chip-testing-board-complete-hardware-specification-and-bom.md
Last active May 5, 2026 14:07
Complete hardware design specification, bill of materials, and assembly instructions for a custom PCB to interface Apple 30-pin accessories with Raspberry Pi for MFi authentication chip analysis. Features include: INA219 current monitoring on 3.3V and 5V rails, I2C/UART serial communication for authentication protocol capture, USB digital audio …

Project Name: 30-Pin MFi Accessory Testing & Analysis Board


Overview

Purpose: Interface between Apple 30-pin accessories (MB129LL/A cables, docks) and Raspberry Pi for MFi chip authentication analysis, digital audio extraction, and accessory feature testing.

Design Approach: Two-board system

  1. APPLE-30F-BO-V1A (pre-made, $12.98) - Female 30-pin connector with 2x15 pin headers
@ParkWardRR
ParkWardRR / engenius-ecs2512fp-failure-report.md
Last active May 4, 2026 15:35
EnGenius ECS2512FP hardware failure forensic report: Realtek RTL9302C ASIC lockup diagnosis with serial console capture, NAND bad block analysis, and load-dependent crash reproduction. Documents progressive management plane failure on an 8-port 2.5GbE PoE+ managed switch with 10G SFP+ uplink — crash intervals degraded from 40 minutes to 13 secon…

EnGenius ECS2512FP — Hardware Failure Forensic Report

Date: May 2026
Status: 🔴 HARDWARE FAILURE CONFIRMED — Unit Condemned
Replacement: TP-Link SG3210XHP-M2 (Omada) — deployed and stable


Verdict

@ParkWardRR
ParkWardRR / 10gbe-fiber-vs-cat6-benchmark.md
Last active April 28, 2026 20:46
A controlled A/B benchmark comparing a 75-foot SFP+ fiber backbone against a 75-foot Cat6 copper run on a 10 Gigabit Ethernet homelab network. Both paths tested from the same endpoint to the same server, back-to-back, using identical methodology.

10GbE SFP+ Fiber vs Cat6 Copper Benchmark

75ft SFP+ fiber (via access switch) vs 75ft Cat6 (direct to core). Same endpoint, same server, same script, back-to-back.

Throughput: identical. Stability: fiber wins.

Results

Metric Fiber Cat6 Winner
@ParkWardRR
ParkWardRR / m920q-frigate-gpu-deployment.md
Last active April 25, 2026 07:33
Running Frigate NVR with Full GPU Acceleration on a Lenovo M920q + Quadro P1000 — deployment guide, CUDA Graphs compatibility, Podman vs Docker, ONNX model selection, and lessons learned

Frigate NVR + Quadro P1000 on a Lenovo M920q — Full GPU Acceleration

End-to-end GPU-accelerated NVR on a $90 used desktop: NVDEC video decode + ONNX/CUDA object detection across 6 cameras, with semantic search, face recognition, and LPR — all on a 4 GB Quadro P1000 at 49% VRAM. Replaces a $300/yr cloud NVR subscription.

Covers: ONNX model selection & the CUDA Graphs trap, Podman Quadlet for systemd-native NVR, Synology RTSP token gotchas, and Prometheus/Grafana monitoring.


Architecture

@ParkWardRR
ParkWardRR / xpenology-to-proxmox-hba-passthrough.md
Created April 23, 2026 21:40
Notes from migrating a production NAS running bare-metal Xpenology (DSM on generic hardware) to a Proxmox VM using ARC loader and full HBA passthrough. 76 TB across 3 RAID arrays on a Lenovo SA120 DAS. Zero data migration — the drives never moved, only the hypervisor changed.

Migrating Bare-Metal Xpenology to Proxmox VM with HBA Passthrough

Notes from migrating a production NAS running bare-metal Xpenology (DSM on generic hardware) to a Proxmox VM using ARC loader and full HBA passthrough. 76 TB across 3 RAID arrays on a Lenovo SA120 DAS. Zero data migration — the drives never moved, only the hypervisor changed.

The Setup

  • Motherboard: Gigabyte Q670M D3H DDR4
  • CPU: Intel i7-13700T (24 threads)
  • RAM: 128 GB DDR4
  • HBA: LSI SAS 9300-8e (SAS3008, IT mode) → Lenovo SA120 DAS (11 drives, 76 TB)