Author Topic: Debian Problem Getting Wireless Going - SOLVED  (Read 2769 times)

Debian Problem Getting Wireless Going - SOLVED
« on: 06 January, 2021, 04:21:22 pm »
I've successfully installed Debian 10.7 on a Dell Precision M4800 which, before the Debian installation, was working fine with both ethernet and wireless on Windows 10.

Now, I only have ethernet working.

To see that the network controller is recognised, I issued the command lspci | grep Network, and got:

Code: [Select]
03:00.0 Network controller: Broadcom Limited BCM4352 802.11ac Wireless Network Adapter (rev 03)

Then, I did nmcli general status, and got:

Code: [Select]
STATE      CONNECTIVITY  WIFI-HW  WIFI     WWAN-HW  WWAN   
connected  full          enabled  enabled  enabled  enabled

which seems to suggest some wifi enablement.

nmcli device status gave:

Code: [Select]
DEVICE  TYPE      STATE      CONNECTION         
eno1    ethernet  connected  Wired connection 1
lo      loopback  unmanaged  --                 

and nmcli connection show gave:

Code: [Select]
NAME                UUID                                  TYPE      DEVICE
Wired connection 1  8aca1c89-5d78-4e3b-91a3-d8b0fc5ea4d3  ethernet  eno1   

So... what do I do next?

Any help gratefully received.

Re: Debian Problem Getting Wireless Going
« Reply #1 on: 06 January, 2021, 04:33:45 pm »
Your correct it does see the WiFi hardware.
What window manager are you running ?
For most there is an applet to configure the WiFi.
I think you'll find it's a bit more complicated than that.

Re: Debian Problem Getting Wireless Going
« Reply #2 on: 06 January, 2021, 04:49:38 pm »
Thanks.

I'm using Mate.

You're right, there is an applet; I've started it and set up the beginning of a configuration.  Here is the pop-up window for this.

Looks promising but I don't know what all the details are that I will need to fill in.  Luckily, I have another machine alongside, with functioning wifi, so maybe some details can be copied across.

I will be busy now on Zoom until later this evening, but will return to this then.

Thanks for the help so far.

Re: Debian Problem Getting Wireless Going
« Reply #3 on: 06 January, 2021, 04:52:44 pm »
Code: [Select]
$ apt show broadcom-sta-dkms
...
Description: dkms source for the Broadcom STA Wireless driver
 Broadcom STA is a binary-only device driver to support the following IEEE
 802.11a/b/g/n wireless network cards: BCM4311-, BCM4312-, BCM4313-,
 BCM4321-, BCM4322-, BCM43142-, BCM43224-, BCM43225-, BCM43227-, BCM43228-,
 BCM4331-, BCM4360-, and BCM4352-based hardware.

You need to install the out-of-tree kernel driver.  There appear to be two alternatives broadcom-sta-source and broadcom-sta-dkms. Both should build automatically when properly installed, but I've not used either.

Re: Debian Problem Getting Wireless Going
« Reply #4 on: 06 January, 2021, 05:10:33 pm »
You will need to enable the non-free repository in /etc/apt/sources.list to see these packages.  When you install one the packages apt will install dkms, kernel-headers, compiler, etc. and then build a new kernel module for the kernel you have installed.


Re: Debian Problem Getting Wireless Going
« Reply #5 on: 06 January, 2021, 05:52:53 pm »
[In between Zoom meetings]

OK.  I've never compiled anything on linux before.  I may need a bit of hand-holding.  Does it all happen automatically with the right commands?

I have already updated /etc/apt/sources.list with 'non-free' and 'contrib' - is there anything else that needs to be added?

Back later.

Re: Debian Problem Getting Wireless Going
« Reply #6 on: 06 January, 2021, 06:09:31 pm »
They are both designed to build automatically when installed. One uses module-assistant, a Debian system to build kernel modules, the other uses dkms, a system to build kernel modules that is not Debian-specific. The systems are slightly different and I've never really needed to use either:
https://unix.stackexchange.com/questions/120124/dkms-versus-module-assistant

You should only need to do:

  apt update
  apt install broadcom-sta-dkms

Re: Debian Problem Getting Wireless Going
« Reply #7 on: 06 January, 2021, 06:27:41 pm »
No hand compilation required:

Details on getting this going in more detail if you run into an issue with Philips method (which is correct and should just work).

https://wiki.debian.org/wl

I think you'll find it's a bit more complicated than that.

Re: Debian Problem Getting Wireless Going
« Reply #8 on: 06 January, 2021, 08:53:58 pm »
Right, thanks to you I've done all that successfully.

After a reboot, nmcli device status shows:

Code: [Select]
DEVICE  TYPE      STATE         CONNECTION         
eno1    ethernet  connected     Wired connection 1
wlp3s0  wifi      disconnected  --                 
lo      loopback  unmanaged   

so wifi is now recognised as a device not yet connected.

What are my next steps?

Re: Debian Problem Getting Wireless Going
« Reply #9 on: 06 January, 2021, 09:10:45 pm »
Lots of ways you could do it: https://wiki.debian.org/WiFi/HowToUse

Re: Debian Problem Getting Wireless Going
« Reply #10 on: 07 January, 2021, 10:28:06 am »
I'm no techie and it's a few years ago - but I'm sure I've had very similar problems with a Dell laptop and Linux Mint.
As Philip suggested up thread it was something to do with installing the Broadcom drivers that finally resolved the issue.
It was something to do with the WiFi hardware that dell installs.
All my Linux tech problems are solved through the various forums (but it takes forever filtering down to my level)
Too many angry people - breathe & relax.

Re: Debian Problem Getting Wireless Going
« Reply #11 on: 07 January, 2021, 11:13:23 am »
I've made a bit of progress with this, following your link above, Philip, and going to the Command Line instructions.

Just to recap, this is what I've done.

Command ip a gave:
Code: [Select]
[...]
[...]
3: wlp3s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UNKNOWN group default qlen 1000
    link/ether b8:ee:65:58:79:89 brd ff:ff:ff:ff:ff:ff
    inet6 fe80::baee:65ff:fe58:7989/64 scope link
       valid_lft forever preferred_lft forever

Command iw dev gave:
Code: [Select]
phy#0
Interface wlp3s0
ifindex 3
wdev 0x1
addr b8:ee:65:58:79:89
type managed
txpower 200.00 dBm

Command ip link set wlp3s0 up gave:

No response or error code.

Command iwlist scan gave:
Code: [Select]
wlp3s0    Scan completed :
[...]
         Cell 12 - Address: EC:08:6B:94:41:10
                    Channel:13
                    Frequency:2.472 GHz (Channel 13)
                    Quality=52/70  Signal level=-58 dBm 
                    Encryption key:on
                    ESSID:"TP-LINK_4110"
                    Bit Rates:9 Mb/s; 18 Mb/s; 36 Mb/s; 54 Mb/s; 1 Mb/s
                              2 Mb/s; 5.5 Mb/s; 11 Mb/s
                    Bit Rates:6 Mb/s; 12 Mb/s; 24 Mb/s; 48 Mb/s
                    Mode:Master
                    Extra:tsf=0000000000000000
                    Extra: Last beacon: 8ms ago
                    IE: Unknown: (numbers here, followed by lots of similar lines)

I edited /etc/network/interfaces, and added:

Code: [Select]
allow-hotplug wlp3s0
iface wlp3s0 inet dhcp
      wpa-ssid TP-LINK_4110
      wpa-psk [My network password here]

* Not sure if TP-LINK_4110 should be in double quotes, or single quotes or none.  Instructions don't say.
* For wpa-psk, I put in my normal password for the network, not a long key specially produced by the wpa_passphrase (as described later in the instructions)

Next, command ifup wlp3s0 gave:
Code: [Select]
wpa_supplicant: /sbin/wpa_supplicant daemon failed to start
run-parts: /etc/network/if-pre-up.d/wpasupplicant exited with return code 1
ifup: failed to bring up wlp3s0

Obviously, the command iw wlp3s0 link gave:
Code: [Select]
Not connected.

And a repeat of command ip a gave:
Code: [Select]
[...]
[...]
3: wlp3s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UNKNOWN group default qlen 1000
    link/ether b8:ee:65:58:79:89 brd ff:ff:ff:ff:ff:ff
    inet6 fe80::baee:65ff:fe58:7989/64 scope link
       valid_lft forever preferred_lft forever

Next, I checked that wpa_supplicant was installed:

Code: [Select]
wpasupplicant is already the newest version (2:2.7+git20190128+0c1e29f-6+deb10u2).

Next I tried to find wpa_supplicant.conf.  This was not at /etc/wpa_supplicant/wpa_supplicant.conf.  However, I found it at /etc/dbus-1/system.d/wpa_supplicant.conf

Then, I used wpa_passphrase to calculate the correct WPA PSK hash for my SSID, and followed instructions to add this to wpa_supplicant.conf (edited result here!):

Code: [Select]
<!DOCTYPE busconfig PUBLIC
 "-//freedesktop//DTD D-BUS Bus Configuration 1.0//EN"
 "http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd">
<busconfig>
        <policy user="root">
                <allow own="fi.epitest.hostap.WPASupplicant"/>

                <allow send_destination="fi.epitest.hostap.WPASupplicant"/>
                <allow send_interface="fi.epitest.hostap.WPASupplicant"/>

                <allow own="fi.w1.wpa_supplicant1"/>

                <allow send_destination="fi.w1.wpa_supplicant1"/>
                <allow send_interface="fi.w1.wpa_supplicant1"/>
                <allow receive_sender="fi.w1.wpa_supplicant1" receive_type="signal"/>
        </policy>
        <policy group="netdev">
                <allow send_destination="fi.epitest.hostap.WPASupplicant"/>
                <allow send_interface="fi.epitest.hostap.WPASupplicant"/>

                <allow send_destination="fi.w1.wpa_supplicant1"/>
                <allow send_interface="fi.w1.wpa_supplicant1"/>
                <allow receive_sender="fi.w1.wpa_supplicant1" receive_type="signal"/>
        </policy>
        <policy context="default">
                <deny own="fi.epitest.hostap.WPASupplicant"/>
                <deny send_destination="fi.epitest.hostap.WPASupplicant"/>

                <deny own="fi.w1.wpa_supplicant1"/>
                <deny send_destination="fi.w1.wpa_supplicant1"/>
                <deny receive_sender="fi.w1.wpa_supplicant1" receive_type="signal"/>
        </policy>
</busconfig>

network={
ssid="TP-LINK_4110"
#psk="XXXXXXXX"
psk=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
}

ctrl_interface=/run/wpa_supplicant
update_config=1

The next command in the instructions was systemctl reenable wpa_supplicant.service, which gave:
Code: [Select]
Removed /etc/systemd/system/dbus-fi.w1.wpa_supplicant1.service.
Removed /etc/systemd/system/multi-user.target.wants/wpa_supplicant.service.
Created symlink /etc/systemd/system/dbus-fi.w1.wpa_supplicant1.service → /lib/systemd/system/wpa_supplicant.service.
Created symlink /etc/systemd/system/multi-user.target.wants/wpa_supplicant.service → /lib/systemd/system/wpa_supplicant.service.

Then, systemctl restart wpa_supplicant.service gave:
Code: [Select]
Job for wpa_supplicant.service failed because the control process exited with error code.
See "systemctl status wpa_supplicant.service" and "journalctl -xe" for details.

I followed the advice given in the command feedback, and did systemctl status wpa_supplicant.service:

Code: [Select]
root@newdelldebian:~# systemctl status wpa_supplicant.service
● wpa_supplicant.service - WPA supplicant
   Loaded: loaded (/lib/systemd/system/wpa_supplicant.service; enabled; vendor preset: enabled)
   Active: failed (Result: exit-code) since Thu 2021-01-07 11:11:09 GMT; 42s ago
  Process: 4558 ExecStart=/sbin/wpa_supplicant -u -s -O /run/wpa_supplicant (code=exited, status=255/EXCEPTION)
 Main PID: 4558 (code=exited, status=255/EXCEPTION)

Jan 07 11:11:09 newdelldebian systemd[1]: Starting WPA supplicant...
Jan 07 11:11:09 newdelldebian wpa_supplicant[4558]: dbus: Could not request service name: org.freedesktop.DBus.Error.AccessDenied Connection ":1.646" is not allowed to own the service "fi.w1
Jan 07 11:11:09 newdelldebian wpa_supplicant[4558]: Failed to initialize wpa_supplicant
Jan 07 11:11:09 newdelldebian systemd[1]: wpa_supplicant.service: Main process exited, code=exited, status=255/EXCEPTION
Jan 07 11:11:09 newdelldebian systemd[1]: wpa_supplicant.service: Failed with result 'exit-code'.
Jan 07 11:11:09 newdelldebian systemd[1]: Failed to start WPA supplicant.




That's as far as I've got for now.  I'm not really sure what I'm doing, but I'm attempting to follow the instructions accurately.

Got to do some work now, so will return to this later.

Thanks for the help so far.

Re: Debian Problem Getting Wireless Going
« Reply #12 on: 07 January, 2021, 11:23:31 am »
Retried ifup wlp3s0, and got:
Code: [Select]
ifup: /etc/network/interfaces:13: option with empty value
ifup: couldn't read interfaces file "/etc/network/interfaces"

Re: Debian Problem Getting Wireless Going
« Reply #13 on: 07 January, 2021, 01:42:34 pm »
I've never tried to configure wifi from the command line, I've always used the NetworkManager GUI.

I'm guessing, but I think your problem is that you are trying to combine the NetworkManger instance of wpa_supplicant with the command line ifup/ifdown.  If you are not using NetworkManager to configure wifi I think you may need to disable the systemd instance of wpa_supplicant; ifup will attempt to start its own instance and that is failing because you have edited the wrong conf file - you need to create /etc/wpa_supplicant/wpa_supplicant.conf rather than edit the other one.

Kim

  • Timelord
    • Fediverse
Re: Debian Problem Getting Wireless Going
« Reply #14 on: 07 January, 2021, 01:47:15 pm »
It's been a while (ie. pre-systemd) since I configured a machine with WiFi, but as a habitual curmudgeon, my SOP is to nuke all traces of NetworkMangler before proceeding to configure the notworking in the traditional Debian way.  Unless it's actually a laptop, in which case I might forego the config files in favour of whatever GUI tool appears to work out of the box.

Mixing and matching is a recipe for doom, as something inevitably tries to be clever and, for example, overwrites your resolv.conf at inopportune moments, causing bad swears.

Re: Debian Problem Getting Wireless Going
« Reply #15 on: 07 January, 2021, 02:14:22 pm »
That's what I have done in the past as well. However I have just realised that the machine I am currently using, a desktop with a wired interface, is using what was setup by the installer a year or so back and it is using NM; I hadn't even looked at the configuration until today. NM is getting better, and is probably a better bet for WiFi, particularly if you intend to roam.

Re: Debian Problem Getting Wireless Going
« Reply #16 on: 07 January, 2021, 02:43:34 pm »
I work for Dell, but not with laptops.ioS an
You do know that with the Service Tag you can get a list of all the latest BIOS and firmware bundles.
I guess that doesn't help much with Network Manager configurations in Debian

Re: Debian Problem Getting Wireless Going
« Reply #17 on: 07 January, 2021, 06:49:52 pm »
Having another Dell machine, a much lowlier Latitude D530, which is also running the same Debian, and came through the installation process completely unscathed with both ethernet and wifi working fine, I looked at the entries in the GUI Network Connections applet under Mate on that machine.  I copied across all the settings (and there weren't many) to the corresponding applet on the Precision M4800, then saved this and rebooted and... no change.

Does that applet interact with Network Manager, or is that something completely different?

After 5 hours of online Teams meetings today, I'll need to leave further fettling for a bit!  I'll get back to it when time, and clear thinking, allows.

Re: Debian Problem Getting Wireless Going
« Reply #18 on: 07 January, 2021, 06:56:00 pm »
Does that applet interact with Network Manager, or is that something completely different?
I don't know what the Mate applet is/does. You need to remove all config associated with the wireless interface from /etc/network/interfaces otherwise NM will make no attempt to manage the interface.

Re: Debian Problem Getting Wireless Going
« Reply #19 on: 07 January, 2021, 09:36:18 pm »
I have set up Debian on both these machines to have both Gnome and Mate available; if I reboot into Gnome and use the Network Manager Applet therein, will the wifi, once set up, work just the same under Mate (which I prefer), or will that functionality be lost.  You've already spotted how little I know!

Re: Debian Problem Getting Wireless Going
« Reply #20 on: 07 January, 2021, 09:39:48 pm »
Yes, it should do.

Re: Debian Problem Getting Wireless Going
« Reply #21 on: 07 January, 2021, 09:42:06 pm »
You should be able to use the network manager applet in Mate as well as Gnome.
I think you'll find it's a bit more complicated than that.

Re: Debian Problem Getting Wireless Going
« Reply #22 on: 09 January, 2021, 06:54:14 pm »
You should be able to use the network manager applet in Mate as well as Gnome.

Yes, I have tried both and they are functionally the same.

I am taking the  approach now of only using and referring to Network Manager (either via applet or Command Line).

Here is a series of pics, showing all the screens from the applet, with the data entered currently:

Opening Window

General Window

Wi-Fi Window

Wi-Fi Security Window

Proxy Window

IPv4 Settings Window

IPv6 Settings Window

I have removed any reference to the wireless interface from /etc/network/interfaces:

Code: [Select]
root@newdelldebian:/home/martin# cat /etc/network/interfaces
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

source /etc/network/interfaces.d/*


Not sure if there's anything else in there that would cause offence to Network Manager.

Also I have made sure that /etc/NetworkManager/NetworkManager.conf contains a line to make ifupdown managed:

Code: [Select]
root@newdelldebian:/home/martin# cat /etc/NetworkManager/NetworkManager.conf
[main]
plugins=ifupdown,keyfile

[ifupdown]
managed=true

ie, managed is set to TRUE.

I have rebooted the machine following these modifications, but the situation is the same, wi-fi is not available.

Using some Network Manager CLI tools:

Command nmcli general shows:

Code: [Select]
STATE      CONNECTIVITY  WIFI-HW  WIFI     WWAN-HW  WWAN   
connected  full          enabled  enabled  enabled  enabled

Command nmcli device status gives:

Code: [Select]
DEVICE  TYPE      STATE        CONNECTION         
eno1    ethernet  connected    Wired connection 1
wlp3s0  wifi      unavailable  --                 
lo      loopback  unmanaged    --                 

Command nmcli connection show gives:

Code: [Select]
NAME                UUID                                  TYPE      DEVICE
Wired connection 1  8aca1c89-5d78-4e3b-91a3-d8b0fc5ea4d3  ethernet  eno1   
Wi-Fi connection 1  6b264e40-cb3c-4f1f-a861-7d90a4b4a695  wifi      --     

So "Wi-Fi connection 1" is not equated with device wlp3s0

Command nmcli device show wlp3s0 shows:

Code: [Select]
GENERAL.DEVICE:                         wlp3s0
GENERAL.TYPE:                           wifi
GENERAL.HWADDR:                         B8:EE:65:58:79:89
GENERAL.MTU:                            1500
GENERAL.STATE:                          20 (unavailable)
GENERAL.CONNECTION:                     --
GENERAL.CON-PATH:                       --

So that's where I'm at so far.

Next steps?

Re: Debian Problem Getting Wireless Going
« Reply #23 on: 09 January, 2021, 07:29:43 pm »
Does the laptop have a hardware wifi switch? Or a Fn-key wifi switch?

Re: Debian Problem Getting Wireless Going
« Reply #24 on: 09 January, 2021, 07:51:04 pm »
Does "nmcli radio" show the wifi on?