I have a MacBook laptop to which I have installed Debian 13 via Ethernet. Once booted into the installed Debian, I find that the wireless interface is not recognized. This page documents my fix.
I despise Broadcom. But, it's what we have to work with.
Start out with lspci
.
$ sudo lspci -vv | grep 802 02:00.0 Network controller: Broadcom Inc. and subsidiaries BCM4331 802.11a/b/g/n (rev 02)
So I know this is a Broadcom BCM4331 chip.
Does the wireless configuration tool see it? iwconfig
is to wireless interfaces as ifconfig
is to wired interfaces.
$ sudo iwconfig lo no wireless extensions. enp1s0f0 no wireless extensions. tailscale0 no wireless extensions.
No. It sees I have a local interface lo
, an Ethernet interface enp1s0f0
, and a VPN interface tailscale0
(which I have from earlier tinkering, and you probably will not have), none of which have wireless capability.
I would like to know more about the hardware. According to duck.ai...
$ sudo dmidecode -s system-uuid 40beb479-0db5-8454-b30b-c142109326e1
supposedly gives me the MacBook's serial number. With that, I can go online to https://everymac.com/ultimate-mac-lookup/, or to Apple's support pages, and hopefully get all sorts of info. Unfortunately, Apple doesn't think this is a valid serial number, and EveryMac thinks it's an iPhone. Obviously something is wrong.... duck.ai is incorrect.
UPDATE: I found the correct command (at least for my case): $ sudo dmidecode -s chassis-serial-number
.
However, just running the tool without any switches, and redirecting the output to a text file...
$ sudo dmidecode > hw.txt $ nano hw.txt ... System Information Manufacturer: Apple Inc. Product Name: MacBookPro9,2 Version: 1.0 Serial Number: C1MNW1RYDV30 UUID: 40beb479-0db5-8454-b30b-c142109326e1 Wake-up Type: Power Switch SKU Number: System SKU# Family: MacBook Pro ...
I can open that file in my favorite text editor and search for "Serial", and about the sixth or seventh hit I find a section mentioning "System Information", which has a valid serial number I can look up.
If you don't have the dmidecode
tool, or the lshw
tool mentioned below, you'll have to use a different computer to go online to debian.org/packages to search for and download the correct .deb, and perhaps dependencies, and then transfer those .debs to the MacBook (such as via a thumbdrive), and then install the package with $ sudo dpkg -i 'name of deb'.deb
. It could be slightly painful, but you can do it.
$ sudo lshw
This tool I had to manually install using the outline above. It also gives me lots of info about the hardware, including that it's a MacBookPro9,2, and it gives me a good serial number that I can look up, which tells me it's a Mid-2012 13", Model A1278, with 4GB RAM.
Broadcom's driver is proprietary, and to my understanding, no one has reverse-engineered it, probably because it's easier to just grab the Windows-based driver, and cut out the relevant core pieces from that driver, and plug it into a Linux wrapper. That's what we'll do.
- Web-browse to https://packages.debian.org.
- Choose the option to "Search package directories".
- Select the appropriate release, "stable" in most cases, but "testing/trixie" in mine, since I am on Debian 13.
- In the "Keyword" field, enter "broadcom-sta-dkms", and search.
- You should find a "non-free" .deb file you can download. This is the source for the Broadcom driver.
- Click on the "All" (or "amd64") link under "Architecture".
- The next page tells you how you can add the non-free repository if you'd rather plug into Ethernet and use apt
.
- Select from your closest mirror to start the downoad.
You'll notice on the next page that there are a couple of dependencies, which may themselves have dependencies, and that the kernel source or headers for your kernel are required. At this point, if you don't already have those things installed, you might find it much easier to plug the MacBook into a wired Ethermet connection just long enough to do an $ sudo apt update && sudo apt install broadcom-sta-dkms
(after enabling "non-free" in your "/etc/apt/sources.list" file, of course). (Starting to hate Broadcom, yet?)
Transfer the downloaded .deb file to the MacBook, and install it as before: $ sudo dpkg -i broadcom-sta-dkms_6.30.223.271-26_amd64.deb
In my case, I didn't have any dependency problems, but that may be because I took care of those previously when I was tinkering earlier. At any rate, the package installed easily, and built from source the driver, and installed it. It apparently did not activate it, however, as iwconfig still did not see it, but after a restart of the MacBook, everything just fell into place and I was able to use NetWork Manager (from the wireless icon in the System Tray at the bottom-right of my Cinnamon desktop) to connect to my wifi, and I'm now wirelessly on the net.