1

enter image description here

I was using my laptop, due to low battery issue it switched off and when I booted it again, The wifi option was missing from the top right tray and it doesn't even appear in the settings. I am attaching the picture describing the output of command lspci -knn | grep Net -A3; rfkill list Output:

06:00.0 Network controller [0280]: Broadcom Inc. and subsidiaries BCM43142 802.11b/g/n [14e4:4365] (rev 01)
    Subsystem: Dell Wireless 1704 802.11n + BT 4.0 [1028:0016]
    Kernel modules: bcma
07:00.0 Ethernet controller[0200]: Realtek Semiconductor Co., Ltd. RTL810xE PCI Express Fast Ethernet controller [10ec:8136] (rev 07)
0: dell-rbtn: Wireless LAN
    Soft blocked: no
    Hard blocked: no
1: hci0: Bluetooth
    Soft blocked: yes
    Hard blocked: no

UPD: If there is any package that you think I should install, it will be a great help if you also mention if it is possible to manually download those. I don't have any other method to connect to internet on my laptop.

hp77
  • 11
  • I do not know about others but I find that to be unreadable. Text would be better. – David Jan 07 '21 at 17:34
  • Okay, I will try to type it in via phone then. I don't have access to any other laptop, and typing that would have been tedious enough. But sure will do. – hp77 Jan 08 '21 at 04:09

2 Answers2

0

Run the following command

sudo apt-get install --reinstall bcmwl-kernel-source

It might help you.

  • Thanks for your response but will it be possible for me to download the .deb of bcmwl-kernel-source and then install it via dpkg -i, I forgot to mention I do not have any other way to connect to internet on my laptop. – hp77 Jan 08 '21 at 04:20
  • You mean don't you connect internet via Bluetooth or usb cable? – Sanny Kundaliya Jan 08 '21 at 05:24
  • Bluetooth tethering was not possible as device was not able to connect. And I didn't have any proper USB Cables. But Now I bought a LAN Cable and tried your command but it gave an error. When I looked error up on this forum there was an answer which solved my problem and now I am writing this on a wifi connection. I will write everything in a new answer. – hp77 Jan 08 '21 at 07:27
0

I tried sudo apt-get install --reinstall bcmwl-kernel-source then I got the following error

E: dpkg was interrupted, you must manually run 'sudo dpkg --configure -a' to correct the problem.

as mentioned I ran the command and then I got this

Setting up bcmwl-kernel-source (6.30.223.271+bdcom-0ubuntu5) ...
Removing old bcmwl-6.30.223.271+bdcom DKMS files...

Deleting module version: 6.30.223.271+bdcom completely from the DKMS tree.


Done. Loading new bcmwl-6.30.223.271+bdcom DKMS files... Building for 5.8.0-34-generic Building for architecture x86_64 Building initial module for 5.8.0-34-generic ERROR: Cannot create report: [Errno 17] File exists: '/var/crash/bcmwl-kernel-source.0.crash' Error! Bad return status for module build on kernel: 5.8.0-34-generic (x86_64) Consult /var/lib/dkms/bcmwl/6.30.223.271+bdcom/build/make.log for more information. dpkg: error processing package bcmwl-kernel-source (--configure): installed bcmwl-kernel-source package post-installation script subprocess returned error exit status 10 Errors were encountered while processing: bcmwl-kernel-source

To understand a bit more I tried to read the log file mentioned but wasn't able to figure anything out

DKMS make.log for bcmwl-6.30.223.271+bdcom for kernel 5.8.0-34-generic (x86_64)
Friday 08 January 2021 12:26:27 PM IST
make: Entering directory '/usr/src/linux-headers-5.8.0-34-generic'
CFG80211 API is prefered for this kernel version
Using CFG80211 API
  AR      /var/lib/dkms/bcmwl/6.30.223.271+bdcom/build/built-in.a
  CC [M]  /var/lib/dkms/bcmwl/6.30.223.271+bdcom/build/src/shared/linux_osl.o
  CC [M]  /var/lib/dkms/bcmwl/6.30.223.271+bdcom/build/src/wl/sys/wl_linux.o
  CC [M]  /var/lib/dkms/bcmwl/6.30.223.271+bdcom/build/src/wl/sys/wl_iw.o
  CC [M]  /var/lib/dkms/bcmwl/6.30.223.271+bdcom/build/src/wl/sys/wl_cfg80211_hybrid.o
/var/lib/dkms/bcmwl/6.30.223.271+bdcom/build/src/shared/linux_osl.c: In function ‘osl_reg_map’:
/var/lib/dkms/bcmwl/6.30.223.271+bdcom/build/src/shared/linux_osl.c:949:10: error: implicit declaration of function ‘ioremap_nocache’; did you mean ‘ioremap_cache’? [-Werror=implicit-function-declaration]
  949 |  return (ioremap_nocache((unsigned long)pa, (unsigned long)size));
      |          ^~~~~~~~~~~~~~~
      |          ioremap_cache
/var/lib/dkms/bcmwl/6.30.223.271+bdcom/build/src/shared/linux_osl.c:949:10: warning: returning ‘int’ from a function with return type ‘void *’ makes pointer from integer without a cast [-Wint-conversion]
  949 |  return (ioremap_nocache((unsigned long)pa, (unsigned long)size));
      |         ~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /var/lib/dkms/bcmwl/6.30.223.271+bdcom/build/src/wl/sys/wl_cfg80211_hybrid.c:40:
/var/lib/dkms/bcmwl/6.30.223.271+bdcom/build/src/wl/sys/wl_cfg80211_hybrid.c: In function ‘wl_set_auth_type’:
/var/lib/dkms/bcmwl/6.30.223.271+bdcom/build/src/wl/sys/wl_cfg80211_hybrid.h:52:5: warning: this statement may fall through [-Wimplicit-fallthrough=]
   52 |  if (wl_dbg_level & WL_DBG_DBG) {   \
      |     ^
/var/lib/dkms/bcmwl/6.30.223.271+bdcom/build/src/wl/sys/wl_cfg80211_hybrid.c:816:3: note: in expansion of macro ‘WL_DBG’
  816 |   WL_DBG(("network eap\n"));
      |   ^~~~~~
/var/lib/dkms/bcmwl/6.30.223.271+bdcom/build/src/wl/sys/wl_cfg80211_hybrid.c:817:2: note: here
  817 |  default:
      |  ^~~~~~~
cc1: some warnings being treated as errors
make[1]: *** [scripts/Makefile.build:288: /var/lib/dkms/bcmwl/6.30.223.271+bdcom/build/src/shared/linux_osl.o] Error 1
make[1]: *** Waiting for unfinished jobs....
/var/lib/dkms/bcmwl/6.30.223.271+bdcom/build/src/wl/sys/wl_linux.c: In function ‘wl_attach’:
/var/lib/dkms/bcmwl/6.30.223.271+bdcom/build/src/wl/sys/wl_linux.c:593:20: error: implicit declaration of function ‘ioremap_nocache’; did you mean ‘ioremap_cache’? [-Werror=implicit-function-declaration]
  593 |  if ((wl->regsva = ioremap_nocache(dev->base_addr, PCI_BAR0_WINSZ)) == NULL) {
      |                    ^~~~~~~~~~~~~~~
      |                    ioremap_cache
/var/lib/dkms/bcmwl/6.30.223.271+bdcom/build/src/wl/sys/wl_linux.c:593:18: warning: assignment to ‘void *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
  593 |  if ((wl->regsva = ioremap_nocache(dev->base_addr, PCI_BAR0_WINSZ)) == NULL) {
      |                  ^
/var/lib/dkms/bcmwl/6.30.223.271+bdcom/build/src/wl/sys/wl_linux.c: In function ‘wl_pci_probe’:
/var/lib/dkms/bcmwl/6.30.223.271+bdcom/build/src/wl/sys/wl_linux.c:780:2: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation]
  780 |  if ((val & 0x0000ff00) != 0)
      |  ^~
/var/lib/dkms/bcmwl/6.30.223.271+bdcom/build/src/wl/sys/wl_linux.c:782:3: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘if’
  782 |   bar1_size = pci_resource_len(pdev, 2);
      |   ^~~~~~~~~
/var/lib/dkms/bcmwl/6.30.223.271+bdcom/build/src/wl/sys/wl_linux.c:783:15: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
  783 |   bar1_addr = (uchar *)ioremap_nocache(pci_resource_start(pdev, 2),
      |               ^
/var/lib/dkms/bcmwl/6.30.223.271+bdcom/build/src/wl/sys/wl_linux.c: In function ‘wl_reg_proc_entry’:
/var/lib/dkms/bcmwl/6.30.223.271+bdcom/build/src/wl/sys/wl_linux.c:3376:58: error: passing argument 4 of ‘proc_create_data’ from incompatible pointer type [-Werror=incompatible-pointer-types]
 3376 |  if ((wl->proc_entry = proc_create_data(tmp, 0644, NULL, &wl_fops, wl)) == NULL) {
      |                                                          ^~~~~~~~
      |                                                          |
      |                                                          const struct file_operations *
In file included from /var/lib/dkms/bcmwl/6.30.223.271+bdcom/build/src/wl/sys/wl_linux.c:38:
./include/linux/proc_fs.h:102:31: note: expected ‘const struct proc_ops *’ but argument is of type ‘const struct file_operations *’
  102 | extern struct proc_dir_entry *proc_create_data(const char *, umode_t,
      |                               ^~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
make[1]: *** [scripts/Makefile.build:288: /var/lib/dkms/bcmwl/6.30.223.271+bdcom/build/src/wl/sys/wl_linux.o] Error 1
make: *** [Makefile:1780: /var/lib/dkms/bcmwl/6.30.223.271+bdcom/build] Error 2
make: Leaving directory '/usr/src/linux-headers-5.8.0-34-generic'

I googled for the above error on building generic and came across this answer.

In that answer following commands are mentioned and after running these commands, I am able to connect with wifi

apt purge bcmwl-kernel-source
apt-get install broadcom-sta-source
apt-get install broadcom-sta-dkms
apt-get install broadcom-sta-common

Thanks to Atef for the answer. If for any reason the answer link doesn't work, try this.

Glorfindel
  • 971
  • 3
  • 13
  • 20
hp77
  • 11