Skip to main content

Posts

Showing posts with the label Raspberry Pi

Scripting Namecheap Dynamic DNS (DDNS) Updates on Linux/Raspberry Pi

  If you host services on a Raspberry Pi or a Linux home lab, you likely face the "dynamic IP" problem. Your ISP rotates your public IP address, breaking external access to your Nextcloud, Plex, or VPN server. While Namecheap is a popular registrar, their official Dynamic DNS client is Windows-only. This leaves Linux administrators relying on forum-found "one-liners" or fragile cron jobs. These often result in silent failures, IP detection timeouts, or even IP bans from Namecheap due to excessive API polling. This guide provides a production-grade Bash solution to reliably update Namecheap DDNS records, handle errors gracefully, and maintain high availability for your home services. The Anatomy of the DDNS Failure Before implementing the fix, it is critical to understand why standard  curl  commands often fail in long-running home environments. 1. The "Hairpin" and Reflection Issue A basic update script usually looks like this:  curl "https://dynamicd...

Why `RPi.GPIO` Fails on Raspberry Pi 5 (And How to Fix It)

  If you recently unboxed a Raspberry Pi 5, flashed Raspberry Pi OS Bookworm, and attempted to run your trusty Python scripts, you likely hit a wall. Scripts that have run reliably on the Pi 3 and 4 for years are suddenly throwing   RuntimeError: No access to /dev/mem ,   ModuleNotFoundError , or worse—running silently without actually toggling any pins. The industry-standard library  RPi.GPIO  is dead on the Raspberry Pi 5. Here is the architectural reason why, and the code-complete paths to get you back up and running. The Root Cause: The RP1 Southbridge To understand why your code broke, you have to look at the silicon. On Raspberry Pi models 1 through 4, the GPIO pins were controlled directly by the main Broadcom System-on-Chip (SoC). Libraries like  RPi.GPIO  worked by memory-mapping ( mmap ) specific physical addresses on the SoC to toggle bits directly. This was fast, but it was a "dirty" hack that bypassed the Linux kernel's subsystems. The Ras...