Geekpi CM4 Router Board – Challenges

I got my first Raspberry Compute Module 4 and installed it in a Geekpi CM4 Router Board.  And then cue the fun.  It is cool but it isn’t quite ready for plug and play prime time.   It was quite a challenge to get everything running.

First of all there are several images to download on the GitHub page and I just wasn’t sure which one to use.   The image that supposedly allowed the OLED display to work somehow or another didn’t have a working ETH1 wan port after installation.  A router without a wan port isn’t worth a shit and it sure isn’t a router.  Pardon my French.

So then the image with the ETH1 wan port working didn’t have a working OLED display.  FML.   In the great scheme of things the OLED being functional isn’t that important and that’s the direction I decided to go.  Then I figured out how to get the OLED on which is a hack.

Here’s how it happened:

First install OpenWRT on your Compute Module by using this file from the Github link above.

openwrt-bcm2711-rpi-4-ext4-rtl8168-factory.img

This one has the functional wan port. But you have to add it manually (ETH1 = WAN)

WAN port depicted (click pic to enlarge)

And almost everything you need to get the OLED going is here.

If you go Services > OLED you’ll find that page is non functional.  ssh into your Openwrt and issue these three commands.

opkg update
opkg install luci-compat
opkg install nano

The nano one isn’t totally necessary if you know how to use vi.  I hate vi.

Once luci-compat is installed the page will work but you’ll get a message that says “OLED Not Running”. Crap.

So now you need to take nano and add a line of code.

nano /etc/init.d/oled

Add this line to the start() area:

ln -s /dev/i2c-1 /dev/i2c-0

It will look like this:

start() {
        ln -s /dev/i2c-1 /dev/i2c-0
        enabled=$(uci get oled.@oled[0].enable)
        if [ $enabled -eq 0 ]; then
                exit 0
        fi

Hit Ctl + X and then Y to save.  Now reboot.  Navigate to the Services > OLED page and voila’. In Green it states “OLED Running”

OLED Running (click pic to enlarge)

Now everything works.  Next up will be to add a hotspot so this device can be a travel router.  Then maybe configure OpenVPN for security.

Guys like me like to fumble around with stuff and make it work but it seems like they could have a working OpenWRT image ready to roll.  Just my opinion.  You have to mess with it to make it work.

7 thoughts on “Geekpi CM4 Router Board – Challenges”

  1. Keith

    Thank you for sending me the link to your blog. I have tried the steps you did but it did not make the oled light up. I am using the flash file you referred to and flashed it using the raspberry pi imager and then went through the steps you took to turn the oled on. Once I took those steps, the page would show up and I was able to enable it. It says it is running but nothing is showing up on it even after a reboot. Were there any other steps that you performed that may not have been included in this discussion? Thank you again!

    Reply ↓
    1. John Hagensieker Post author

      Not sure what it could be. I literally followed my own steps a few days ago and then set an RTL-SDR software defined radio up on the router so I can access the SDR on the network. My OLED is working fine. Could it possibly be a hardware problem? Have you ever seen it lit up?

      Reply ↓
      1. Keith

        No, I have not seen it light up so far. I have been going crazy trying to set this thing up and have tried several avenues just to ultimately guess that the oled is bad. I did a fresh flash with the file you stated and followed them exactly with no joy. I also did the chmod 755 /etc/init.d/oled and restarted it and then rebooted and nothing changed. I have tested the settings and it looks like it is setup properly, just zero response from the old. I will try to get a replacement on amazon. Thank you for trying to help!

        Reply ↓
        1. John Hagensieker Post author

          One more thing. I think you may have to check a box on the OLED page to make it work. There is an “Enable” box on there.

          Reply ↓
  2. Steven Cliff

    Hey John, have you still got the Oled working with the latest stable version of Openwrt (23.05)? When I upgraded using the ‘sysupgrade’ image it removed the ‘Oled’ drop down menu from services and I tried following the same instructions in your article to no avail….

    Reply ↓
    1. John Hagensieker Post author

      I haven’t messed with the router board for some time. I stole the CM4 for a Cell Hat project in my camper and then Pi availability got me.

      Reply ↓

Leave a Reply

Your email address will not be published. Required fields are marked *