u/abonforti

Image 1 — Rebuilt my pwnagotchi, ended up fixing more than I planned
Image 2 — Rebuilt my pwnagotchi, ended up fixing more than I planned
Image 3 — Rebuilt my pwnagotchi, ended up fixing more than I planned
Image 4 — Rebuilt my pwnagotchi, ended up fixing more than I planned

Rebuilt my pwnagotchi, ended up fixing more than I planned

I told myself I was done with these things. Two years later there is a Zero 2W laying around my place again, so here we are.

Hardware

  • Raspberry Pi Zero 2W, jayofelony 2.9.5.6 (64bit)
  • Waveshare 2.13" V3 e-ink, rotated 180
  • PiSugar 3 battery HAT
  • Temporary case

Nothing exotic. The interesting part turned out to be everything around it.

Things I ended up changing

  • A third mode between AUTO and MANU. I wanted it to keep listening in places where I would rather not transmit at all. So: recon yes, deauth no,association no, mesh advertising no. It is a plugin plus the PiSugar custom button to toggle it, and the state survives a reboot. So welcome PASV.

  • The PiSugar RTC is a DS3231. It shows up on the same I2C bus as the battery MCU, so with one overlay line it becomes /dev/rtc0 and the unit stops booting in 1970. That also fixes TLS failing on first boot before NTP catches up, which had been quietly annoying me.

  • Networking with more than one way out. The Zero has a single data port, so the USB gadget is the management path. On top of that there are three Bluetooth PAN uplinks (desktop, laptop, phone), all up at once, picked by route metric: cable first, then the machine that is always on, then the laptop, then the phone last because that one costs data (and most importantly, battery).

  • The catch was that letting NetworkManager auto-retry absent devices wedged the Bluetooth controller outright, every HCI command timing out until a reboot. Fix was to stop guessing: a small timer probes with l2ping first and only connects to something that actually answered.

  • Encrypted off-device backups. The unit's own backup archive contains its SSH key and every handshake it ever caught, and it was sitting on the SD card only. Now it gets encrypted with age against a public key and pushed to object storage on a timer. The private key is not on the device, so a lost unit cannot read its own backups.

  • A few fixes sent upstream. Nothing dramatic, mostly small things I hit while poking around: the Bluetooth status indicator latching onto the first device it ever saw, a plugin logging a hardcoded interval instead of the configured one, a URL built with the wrong operator precedence.

  • Way too much overcharging of the screen, but I like this way.

Still open

  • No case, founf this one, it's made for the PiSugar2 and Waveshare V4, doesn't fit perfectly, hence, it bothers me. Will work for now..maybe i'll design a better one. It's so hard to find one for this exact combo. I managed to superglue couple of strong magnets in the lanyard cap just because why not.
  • No GPS yet, though I have picked the module, just waiting for it.
  • Battery life measured tonight for the first time, no idea what to expect

Happy to go into detail on any of it. Curious what other people are doing for the "it is in my bag just in case" case, since that is what started all of this.

u/abonforti — 6 days ago