r/openwrt • u/Rikka_Chunibyo • 2h ago
I got OpenWrt on the HH4000 (Bell Home Hub 4000)
galleryYeah, so I got the HH4000 for free from someone and wanted to use it for my homelab. Naturally, I searched for OpenWrt, and no one's done it! Some guy may have gotten temporary root at one point, but nothing came of it as far as I could find. So I decided to do it instead.
GitHub: https://github.com/rikka-chunibyo/HH4000-OpenWrt
Just keep in mind, this is very experimental. Works great for me, but that doesn't mean it'll work for everyone or even that it's stable. Also, PON has not been implemented. Drivers are present if anyone wants to make a PR with working PON, but I don't actually use Bell so I had nothing to test PON with. If you are looking for PON bypass, this isn't there yet, but it may greatly help in researching Bell's PON stack, as you can extract PON firmware and drivers through this. I imagine adding PON support wouldn't be that hard if you actually have Bell. Currently it works great as an extra router though!
The bootloaders
BEFORE ANYTHING: Note that reflashing bootloaders is risky. Depending on which stage fails, it could be as simple as a backup bootloader taking over, or as bad as needing to restore the flash with external hardware.
The HH4000 uses 3 bootloaders (kinda). The first one is nothing special, but the second and third ones have signature verification. What a pain. There's also a bug in the installed version of U-Boot where it selects the "nowhere" environment backend and falls back to the default environment instead of loading the saved variables. This means permanent root just isn't feasible through the normal boot configuration (as far as I can tell). The solution was to patch the second and third bootloaders.
Getting OpenWrt running
After reflashing the bootloaders, you can modify both the userspace of the stock OS and the kernel.
I considered using a newer kernel, but Sagemcom's hardware is very proprietary. Doing so would mean either creating compatibility layers for the existing proprietary drivers or reverse-engineering and porting a significant portion of Broadcom's platform-specific code. Neither sounded particularly fun, and maintaining it would be another project in itself.
Instead, I decided to keep the stock kernel, retain the original drivers, and adapt OpenWrt userspace to work with them. Obviously, running an older kernel has its disadvantages, particularly regarding security and long-term maintainability, but my initial goal was to get a functional OpenWrt system running on hardware that otherwise had no publicly available port.
I also made an integration for LuCI that allows you to script the display/front panel with Python.
This project made extensive use of AI coding agents. However, even AI needed to be pointed in the right direction throughout the process. Plus, there's the hardware side of things: opening up the router, soldering to the UART pads, and creating a custom Arduino shield with a voltage divider (5V TX to 3.3V RX) and a relay so Codex could control the router's power by itself.
The Arduino shield
Originally, I was going to use a USB-to-TTL board, but it died a while ago and I simply forgot. When I realized it was dead, I programmed an Arduino Mega to act as one.
I measured the HH4000's TX pin, which read 3.3V. The Arduino Mega uses 5V logic, so I simply made a voltage divider with a 1kΩ and 2kΩ resistor on a tiny breadboard to bring the Arduino's TX voltage down to 3.3V.
It was pretty messy, and I had to control the power to the router myself, which sucked whenever Codex requested a reboot (I was only testing temporary root at that point). Eventually, I added a relay because I was getting fed up with manually replugging the router every few minutes.
The setup was still messy, and I wanted an easy way to control the router's power whenever I was working on it myself. I decided to solder everything onto an Arduino prototyping shield to make it a more permanent solution.
It's a simple circuit, containing just a voltage divider, a relay, a button, and a diode. Technically, you shouldn't drive a relay directly from GPIO, and I'd probably add a proper relay driver and flyback diode if I were making it again. Since I used NC on the relay, it only needed to be activated for a few seconds at a time to power-cycle the router.
For some reason, I decided to implement the button entirely in hardware instead of through the Arduino firmware. The button supplies 5V directly to the relay coil, while a diode between the Arduino's control pin and the relay coil prevents backfeeding into the GPIO pin when the button is pressed. This allows both the Arduino and the physical button to independently control the router's power. Yeah, idk why I did it in hardware, but it works.
The Arduino's firmware allows for direct UART communication, as well as control over the router's power. I also inverted the relay controls because I used the NC (normally closed) terminal, meaning the router stays powered by default. This was done to prevent the router from unnecessarily restarting whenever I reflashed the Arduino.
With this setup, Codex could interact with the router's serial console, interrupt the boot process, execute commands, power-cycle the router, and inspect the resulting boot logs without requiring me to manually intervene every few minutes.
Oh btw here are what the pins are:
T11 - PWR - leave disconnected
T9 - Router RX
T10 - Router TX
T13 - GND
RX/TX have 3.3V logic. UART at 115200 (8N1).
UART jig if you don't want to open up the HH4000 and solder (risk of cracking the display to reach a hidden screw behind it to get easier access to the pins).
Someone has to play Doom and Bad Apple on the display now 💀
SIDE NOTE: There is a possibility of Z-Wave support! This guy has documented the hardware very well. From that, I found this image! It seems Bell completely disables the Z-Wave antenna in their software, but looks like we could possibly get the drivers for it working if present, and set up a Docker container for Home Assistant on the router. I don't know if the antenna is actually present on retail units, and I also don't have any devices that support Z-Wave so I can't do anything with that at the moment. PRs are welcome, and if I ever get a Z-Wave device, I will attempt to get it working if a PR hasn't already been made (and if it's even present).
| Hostname | HH4000-OpenWrt |
|---|---|
| Model | Sagemcom FAST5689 (HH4000) |
| Architecture | ARMv8 Processor rev 0 |
| Target Platform | armsr/armv8 |
| Firmware Version | OpenWrt 24.10.4 r28959-29397011cc / LuCI openwrt-24.10 branch 25.292.66247~75e41cb |
| Kernel Version | 4.1.52-5.02L.07 |
I originally posted here.
If anyone knows whether releasing the raw firmware dumps and also my version of the firmware can screw me over, please let me know. I've held off on releasing it for now, so it has to be dumped once then built for each install. Thanks!






