Cool stuff for Raspberry Pi, Arduino and all electronics hobby projects

Is Witty Pi Compatible with Raspberry Pi 3?

YES! 🙂

If you are running Witty Pi with software version 2.16 or above, (usually) there is nothing to worry about and it should work with Raspberry Pi 3 out of the box.

However…

If you are running Witty Pi with older software (V2.15 or below), Your Witty Pi may refuse to turn on your Raspberry Pi 3 after a recent firmware upgrade. You press the button on Witty Pi, you see the red LED on Raspberry Pi just lights up and soon goes out. This looks exactly like the “dead lock” status on Witty Pi (old model), which may happen if you unplug the power directly after scheduling the auto-shutdown time. But indeed this is not “dead lock”, it is just a failed starting up.
If your Witty Pi is in this situation, please read on.

Why?

How comes the Witty Pi stops working after running the “sudo rpi-update” command?
This only happens on Raspberry Pi 3, which newly has Bluetooth module on board. After upgrading the firmware, the Bluetooth module is detected and get initialized on boot, and it will take the UART0, which was used for serial port communication. As a result, the GPIO 14 (TXD) and GPIO 15 (RXD) pins are mapped to UART1 instead, and GPIO14 gets pulled down by default. Since GPIO 14 (TXD) is the pin for Witty Pi to detect whether the operating system has been shutdown, pulling down GPIO 14 tells Witty Pi a wrong story and forces Witty Pi to cut the power.
The “gpio” utility from wiringPi can help us to understand what actually happened. Before upgrading the firmware, or using Witty Pi with other models, the pin status on boot look like this:
good_pin_stateAs you can see the TXD is in ALT0 mode and it gets pulled up by default (V=1).
Now checking this with on a Raspberry Pi 3 with newer firmware, you will see:

bad_pin_state
Now the TXD pin is in IN mode, and more importantly, it gets pulled down by default (V=0). This will force Witty Pi to cut power, and stop the procedure of turning on your Raspberry Pi 3.
You may also notice the GPIO 4 is also get pulled down by default now. It is a designed behavior, which will be triggered when TXD is low, and it will force Witty Pi to cut the power, just like holding the button without releasing it.

What to do?

The best way is to restore the default pin status on boot. This could be achieved by configuration of device tree. More specifically, we need to append this line to the /boot/config.txt file:

dtoverlay=pi3-miniuart-bt

This will force the Bluetooth to use mini-UART (ttyS0) and restore UART0/ttyAMA0 over GPIOs 14 & 15. After a reboot this configuration will take effect and you will see the GPIO pin status goes back to normal. Also you will see the GPIO 4 gets pulled up by default again.
If you have installed Witty Pi software V2.16 or above, the install script already takes care of this issue and you don’t need to fix it manually. If you are using V2.15 or below, you can still get and run the newer install script to have this problem fixed:

wget http://www.uugear.com/repo/WittyPi/installWittyPi.sh
sudo sh installWittyPi.sh

Without removing (or renaming) the “wittyPi” directory, running the install script will not update the software for Witty Pi. However, it will still fix this issue for you (after a reboot).

Update on 2016.05.31:

If you want to use Bluetooth, you may need to append “core_freq=250” to the “/boot/config.txt” file, then reboot your RPi3.

Update on 2017.03.31:

If there is “enable_uart=0” in the “/boot/config.txt” file, you will need to change it to “enable_uart=1“.

Update on 2018.01.16:

If you install the OS via NOOBS, it is another story then. Witty Pi couldn’t finish booting your Raspberry Pi because the boot menu of NOOBS postpones the booting, and Witty Pi thinks the OS has been shutdown and cut the power.  More details and possible workaround could be found on page 5 of the user manual.

See also

Join Waitlist We will inform you when the product arrives in stock. Please leave your valid email address below.