GoPro HERO 4/3+ Power Mod

While the GoPro HERO is nice and small, a consequence of this small size is poor battery life. Battery backpacks can help extend the run-time. However, they can be finicky and do not add that much to the device run-time. Another solution is using a power cable. Preferably, one that plugs into the HERO port so that a case can be used. Continue reading

Breadcrumb NavXT and WooCommerce Compatibility Tips

In general, Breadcrumb NavXT, due to its use of the WordPress API, is compatible with other plugins such as WooCommerce. Occasionally, this is not enough and additional code is required for proper functionality. Other times, as with WooCommerce, proper settings configuration is sufficient.

What You Need

These are the plugins and versions used when performing the testing reported on within this article:

  • WooCommerce – At the time this article was written, 3.1.0 was the latest available version and was the version tested against.
  • Breadcrumb NavXT – Tested against a development release of 5.7.1.

What Works

Since WooCommerce is relatively well behaved, Breadcrumb NavXT can easily generate the expected breadcrumb trail for WooCommerce resources. However, depending on how WooCommerce is setup, Breadcrumb NavXT may need a couple of settings to be changed. In general, the following settings changes are recommended for WooCommerce users:

  • Ensure that the “Products Root Page” in the Breadcrumb NavXT settings page (Settings > Breadcrumb NavXT > Post Types) is set to the same page as the “Shop page” setting in WooCommerce (WooCommerce > Settings > Products > Display).
  • Ensure that “Product Archive Display” is unchecked.
  • Ensure that “Product Hierarchy Display” is checked.

Other Notes

One thing to keep in mind: when changing the “Shop page” in WooCommerce, the “Products Root Page” in Breadcrumb NavXT will likely need to be changed as well. Otherwise, the Products page in the breadcrumb trail will not match the WooCommerce shop page.

-John Havlik

[end of transmission, stay tuned]

A Decade of Breadcrumbs

Ten years a go, I released the first version of Breadcrumb Navigation XT after adopting it from its original maintainer, Michael Woehrer. At that time, I did not fathom the journey I would take with it.

Within the first few months after adopting Breadcrumb Navigation XT, a settings page was added and it took on a new name (now known as Breadcrumb NavXT). Fast forward to today, it has been rewritten from the ground up twice (in 2.0 and 3.0), translated into 18+ languages (counting >80% translation completeness), downloaded more than 4 million times, and used on over 600 thousand sites.

In commemoration of this anniversary, Breadcrumb NavXT 5.7.1 was released today. Originally, the intent was for Breadcrumb NavXT 6.0 to be released. However, Breadcrumb NavXT 6.0 is not ready yet, and a fall release is a more realistic target.

Lastly, in August, I will be giving a presentation at WordCamp Minneapolis/St. Paul 2017 covering the highlights of my decade long journey with Breadcrumb NavXT.

-John Havlik

[end of transmission, stay tuned]

Breadcrumb NavXT 5.7.1

This is the first, and hopefully only, bug fix release of the 5.7 branch of Breadcrumb NavXT. Two bugs were fixed in this release. One relating to the bcn_display_json_ld() function and the other pertaining to the injection of separators in the breadcrumb trail.

Breadcrumb NavXT 5.7.0 introduced the new bcn_display_json_ld() function. However, there was erroneous instance of $linked that caused a PHP warning. This has been resolved in Breadcrumb NavXT 5.7.1.

The second bug involved missing breadcrumb separators after removing a breadcrumb from the trail. Breadcrumb NavXT 5.7.1 uses an improved method of determining when to insert a breadcrumb separator that does not exhibit this behavior.

As always, you can grab the latest version of Breadcrumb NavXT from the Breadcrumb NavXT page. If you experience any issues with this version of Breadcrumb NavXT, please leave a comment on this post detailing the issue.

-John Havlik

[end of transmission, stay tuned]

Raspberry Pi Zero W and Funtoo

After finding the PaPiRus ePaper panel, I picked up a Raspberry Pi Zero W to drive it. To be perfectly honest, the early Raspberry Pis never really excited me. However, the Raspberry Pi Zero’s small footprint caught my attention. Add in WiFi and Bluetooth, as found on the Zero W, and you have a solid IoT starter board.

Thanks to the popularity of the Raspberry Pi, both Funtoo and Gentoo have guides on setting up Funtoo/Gentoo on a Raspberry Pi. Getting a base system up and running is straightforward. Though, if you have to compile anything it will take a while.

WiFi

Getting WiFi to work requires some compiling. Funtoo’s guide for setting up WiFi on the Raspberry Pi 3 works for the Zero W for the driver side. On the userland side, you will probably want something like NetworkManager and wpa_supplicant. Unfortunately, neither package come installed in the base install for Funtoo/Gentoo.

Normally, chrooting in from a liveCD with working networking, installing the requisite package, and rebooting is sufficient. However, in this case, you’ll need to setup Qemu on your workstation and then use it to chroot into the ARM environment to compile and install NetworkManager. This will take quite some time.

Playing with PaPiRus

PaPiRus is a ePaper pHAT for the Raspberry Pi Zero. It contains an I2C LM75 temperature sensor, a few push button switches, a SPI NOR flash, and a ePaper panel. Unfortunately, it does not have an I2C memory device to store the device tree overlay information needed for auto-configuration of the SoC.

Since the installer for PaPiRus’ driver, and the manual instructions for that matter, assume a Debian based system, they do not work with Funtoo. Instead, follow the “Install Driver – Option 2” instructions, and rather than apt-get, use the following:

emerge -av sys-fs/fuse dev-python/pillow media-fonts/freefonts

After running make rpi-install the last few steps diverge from the “Install Driver – Option 2” instructions. Since Funtoo by default uses OpenRC rather than Systemd, the epd-fuse.service isn’t going to work. Instead, the OpenRC script below can be used (save as /etc/init.d/epd-fuse).

#!/sbin/openrc-run
# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2

EPD_MOUNTPOINT=/dev/epd

depend() {
        need localmount
}

start() {
        EPD_SIZE=2.0
        EPD_OPTS="-o allow_other -o default_permissions"
        ebegin "Starting epd-fuse"
        mkdir -p $EPD_MOUNTPOINT
        if ! grep -qw fuse /proc/filesystems; then
                modprobe fuse >/dev/null 2>&1 || eerror $? "Error loading fuse module"
        fi
        if ! grep -qw $EPD_MOUNTPOINT /proc/mounts; then
                /usr/sbin/epd_fuse --panel=$EPD_SIZE $EPD_OPTS $EPD_MOUNTPOINT >/dev/null 2>&1 || \
                        eerror $? "Error mounting control filesystem"
        fi
        eend ${?}
}

stop() {

        ebegin "Stopping epd-fuse"
        if grep -qw $EPD_MOUNTPOINT /proc/mounts; then
                umount $EPD_MOUNTPOINT >/dev/null 2>&1 || \
                        eerror $? "Error unmounting control filesystem"
        fi
        eend ${?}
}

After saving the epd-fuse script, rc-service epd-fuse start can be used to start the driver. Of course, installing Systemd and uninstalling OpenRC is an option. However, that is quite a bit of effort for something that is overkill for a Raspberry Pi.

Other things to consider, while Funtoo places fonts under /usr/share/fonts, the font packages and directory structure of /usr/share/fonts differs from what PaPiRus expects. The easy way to resolve this is to modify the examples with the correct font location.

Pitfalls

Rather than the older module blacklist/modprobe method for enabling various SOC features, the Raspberry Pi kernel has moved to Device Tree Blobs. Which is not entirely bad. However, they can be difficult to get working.

For short-term testing, to get the PaPiRus to work, I ended up using dtoverlay to enable the SPI and I2C buses, and then had to use modprobe to remove the LM75 driver so that the I2C bus was available to the epd-fuse driver.

-John Havlik

[end of transmission, stay tuned]