The HubPiWi Blue is an add-on for the Raspberry Pi Zero that gives you three USB ports, and a combined WiFi/Bluetooth adapter (RealTek chipset). If you poked around after install, you likely noticed that there's a module for a Realtek device already detected and running. We're part of the way there, unfortunately, it's only the "Bluetooth" part and I'm not even sure that it truly works. Thankfully, RealTek provides module sources for a Linux driver and they were great with Raspbian (with a few Makefile tweaks). Unfortunately, this means we'll not be able to update the kernel after this without repeating a lot of these steps again.
I’ll skip the basics except for this: Get an SD card, load the latest Raspbian image onto it and pop that into the Pi Zero’s available card. You’ll want a monitor/keyboard handy or an FTDI adapter. And you’ll need some time – my recommendation: line up some chores to do during each of the major steps and you’ll get a bit done while you’re waiting.
What you’ll need
If you want to follow this post exactly, here’s what you’ll need. I’ve included notes about alternatives where I can, but I’m doing this as I write, so I’m providing what I used to make it work.
- A Raspberry Pi Zero
- A HubPiWi Blue
- USB power and Micro USB cable
- An HDMI display and Keyboard or an FTDI Adapter
- A Wireless network you intend to attach to.
Before We Build the Driver
As always, run the following commands:
sudo apt-get update sudo apt-get upgrade sudo apt-get dist-upgrade sudo reboot
It’s a Pi Zero, so it’s going to take a while. To its credit, it performed faster than my original Raspberry Pi. And for $5 (or if you were one of the lucky ones that grabbed one at Microcenter for a buck), you can’t really complain.
I used the non-LITE version of Raspbian and ended up with 122 packages that needed updating, which took around 35 minutes.
Building the Kernel Driver
The HubPiWi uses the Realtek 7823BU Chipset. Luckily, there are kernel modules for this. I've created a fork of the driver repository and modified the Makefile to allow for an easy build on Raspbian, so we'll clone my forked repository and use that to build the module.
cd ~/ git clone https://github.com/Diagonactic/rtl8723bu.git
The driver is kernel version specific, so we need to get the correct linux headers.
sudo apt-get install raspberrypi-kernel-headers
Time for some more chores. This clocked in at about 10 minutes.
cd ~/rtl8723bu make
This will run about 30-40 minutes. When you’re done, you’ll have a compiled driver and be ready to install:
sudo make install
At this point you can either reboot with the “reboot” command or type the following:
sudo insmod 8723bu.ko ifconfig
You should see your wlan0 device ready to go! Of course, you still need to configure it to attach to your network. There's a variety of ways to do that so simply search away and set that up and you'll be connected.
Ongoing Maintenance Note - IMPORTANT!
If you've been messing with Raspberry Pi hardware for a while, you'll recognize those first few steps as common steps for updating the Pi.
Nearly every bit of "help" will point you at these steps as a "do this first" (keeping software up-to-date is always a good idea). The issue, though, is that this will sometimes install a new kernel version. When that happens, the new kernel will not have a module for your WiFi adapter. Not to worry: simply repeat the process from Building the Kernel Driver on through after a new kernel comes down and you'll be back up and running.