Aatish Neupane

Getting the internal WiFi working on a MINIX NEO Z83-4 in Linux

Posted on

I recently got a hold of bunch of Minix brand Mini PCs for dirt cheap ($10 each) from FB Marketplace. I initially had a CUPS server running in my homelab but having to rebuild it, I figured I would use this one as a CUPS server to share my yet another dirt cheap USB printer from Marketplace as well. This would also let me not have to deal with bridging my homelab VLAN with my WiFI since the priority here was to let anyone in the home quickly print off things from their laptops or phones over Wifi. My current setup also involved putting the printer in the laundry room and run a long USB cable to the bedroom closet (aka homelab) which wasn’t ideal at all. At any point in time, someone could get snatched on it and bring my computers down to the ground. So I got into a mission to make use of one of these Minix boxes.

Booting Linux

There were a couple of variations of Z83 boxes in the stack. I picked the one labelled “NEO Z83-4 Plus V2” since V2 sounds like an upgrade. The Debian 13 amd64 graphical installer didn’t boot, the text installer did. On the first reboot it dropped me into an EFI shell, and I booted Debian by hand:

Shell> fs0:\EFI\BOOT\BOOTX64.EFI

Weirdly, I only had to do it once. Every reboot after that came up normally.

WiFi

I was able to use Ethernet without any issues. However, the WiFi was a pain. The chip is a Broadcom BCM4345/6 (BCM43455) on SDIO, driven by brcmfmac. Debian ships the firmware and the CLM blob for it, but not the NVRAM calibration file, and without that the radio never comes up. Confirm you have the same chip:

1sudo dmesg | grep -i brcmfmac

You should see brcmfmac43455-sdio and BCM4345/6 in there. The whole fix is one file:

  1. Get 4345r6nvram.txt from MINIX’s Windows driver bundle.
  2. Copy it to /lib/firmware/updates/brcm/brcmfmac43455-sdio.txt.
  3. Reload brcmfmac.

Get the NVRAM file

Download the Z83-4 Windows driver bundle from this thread on the MINIX forum and pull 4345r6nvram.txt out of Installer/PlatformInstaller/Drivers/WiFi/. Use it as is. It’s 1688 bytes, starts with #AP6255_NVRAM_V1.0_29052015, and already has ccode=CN and regrev=38 in it. If you got the file somewhere else, make sure it has both.

In case MINIX ever takes the bundle down, here is the exact file that works on this unit, byte for byte (md5 c150e989897b5b27dd2e0f31064e0f39). The macaddr line is Broadcom’s stock placeholder, not my radio’s real address, and the driver ignores it.

 1#AP6255_NVRAM_V1.0_29052015
 2
 3NVRAMRev=$Rev: 498373 $
 4sromrev=11
 5vendid=0x14e4
 6devid=0x43ab
 7manfid=0x2d0
 8prodid=0x06e4
 9macaddr=00:90:4c:c5:12:38
10nocrc=1
11boardtype=0x6e4
12boardrev=0x1304
13xtalfreq=37400
14#boardflags: 5GHz eTR switch by default
15#2.4GHz eTR switch by default
16#bit1 for btcoex
17boardflags=0x00080201
18boardflags2=0x40000000
19boardflags3=0x48200100
20rxgains2gelnagaina0=0
21rxgains2gtrisoa0=0
22rxgains2gtrelnabypa0=0
23rxgains5gelnagaina0=0
24rxgains5gtrisoa0=0
25rxgains5gtrelnabypa0=0
26rxchain=1
27txchain=1
28aa2g=1
29aa5g=1
30tssipos5g=1
31tssipos2g=1
32femctrl=0
33AvVmid_c0=0,157,1,126,1,126,1,126,1,126
34pa2ga0=-112,6296,-662
35pa2ga1=-165,3699,-515
36pa5ga0=-143,6016,-683,-141,6013,-678,-137,5988,-670,-136,5982,-670
37pa5ga1=-161,3544,-499,-166,3543,-497,-169,3569,-497,-171,3598,-498
38itrsw=1
39pdoffset2g40ma0=10
40pdoffset40ma0=0xaaaa
41pdoffset80ma0=0xaaaa
42extpagain5g=2
43extpagain2g=2
44tworangetssi2g=1
45tworangetssi5g=1
46# LTECX flags
47# WCI2
48ltecxmux=0
49ltecxpadnum=0x0504
50ltecxfnsel=0x22
51ltecxgcigpio=0x32
52
53maxp2ga0=64
54ofdmlrbw202gpo=0x0033
55dot11agofdmhrbw202gpo=0x1553
56mcsbw202gpo=0x99355533
57
58maxp5ga0=80,82,76,77
59
60mcsbw205glpo=0x99755000
61mcsbw205gmpo=0x9df55000
62mcsbw205ghpo=0x99855000
63
64mcsbw405glpo=0xb8555000
65mcsbw405gmpo=0xed955000
66mcsbw405ghpo=0xd9755000
67
68mcsbw805glpo=0xc8555000
69mcsbw805gmpo=0xe9555000
70mcsbw805ghpo=0xd9555000
71
72swctrlmap_2g=0x00040004,0x00020002,0x00040004,0x010a02,0x1ff
73swctrlmap_5g=0x00100010,0x00200020,0x00100010,0x010a02,0x2f4
74swctrlmapext_5g=0x00000000,0x00000000,0x00000000,0x000000,0x000
75swctrlmapext_2g=0x00000000,0x00000000,0x00000000,0x000000,0x000
76
77vcodivmode=1
78deadman_to=481500000
79ed_thresh2g=-54
80ed_thresh5g=-54
81
82#muxenab=0x10
83sd_gpout=0
84sd_gpval=0
85
86ccode=CN
87regrev=38

Install and reload

1sudo mkdir -p /lib/firmware/updates/brcm
2sudo cp ~/4345r6nvram.txt /lib/firmware/updates/brcm/brcmfmac43455-sdio.txt
3sudo modprobe -r brcmfmac_wcc brcmfmac
4sudo modprobe brcmfmac
5sudo iw dev wlan0 scan | grep SSID

Use /lib/firmware/updates/ rather than /lib/firmware/. It takes priority and survives package upgrades.

Unload both modules, in that order. brcmfmac_wcc holds a reference to brcmfmac, so unloading brcmfmac on its own fails, and if stderr is suppressed it fails silently and you end up testing files against a driver that never reloaded.

dmesg will still show a -2 for a board specific name ending in MINIX TECHNOLOGY LIMITED-.txt. That’s the driver probing before it falls back to the generic name, and it’s harmless.

If the scan shows networks and you can associate, you’re done.