The officially official Devuan Forum!

You are not logged in.

#1 2022-04-23 22:19:58

Iggy64
Member
Registered: 2022-04-23
Posts: 29  

[SOLVED] Driver for Broadcom BCM4312 wifi Card

Hello.  Today I am transitioning (I hope) from Debian Bullseye to Devuan Chimaera.  I used the live USB (with Refracta) installer and have Chimaera xfce up and running on my old Dell Latitude E6400 laptop.  Unfortunately, this machine packs a Broadcom wifi card, specifically the BCM4312.  In the past, I have managed to get it connected in Linux Mint, and then in Debian.  I am hoping to use Devuan instead of either of those.

The Broadcom card was recognized immediately by Mint, but getting the correct driver in Debian was a bit of a challenge.  The as-installed driver was b43-pci-bridge, and that did not work at all.  A search of the discussion boards revealed that I needed the "wl" driver, which could be obtained via the "broadcom-sta-dkms" package."  That package was found in the Bullseye non-free repository.  Following instructions, I entered

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

into the terminal, then rebooted.  Voila!  The wl driver was now installed and my wifi was now connected.

In my new Devuan install, I find that the b43-pci-bridge driver is again installed by default.  So I hoped that the above trick would again work.  But I find that the package broadcom-sta-dkms does NOT exist in the Chimaera repos (and, yes, I have them all enabled, including contrib and non-free).

I am hoping that someone else has tried Devuan on an old Dell laptop and has found a solution for getting the wl driver.

Any guidance would be extremely appreciated.  Thanks you, in advance.

Offline

#2 2022-04-23 23:04:58

ralph.ronnquist
Administrator
From: Battery Point, Tasmania, AUS
Registered: 2016-11-30
Posts: 1,251  

Re: [SOLVED] Driver for Broadcom BCM4312 wifi Card

Offline

#3 2022-04-24 00:40:24

Iggy64
Member
Registered: 2022-04-23
Posts: 29  

Re: [SOLVED] Driver for Broadcom BCM4312 wifi Card

Thank you very much for pointing me in the right direction.  I now have working wifi.

However, I hope you can be patient enough to school me on a couple of follow-up questions (as I am a true newbie on Devuan):

1) My original sources.list was

# Package repositories
deb http://deb.devuan.org/merged/ chimaera main contrib non-free
deb http://deb.devuan.org/merged/ chimaera-updates main contrib non-free
deb http://deb.devuan.org/merged/ chimaera-security main contrib non-free
deb http://deb.devuan.org/merged/ chimaera-backports main contrib non-free

You pointed me to:

http://deb.devuan.org/merged chimaera/non-free amd64

So I added that to my sources list, and it enabled me to access broadcom-sta-dkms

However, coming from Debian, I am unfamiliar with how chimaera/non-free differs from chimaera non-free.

In Devuan, does each section (such as non-free) need to be added as a separate line in sources.list, with the "/" prefix?  And what about the "amd64" suffix -- does that make the entry a different repo from the one without the suffix?  Sorry, but I'm lost here.

2) In using broadcom-sta-dkms here in Devuan, I took the risk of using the same command I was given for Debian.  That is:

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

That DID work, and got my wifi going.  However, I am not knowledgeable enough to really understand this whole business with the linux-image and linux-headers.  I don't know what that is doing, and whether it might not apply correctly in Devuan, or in some way compromise my Devuan install.  Man, an awful lot of lines went flying by in the terminal in order to execute that command!  Anyway, do you know if that command was appropriate in Devuan?  If it may have caused any damage, I will do a complete re-install and find a more appropriate command to get the wl driver.

Again, I thank you for your kind response and for you continued patience with any further education you can provide on these two questions.

Offline

#4 2022-04-24 02:47:00

ralph.ronnquist
Administrator
From: Battery Point, Tasmania, AUS
Registered: 2016-11-30
Posts: 1,251  

Re: [SOLVED] Driver for Broadcom BCM4312 wifi Card

Your sources.list point should have been fine for finding broadcom-sta-dkms in chimaera/non-free. It would be wrong to add deb http://deb.devuan.org/merged chimaera/non-free amd64 and apt-get would have told so upon update. So I'm afraid I cannot explain why the package seemingly appeared following your addition of that and not before-hand; possibly it was that you hadn't actually updated before or something.

Anyhow I think your previous idea about the source list points was more workable, and there is no difference in format or interpretation or use between Devuan and Debian.

As to architectures, normally apt will keep meta information for all installed architectures; most usually the single installed architecture, but nowadays many systems are of "multiarch" kind and thus having software for multiple architectures. If you would want it to keep meta information about other architectures than the installed one(s), you either mangle architecture parameters (in a square-bracketed phrase just after deb) on the source list lines, or you set up an APT::Architectures apt configuration setting.

It is also a point that Devuan offers all of Debian's packages except those that are noted in https://pkgmaster.devuan.org/bannedpackages.txt and in most cases the actual package files (the .deb) are directly retrieved from Debian's repositories. Only a few packages are rebuilt and repackaged so as to make them usable on systems without systemd, and only those packages are provided from Devuan's repository pool.

Your "long-winded install command" collapses into requesting 3 packages for installation. The command should work on a Devuan system in the same way as a Debian system; it installs:

  • package linux-image-$ARCH for the architecture $ARCH of the running kernel,

  • package linux-headers-$ARCH for the $ARCH of the running kernel, and

  • broadcom-sta-dkms

I would suggest that it's not exactly the right thing to do, since it builds a broadcom kernel module for the default kernel version rather than for the current kernel version, and it also forces installations of those default image and header meta packages. If you e.g. would run a back-ported kernel, then the command wont install the headers for that and the subsequent kernel module building may find itself being in trouble.

Rather, you would use uname -r to print out the exact version $VERSION and then install the linux-header-$VERSION package for that before installing broadcom-sta-dkms.

Offline

#5 2022-04-24 04:43:23

Iggy64
Member
Registered: 2022-04-23
Posts: 29  

Re: [SOLVED] Driver for Broadcom BCM4312 wifi Card

Thanks very much for all your very clear explanation.  It was especially nice of you to provide enough detail for me to get a better understanding of how this whole process works.  I also learned a bit more about the relationship between Devuan packaging and Debian packaging.  All of this should really help me going forward.

I am embarrassed that I must have neglected to do a package update before searching for the broadcom package.  I made sure to add the non-free sections and made sure to enable the various repos.  How sad that I would not think to do a fresh download, and even sadder that I didn't consider that possibility afterward.  However, these mistakes made me reach out for help and as a result I learned some useful things that seem pretty important.

I am going to mark this issue as "Solved," thanks to your considerable help.

However, if I am not overstepping my welcome, can you advise me one step further?

You suggested a better command for building the broadcom driver, which would keep the driver compatible with an updated kernel.  Is that something I could/should do now, without conflicting somehow with the subpar command I have already used? 

Thanks, again, for all the education.  I am really looking forward to exploring Devuan and hopefully making it a daily driver.

Offline

#6 2022-04-24 08:14:49

ralph.ronnquist
Administrator
From: Battery Point, Tasmania, AUS
Registered: 2016-11-30
Posts: 1,251  

Re: [SOLVED] Driver for Broadcom BCM4312 wifi Card

No worries. I think the following command sequence would work also after installing a non-default kernel:

# apt-get install linux-headers-$(uname -r)
# apt-get install --reinstall broadcom-sta-dkms

(the # is just a prompt to mark that you run the commands as root)

The first command is for installing the header files relating to the current kernel version, and the second is for triggering the broadcom kernel module building for that kernel version.

Offline

#7 2022-04-24 16:06:45

Iggy64
Member
Registered: 2022-04-23
Posts: 29  

Re: [SOLVED] Driver for Broadcom BCM4312 wifi Card

Thank you again for all this very helpful support.  Not only do I have wifi working on this rather dated laptop, but I also learned a number of important lessons.  Without your guidance, I think I would have gone around in circles for quite some time. 

Thanks for making me feel welcome to the Devuan community.

Offline

#8 2022-04-25 13:25:19

Head_on_a_Stick
Member
From: London
Registered: 2019-03-24
Posts: 3,125  
Website

Re: [SOLVED] Driver for Broadcom BCM4312 wifi Card

Simplest way to ensure custom driver compilation will succeed:

# apt install module-assistant
# m-a prepare

^ That will pull in any headers and build requirements automatically. No idea why it isn't on the Debian wiki page. It really should be.


Brianna Ghey — Rest In Power

Offline

#9 2022-04-25 16:10:39

Iggy64
Member
Registered: 2022-04-23
Posts: 29  

Re: [SOLVED] Driver for Broadcom BCM4312 wifi Card

Thank you, Head_on_a_Stick, for this added information.  It looks like it should be very useful when in need of building kernel modules (a concept that I am only just beginning to learn and understand).  This is one of the reasons I turned to Debian -- and now to Devuan -- to get closer to the workings of a Linux system and learn more about how Linux systems actually work.

Just now, I did install and prepare module-assistant, and I found that the broadcom-sta module was listed in the accessible modules.

I see that the Debian wiki provides some detail of the scope and usage of this tool (although the article admits this tool is underdocumented):

https://wiki.debian.org/ModuleAssistant

Both command-line and interactive modes are available (you probably already know that).

Thank you very much for the continuing education.

Offline

Board footer