OpenWrt apu4c4 Router - Hardware Assembly
I’ve decided that I need to build my own router, because I cannot find anything on the market that meets my requirements.
Anything that gets close is also very expensive, and my budget is rather limited.
So I’ve ended up building my own using PC Engines
apu4c4 and OpenWrt.
In this post, I will talk a bit about putting the hardware together and some of the decisions I’ve made along the way.
Before starting a build like this, there are some things that need to be done first.
Most important one is building and flashing the OS, which in my case is OpenWrt.
The “generic” OpenWrt profile for x86_64 comes with an extremely minimalistic kernel.
So minimalistic, in fact, that it lacks the features needed for some OpenWrt packages.
The image does not even contain the driver required to use the NICs, which is
A way to connect to the serial port is going to be convenient. If you know how to set this up without serial port access, then you don’t need my help at all.
On this note, the OpenWrt image for x86_64 is set up with a baud rate of 38,400…
I will talk about the challenges with software in another post.
Right here are all the components for version 1 of my router (and extras).
Version 2 will have more antenna holes in the case plus a 2.4 GHz radio, and version 3 will have an LTE modem.
The (only) case for
apu4c4 sold by PC Engines comes with only two SMA holes. My build will need 6, but right now I do not have the tools to drill holes.
This isn’t so bad, though, because I need time to pick a good (and compatible) LTE modem.
I installed two pigtails in the case prior to taking a picture. I later learned the hard way that those need to be tightened.
The silly shape of the SMA holes is just right for stripping threads…
Below I will explain my choices and show the items up close.
The wireless adapter I chose is WLE900VX, which does 3x3 SU-MIMO 802.11ac/b/g/n dual band (2.4 GHz and 5 GHz), but single radio.
What this means is that only one band can actually be used at the same time, which is alright for stations (client devices), but not really ideal for access points (routers).
This is not a big deal for me, because 2.4 GHz radios are dirt cheap and I can just add another one via USB.
This one will be set to 5 GHz mode because I didn’t just pay 40 quid for a glorified 2.4 GHz radio…
In version 1 I will just use two antennas (CH0 and CH1). It works fine like that.
This is 802.11ac Wave 1, therefore it has no MU-MIMO, only SU-MIMO. ELI5: Can only talk to one station at a time.
So there are 802.11ac Wave 2 adapters out there. But I did not choose one, because:
- 802.11ax (aka Wi-Fi 6) has just been finalized. I actually purchased the adapter before that but I knew it was coming.
- Twice as expensive for the same bandwidth.
- Not going to max out the bandwidth over Wi-Fi, ever.
- Most of my devices can only do 2.4 GHz anyhow.
I choose an SSD instead of just using a microSD card for a few reasons:
- 120 GB SSD costs 22 quid, 32 GB Samsung PRO Endurance microSD card costs 25 quid.
- I need space to make sure I can put in everything I need, e.g. a caching proxy.
- Higher capacity means more blocks that can be used to level wear.
- I’d like to use the SD slot for data transfers.
- Not planning on using failover WWAN.
Screws, rubber pads, thermal pads, heat spreader.
In the bag where the heat spreader (chunk of aluminium) is, there’s also two thermal pads.
The thermal pads have two films on them, one is clear and the other is blue.
The two pads have their own blue film but the clear film is shared.
Also with the board came a bag with 6 screws for the mPCIe/mSATA slots. They’re gray and have some blue sealant on them.
1.5mm Philips head.
The bag that came inside the case contains 4 gray screws with wide heads, 4 black screws, 4 rubber pads, and two SMA plugs.
I used 2.5mm Philips head for these.
The board in all its glory.
The mPCIe slots all have different connections and purposes:
- Left: mSATA or modem (USB + SIM)
- Middle: modem (USB + SIM)
- Right: Wi-Fi Adapter (PCIe)
PCI enumeration (and, therefore, interface number assignment) is pretty straight forward: left to right as seen in this picture.
eno0 is next to the serial port,
eno3 is next to the USB 3.0 ports.
The first thing you need to do is unscrew the standoffs from the serial port. M5 is their size.
Behold my glorious screwdriver, for it gets the job done.
Righty tighty, lefty loosey.
Turn the board around, you will find the SoC. It’s a naked die, no integrated heat spreader.
I do not have one of those tools for positioning the heat spreader, so I did all this my own way.
The official instructions make it very difficult to actually slot the board into the case.
The thermal pad that goes on the die should be peeled off the clear film, then applied to the die, and then the blue film can be removed. I did not remove it yet because I needed to position the heat spreader.
I centered the slab on top of the die and measured the distance between the edges of the board and the edges of the heat spreader.
My measurements say that the heat spreader needs to be roughly 35mm away from the side of the case and 10mm away from the front of it.
Then I peeled off the blue film from the heat spreader and stuck it to the case roughly according to my measurements.
Finally, I peeled off the blue film from the thermal pad.
It might be handy to have some good high quality tweezers to grab onto the edges/corners of the films. I did not have any, therefore I suffered.
Fitting the board into the bottom case is a bit tricky.
The RJ45 port housing thing-a-magik has some bits on the sides that push in when the board goes into the case.
Those things are tough, and the only sane way to get the board into the case is by positioning it against the back at a shallow angle (so the thermal pad doesn’t stick to the heat spreader yet), make sure the edges are perfectly aligned so that both sides of the RJ45 housing get equal pressure, then push the board in.
After it’s in, slowly lower the other end of the board, making sure that everything stays aligned, especially the screw holes. Those pushy bits will push the board out while it’s being lowered.
Now it’s time to add the screws. Worry not, the SIM slots remain accessible.
The gray screws from the bag that came in the case are the ones for the board.
Installing mSATA/mPCIe (or even M.2/NGFF) modules can be tricky for people who’ve never done it before.
The socket’s pins are designed to apply pressure on the module’s pads to achieve better contact.
This means that modules have to be installed at an angle. In this case, about 30 degrees.
After it fit snuggly in, press it down gently until it sits on the standoffs and screw it down.
The tiny screws with blue stuff on them that came with the board is what you’re looking for.
The U.FL connectors are designed by the Devil himself. Good luck with that.
The only help I can give you is this: they will absolutely not plug in at an angle. You need to make sure that you apply pressure equally on the whole circle.
The SSD is installed in the same way. With mine, the flash chips are facing down… Odd but okay.
Make sure you’ve got the OS set up prior to installation, otherwise you’re going to have to do a lot of (un)screwing.
And here are all the internals for version 1.
Positioning the top of the case over the bottom one is a bit tricky because it wants to slide forward.
But it’s not really rocket surgery. The black screws that came with the case are the ones meant to hold the case together.
Put the rubber pads where you want them (in my case, over the threaded inserts for the board) and it’s done.
Software will be discussed in another post.