Wifi on MacBook

I am trying to install the firmware for this broadcom wifi on my MacBook.

I got it done last year with lots of trouble and now I don’t remember how.

I did:

ralf@ralf-macbook2020:~$ sudo apt install debian-ports-archive-keyring
Reading package lists… Done
Building dependency tree
Reading state information… Done
The following package was automatically installed and is no longer required:
lightning
Use ‘sudo apt autoremove’ to remove it.
The following NEW packages will be installed:
debian-ports-archive-keyring
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 27.9 kB of archives.
After this operation, 53.2 kB of additional disk space will be used.
Get:1 https://repo.pureos.net/pureos amber/main amd64 debian-ports-archive-keyring all 2019.11.05~deb10u1 [27.9 kB]
Fetched 27.9 kB in 1s (22.4 kB/s)
Selecting previously unselected package debian-ports-archive-keyring.
(Reading database … 223341 files and directories currently installed.)
Preparing to unpack …/debian-ports-archive-keyring_2019.11.05~deb10u1_all.deb …
Unpacking debian-ports-archive-keyring (2019.11.05~deb10u1) …
Setting up debian-ports-archive-keyring (2019.11.05~deb10u1) …
ralf@ralf-macbook2020:~$ sudo apt install firmware-brcm80211
Reading package lists… Done
Building dependency tree
Reading state information… Done
E: Unable to locate package firmware-brcm80211
ralf@ralf-macbook2020:~$

How can I get this firmware package? What commands do I need to type?

I also installed PureOS on an old Apple computer as a backup machine: Mid-2007 20" iMac 2.4GHz Intel Core 2 Duo. Despite trying hard to install the proprietary Broadcom Wi-Fi driver using Debian instructions, I could never get it to work.

My solution? I wiped the drive and installed Debian testing (“bullseye” at the time), which automatically found & installed the proprietary Broadcom driver. It works fine.

Now that Debian 11 “bullseye” is the latest Debian stable as of 2021-08-14, I would probably just install that and not Debian testing.

PureOS comes with no proprietary drivers, and since Apple hardware is full of hardware that requires proprietary drivers, I’m not surprised that PureOS didn’t fully work.

Good luck!

PureOS does not contain ANY non-opensource software/firmware.
which means there is no broadcom firware package.
if you wish to use driver with nonfree firmware please do:
edit /etc/apt/sources.list
add following 2 lines;
#Debian non-free for firmware packages
deb http://deb.debian.org/debian bullseye non-free

then run : apt update
then you will able install additional firmware packages.

1 Like

Great idea, except that I don’t know anything.
So I tried to edit this source list and crashed, my command terminal responded as follows:

Found a swap file by the name “/etc/apt/.sources.list.swp”
owned by: root dated: Mon Sep 6 15:55:13 2021
file name: /etc/apt/sources.list
modified: YES
user name: root host name: ralf-macbook2020
process ID: 7440
While opening file “/etc/apt/sources.list”
dated: Thu Aug 6 01:29:24 2020

(1) Another program may be editing the same file. If this is the case,
be careful not to end up with two different instances of the same
file when making changes. Quit, or continue with caution.
(2) An edit session for this file crashed.
If this is the case, use “:recover” or “vim -r /etc/apt/sources.list”
to recover the changes (see “:help recovery”).
If you did this already, delete the swap file “/etc/apt/.sources.list.swp”
to avoid this message.
“/etc/apt/sources.list” 3 lines, 158 characters

I need to know ALL the details.
If I edit in the command terminal - how do I edit, save and exit?
If I use a text editor - how do I get around the “read only”, so I can save the changes?

sudo vim -r /etc/apt/sources.list
Read The Friendly Manual then think. your initial edit was done with sudo, then recovery have to be done too.:stuck_out_tongue_winking_eye:
If vim is to difficult for you
do
sudo rm /etc/apt/.sources.list.swp
sudo nano /etc/apt/sources.list

The “vim” command is unknown on my machine.
Then I did the “rm”, just don’t know what it is and what it does.

Then I ran nano, but the sources.list file appears empty.

When I open the source list file with a text editor I see three lines written there.

I don’t know the “Friendly Manual” either.

Ah, I found the error - one too many dots in the line.

I got the sources.list file changed and did apt update.

Then I did:
sudo apt install wireless-tools network-manager-gnome wpasupplicant
sudo apt install dkms linux-image-$(uname -r|sed ‘s,[^-]-[^-]-,’) linux-headers-$(uname -r|sed ‘s,[^-]-[^-]-,’) broadcom-sta-dkms

I rebooted and the wifi on my MacBook is now working.
Thank you so much.

1 Like

I am at it again, updating the third MacBook and something isn’t working again. Please have a look below:

$ sudo apt install dkms linux-image-$(uname -r|sed ‘s,[^-]-[^-]-,’) linux-headers-$(uname -r|sed ‘s,[^-]-[^-]-,’) broadcom-sta-dkms
sed: -e expression #1, char 1: unknown command: �' sed: -e expression #1, char 1: unknown command: �’
[sudo] password for starla:
Reading package lists… Done
Building dependency tree
Reading state information… Done
Package ‘linux-image’ is not installed, so not removed
Package ‘linux-headers’ is not installed, so not removed
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
libc6-dev : Breaks: libgcc-8-dev (< 8.4.0-2~) but 8.3.0-6 is to be installed
E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.

What am I doing wrong?

Try spacing the arguments out

uname -r | sed…

That did not work:

sudo apt install dkms linux-image-$(uname -r|sed ‘s,[^-]-[^-]-,’) linux-headers-$(uname -r|sed ‘s,[^-]-[^-]-,’) broadcom-sta-dkms

What does “uname” stand for?

According to your post you didn’t space them out, but it may be a copying thing. Uname is a command to display the kernel version. Where are you reading these instructions from?

Yes, I did not copy correctly:

sudo apt install dkms linux-image-$(uname -r | sed ‘s,[^-]-[^-]-,’) linux-headers-$(uname -r | sed ‘s,[^-]-[^-]-,’) broadcom-sta-dkms
sed: -e expression #1, char 1: unknown command: �' sed: -e expression #1, char 1: unknown command: �’

The instruction came from an older post, I did a year and a half ago, when I converted my first MacBook to PureOS.

I did the second one in early September and got it done fairly. But this third one gives me fits. I have other posts going here on it.

Hmmm. Whatever you’re typing after “sed” is confusing the terminal. Can you point me to where you’re getting it from?


post #87

I have in my source.lists
deb http://deb.debian.org/debian bullseye non-free
deb http://deb.debian.org/debian buster non-free

When I run : sudo apt update

I get a connection failed error on these.
Do we have debian server problems?

What I guess, here within this thread, is that you are probably using another laptop (another PureOS based installation on another Macbook) and therefore people here need to know which WiFi chipset is inside your current device:
sudo lspci | grep -i wireless

And hope that solution to working WiFi on this device is just around corner, as it is for sure. But first, please remove: deb http://deb.debian.org/debian buster non-free line from this Macbook sources.list file.

As second, please download: http://ftp.de.debian.org/debian/pool/main/d/debian-ports-archive-keyring/debian-ports-archive-keyring_2020.02.02_all.deb package to some particular folder and install it from there:
sudo apt purge debian-ports-archive-keyring
sudo apt update
sudo apt upgrade
sudo apt autoremove

sudo dpkg -i debian-ports-archive-keyring_2020.02.02_all.deb

As next, please read carefully this Debian instruction and download: http://ftp.de.debian.org/debian/pool/main/i/isenkram/isenkram-cli_0.48_all.deb in order to (please be aware that this particular package includes few dependencies, yet automated install isn’t excluded for now, we don’t expect problem there):
sudo dpkg -i isenkram-cli
sudo isenkram-autoinstall-firmware

Please post isenkram-autoinstall-firmware output here, please share it with us. As related to above link, latest non-free firmware collection is, as well (You don’t need to use them), here: https://cdimage.debian.org/cdimage/unofficial/non-free/firmware/bullseye/20211009/. Working with above tips should be easy for you (even if I forgot something important), therefore please let us know how this newly added non-free functionality from Debian 11 Team worked for you.

Looks like you’ll need to remove gcc-8 and its dependencies, adjust few things:
sudo apt search libgcc-8-dev
sudo apt search libgcc-9-dev

Here is output of mine:
sudo apt search gcc-10
Sorting… Done
Full Text Search… Done
gcc-10/stable,now 10.2.1-6 amd64 [installed,automatic]
GNU C compiler
etc.

Solution might be: sudo apt purge gcc-8 or sudo apt purge gcc-9, please reread provided link in this post, but don’t see your related outputs. Provided link shows you some direction. I might only guess that you are using old PureOS Amber and therefore having some timestamp, sort of, issues.

sudo apt install gcc-10
Reading package lists… Done
Building dependency tree… Done
Reading state information… Done
gcc-10 is already the newest version (10.2.1-6).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

Or just adjust accordingly your download repositories, if you are not already running PureOS 10 (Byzantium), down to buster non-free.

Sorry for confusion (if any) but I just don’t know which PureOS you are using there.

@Ralf, I just realized that you made upgrade to PureOS Byzantium yet never removed Amber repo(s). Please remove those from your sources.list:

Check if your install of PureOS 10 is now back on track:
sudo apt update
sudo apt autoremove
sudo apt update
sudo apt full-upgrade

This would include removal of buster non-free (as above) repo, bullseye non-free stays unchanged … try now to install/add needed WiFi package(s).

Quarnero
I executed the instruction on your last post. Here are the results:

$ sudo apt update
Get:1 http://deb.debian.org/debian bullseye InRelease [116 kB]
Get:2 https://repo.pureos.net/pureos byzantium InRelease [5,851 B]
Get:3 https://repo.pureos.net/pureos byzantium-security InRelease [4,581 B]
Get:4 https://repo.pureos.net/pureos byzantium-updates InRelease [4,580 B]
Get:5 https://repo.pureos.net/pureos byzantium/main DEP-11 48x48 Icons [3,440 kB]
Get:6 https://repo.pureos.net/pureos byzantium/main DEP-11 64x64 Icons [7,226 kB]
Get:7 https://repo.pureos.net/pureos byzantium-security/main amd64 Packages [79.0 kB]
Get:8 https://repo.pureos.net/pureos byzantium-security/main Translation-en [46.6 kB]
Fetched 10.9 MB in 50s (220 kB/s)
Reading package lists… Done
Building dependency tree
Reading state information… Done
1451 packages can be upgraded. Run ‘apt list --upgradable’ to see them.
starla@starla-mac2021:~$ sudo apt autoremove
Reading package lists… Done
Building dependency tree
Reading state information… Done
The following packages will be REMOVED:
lightning
0 upgraded, 0 newly installed, 1 to remove and 1450 not upgraded.
After this operation, 223 kB disk space will be freed.
Do you want to continue? [Y/n] y
(Reading database … 204881 files and directories currently installed.)
Removing lightning (1:78.14.0-1~deb10u1) …
starla@starla-mac2021:~$ sudo apt update
Hit:1 http://deb.debian.org/debian bullseye InRelease
Hit:2 https://repo.pureos.net/pureos byzantium InRelease
Hit:3 https://repo.pureos.net/pureos byzantium-security InRelease
Hit:4 https://repo.pureos.net/pureos byzantium-updates InRelease
Reading package lists… Done
Building dependency tree
Reading state information… Done
1450 packages can be upgraded. Run ‘apt list --upgradable’ to see them.
starla@starla-mac2021:~$ sudo apt full-upgrade
Reading package lists… Done
Building dependency tree
Reading state information… Done
Calculating upgrade… Error!
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
libc6-dev : Breaks: libgcc-8-dev (< 8.4.0-2~) but 8.3.0-6 is to be installed
E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.
starla@starla-mac2021:~$

Both of my MacBook Pros are alike. I can swap the hard drive and the other will run with the amber installation.
All I need for the new installation to run is the broadcom driver for the wireless card.

I did an installation two months ago and it worked fine.

This third installation is giving me fits. One reason is the connection trouble with the amber stuff.
The other reason is that I could not get the broadcom driver from the debian website last night either. There were connection issues to the site.

What do I need to do to get that broadcom driver installed this round?

1 Like

Let me take few things from your post in order to explain:

sudo apt update - important one
sudo apt list --upgradable - informative one

Now you should not skip this important one:
sudo apt upgrade

The answer to sudo apt upgrade would be the same:

After apt upgrade finished please reboot your current Macbook (to the new Linux kernel, etc.):
sudo reboot

Afterwards:
sudo apt update - take a look if all packages already upgraded
sudo apt autoremove

sudo apt full-upgrade - check if needed at all, if works now

This post describes prerequisite so I’ll make new post, repeat things about WiFi on PureOS Byzantium based install process when all successfully done (that hopefully will work). Thanks on your reply, all looks good!