I've connected WittyPi2 (an RTC Power Management hat) to my Pi Zero W - but I'm constantly getting failures in the log, to do with the I2C communication:

I2C read 0x01 0x68 0x09 failed (result=), and no more retry
I2C write 0x01 0x68 0x09 21 failed (result=), and no more retry

WittyPi2 runs schedules to start-up and shutdown the Pi at set intervals. The Pi can do one round of shutdown/start-up, but after this point the I2C errors begin. The Pi is running Raspbian Stretch, flashed.

The Pi was bought with pre-soldered headers, and the GPIO pins are all responding how they should - so I don't believe it's a physical problem. I've also tried this on a number of Zero Ws now with the same result. However, this works absolutely fine on my 3B.

Running 'i2cdetect -y 1' in the terminal shows 'UU' in the 68 channel.

I've tried playing around with different things in the /boot/config.txt file (e.g. dtparam=i2c_arm=on), including, as per WittyPi suggestions for the Pi 3, 'enable_uart=1'. I'm still getting I2C read and write errors.

If anybody has any suggestions at all, I'd be very very very grateful! :-)



  • 1
    Why are you trying to write directly to the I2C device when a kernel driver owns it. Use the kernel interface to write to it. (Note: I'm assuming 0x68 is a RTC, sudo hwclock with various operands should read or write t it.)
    – Dougie
    May 27, 2019 at 22:11
  • I have had problems with RPZ as well, not only bad conections, but 2 RPzw DIED after using wittypiMini. I am not sure if the vendor has tested it properly using Rpzw, because I have been in trouble for many many times, and the same unit that burned my rpzw worked fine on Rpi3. Feb 16, 2020 at 4:00

1 Answer 1



  1. WittyPi2 on Pi Zero W Raspbian Stretch - I2C read / write fail

  2. The Pi can do one round of shutdown/start-up, but after this point the I2C errors begin.

  3. However, this works absolutely fine on my 3B.


Well, if WittyPi2 works well with Rpi3B but not RpiZero stretch, then the problem is with RpiZero.

The WittyPi2 user guide says their software is tested with jessie. If your Rpi3 uses jessie, but RpiZerp uses stretch, then it is likely that the software is not compatible with stretch.

One more thing is that the user guide says i2cdetect -y 1 should detect RTC DS3231 address of 0x68 (or also 0x57). If you see UU, then it is likely that you have some DT overlay thing confusing Raspbian.



Witty Pi 2 RTC & Power Management for Raspberry Pi Boards - UUGear CAD $32


WittyPi2 User Manual

The software of Witty Pi 2 has been tested under Raspbian Jessie. Raspbian Wheezy should also work, but it is better to use Jessie as it will be much easier to install Qt 5, which is required by the (optional) GUI of the software.

If you have installed the OS with NOOBS, please make sure to skip the boot menu. Otherwise the boot menu will postpone the booting long enough to make Witty Pi 2 think the system is down and then cut the power (so your Raspberry Pi will not boot).

Please notice that sudo is necessary to run this script. This script will automatically do these tasks in sequence:

  1. Enable I2C on your Raspberry Pi

  2. Install i2c-tools, if it is not installed yet

  3. Configure Bluetooth to use mini-UART (Raspberry Pi 3 only)

  4. Install wiringPi, if it is not installed yet

  5. Install Witty Pi programs, if they are not installed yet

  6. Remove fake-hwclock and disable ntpd daemon

  7. Install Qt 5, if it is not installed yet (it is optional, and is for Jessie only) The fake-hwclock package is no longer needed as you have a real hardware clock now. Removing fake-hwclock package can avoid some potential problems (e.g. this one). Also the ntpd daemon should be disabled to avoid corrupting the RTC time. Disabling ntpd will not affect the NTP (Network Time Protocol) time synchronization as Witty Pi software will explicitly query NTP time and then update to system and RTC.

The Qt 5 installation is for the GUI only. If you don?t plan to use it, you can skip this step for now, as Qt 5 installation will take a while.

You will then see a new “wittyPi” directory, and it contains 5 runnable files… viz.:

Software Update/Uninstallation

If you want to update the software to newer version, you don?t have to uninstall it first. Just remove or rename your “wittyPi” directory and repeat the installing process, then you are all set.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.