You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The [PiSugar2](https://www.tindie.com/products/pisugar/pisugar2-battery-for-raspberry-pi-zero/) is a battery board for the Raspberry Pi Zero. It has an integrated [RTC chip](https://github.com/PiSugar/PiSugar/wiki/PiSugar2#hardware-specs) 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.
2
3
The PiSugar folks expect you to install [Pisugar Power Manager](https://github.com/PiSugar/pisugar-power-manager-rs), 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/1d67a232105b4dec2b10b2689f9cb89cc366d62f), so we can grab that and compile it as an out of tree module. You may be able to adapt these instructions for your use.
4
5
Normally to do this you'd download the kernel headers, compile and install and be happy. I wasn't able to get the kernel headers for the kernel shipped with pwnagotchi working for me, so instead I did this against the full kernel source tree.