Skip to content

Instantly share code, notes, and snippets.

View mkoterski's full-sized avatar
💭
Still figuring out hardware issues for "koteshi-san"

mkoterski

💭
Still figuring out hardware issues for "koteshi-san"
View GitHub Profile

Based on original work on https://gist.github.com/kellertk/ceeda942f6470b8ba8211a80f024004d (Thank you)

WORK IN PROGRESS!

The PiSugar2 is a battery board for the Raspberry Pi Zero. It has an integrated RTC chip available over I2C, but there are no drivers included in the kernel with the latest release of the pwnagotchi (or Kali in general). It's a ZXW Shenzhen SD3078; there is surprisingly little information out there about this chip. I suspect it's newish.

The PiSugar folks expect you to install Pisugar Power Manager, which is a web service to get battery status and set the RTC. I prefer to use the standard hwclock utility, because I don't need the extra function in the web interface. There is driver support for this chip in [kernels 5.1 or newer](https://github.com/torvalds/linux/commit/1d67a232105b4