Tag: Wi-Fi

Why computer can’t connect to Wi-Fi Hotspot on Android phone for a long time (SOLVED)

Why my computer cannot connect to the Android mobile Wi-Fi hotspot for a long time

After updating Android, I ran into a problem that the computer sees a mobile hotspot, but at the same time:

1. It does not try to connect to it automatically

2. When I select the Access Point manually, an attempt is made to connect, which ends in failure after about a minute

See also:

Additional symptoms of the problem:

3. Before the Android update on the phone, connecting to the Hotspot was fast and without problems

4. The computer can sometimes connect to the mobile hotspot

5. New devices quickly connect to Hotspot on Android without problems

One reason for this behavior could be a new setting that allows you to use an arbitrary MAC address for the mobile hotspot.

How to set permanent or random MAC address for Hotspot on Android

Go to Settings → Connections → Mobile Hotspot and Tethering → Mobile Hotspot.

Click the “Configure” button.

Click the “Advanced” button.

Look for “MAC address type”.

There are two options to choose from:

  • Randomized MAC
  • Phone MAC

If you select the first option (“Randomized MAC”), a random MAC address will be generated for the created Mobile Access Point. If you select the second option (“Phone MAC”), the permanent MAC address of the phone will be used for the created mobile hotspot.

Select “Phone MAC”, save the settings and check if this solves the problem with the slow connection to the Hotspot on Android.

What is the “Randomized MAC” setting for? Is it safe to turn it off

The question may arise, why is the “Randomized MAC” setting enabled by default, which creates serious problems when connecting to a mobile hotspot? Perhaps it is very important and should not be disabled?

The MAC address of each device must be unique. More precisely, each network interface (one device, including a phone, can have several network interfaces) must have a unique MAC address. This MAC address allows you to distinguish one device from another. You can also find out the manufacturer of the device by the MAC address (for example, Samsung, Apple, and so on).

See also:

Enabling the “Randomized MAC address” setting makes it so that for a hypothetical third-party observer, an Access Point is created each time on a device unfamiliar to him.

But you need to remember that each Access Point has the following identifiers:

  1. Device MAC address (BSSID)
  2. Access Point Name (ESSID)

That is, if you are really concerned about privacy issues, then in addition to enabling the “Randomized MAC” setting, you also need to change the network name every time, otherwise the “Randomized MAC” setting loses all meaning.

In fact, most users just do not need to enable the “Randomized MAC” setting. Enabling the “Randomized MAC” setting without taking other measures (for example, changing the network name each time the AP is created) does not make much sense. But at the same time, other devices that, when connected to the AP, can be guided by its MAC address, begin to experience connection problems.

In short, if you do not have a clear understanding of what exactly you need the “Randomized MAC” setting for and/or you do not take other steps to make it difficult for your phone to be identified as an AP and at the same time you are experiencing problems connecting to a mobile AP, then you can safely disable this setting.

If your devices connect to the mobile AP without problems with the “Randomized MAC” setting enabled, you can leave it enabled.

Do I need to enable the setting “Support Wi-Fi 6 standard”

If after changing the MAC address type setting, your computer or other devices continue to experience problems connecting to the Mobile Hotspot, then pay attention to the following two settings.

The first setting is “Support Wi-Fi 6 standard”. This item is located in: Settings → Connections → Mobile Hotspot and Tethering → Mobile Hotspot → Configure → Advanced → Support Wi-Fi 6 standard.

Support Wi-Fi 6 standard” brings many technical improvements and data transfer speeds. But that's in theory. If, in practice, your devices cannot connect to the Access Point with the “Support Wi-Fi 6 standard” setting enabled, then disable it.

Choose “2.4 GHz” or “5 GHz”?

In theory, Wi-Fi at 5 GHz is faster. This is due both to the technical characteristics of the 5 GHz channels and to the fact that these channels are currently less crowded. However, in practice, the transmission area of a 5 GHz Wi-Fi signal is less than 2.4 GHz. Some older devices do not support 5 GHz operation. Some devices, even those that support 5 GHz, are slower to find the Access Point at these frequencies.

Although it is recommended to select the 5 GHz band in the Access Point settings, if you are not satisfied with the quality of the mobile Access Point, you can change the Frequency Band of your Access Point. To do this, go to: Settings → Connections → Mobile Hotspot and Tethering → Mobile Hotspot → Configure → Band. There you will be presented with a choice of:

  • 2.4 GHz
  • 5 GHz preferred

Switch to “2.4 GHz” and see if that solves your problem.

How to share mobile Internet with other phones and computers

This guide will tell you how to turn on Wi-Fi on your phone for other devices so that they can use the Internet. This can come in handy, for example, when you want your friends to be able to connect to the Internet if they have a bad signal or use up their data limit. Another example: you can connect your laptop or computer to your phone via Wi-Fi and access the Internet through your phone, even if you are away from home or your “wired” ISP is out of service.

The specific names of menu items may vary depending on phone models – it's not a problem, the main thing is to understand the essence, then you can set up a mobile hotspot on any phone.

How mobile hotspot works

Your phone can use the Internet from:

  • mobile operator
  • WiFi hotspots

Typically, wireless routers act as Wi-Fi access points for phones and computers. And the Internet source for routers is wired Internet service providers.

But mobile phones can also act as a Wi-Fi hotspot. At the same time, the source of the Internet on them will be a mobile Internet provider or Wi-Fi connection.

What is needed for the phone to work as a Wi-Fi router

All Android phones can act as a Wi-Fi router for other devices.

But it is also necessary that the phone can use the mobile Internet. Since the computer that you connect to the Internet can automatically download updates and consume too much Internet, it is advisable to buy a mobile traffic package in advance.

How to turn on Wi-Fi for other devices on your phone

To enable mobile hotspot, make sure you have mobile data turned on.

Note: modern phones can distribute mobile Internet or they can be connected to a Wi-Fi network and distribute Internet through a wireless Access Point at the same time. This can be useful if you do not know the Wi-Fi password or want to temporarily connect other users to the Internet without giving them the Wi-Fi password on the router.

Now go to the settings, this can be done by clicking the gear or the “Settings” icon among the applications.

The menu names may vary slightly, but most likely you need to go to the “Connections” item. Perhaps already in the main menu you will see the section “Mobile Hotspot and Tethering” – go to it.

Find “Mobile Hotspot and Tethering”.

You need to enable “Mobile Hotspot”, to do this, move the lever.

Depending on your phone model, you may need to disable Wi-Fi connection to enable mobile hotspot.

What is the Wi-Fi password for mobile hotspot

To see or set a password instead of enabling Mobile Hotspot, click on it to go to the mobile hotspot settings.

Here click on “Configure” to change Mobile Hotspot settings.

Here you can change Network name

and Password.

It is recommended that you use a password to prevent strangers from connecting to your phone's Wi-Fi. Connecting outsiders is bad for many reasons:

  • excessive consumption of mobile traffic
  • security of other devices connected to the phone
  • faster battery drain
  • an outsider can use your Internet connection for crimes or illegal activities (and you will have problems)

How to check who is connected to a mobile hotspot

In the “Mobile Hotspot” menu you will see Connected devices.

Why does my battery drain so fast when using mobile hotspot

When your phone shares Wi-Fi with other devices, it does not go into sleep mode, but constantly uses the Wi-Fi module and modem for mobile Internet. Working as a router also creates a load on the processor.

There is nothing you can do about the fact that the phone runs out of power faster, but you can leave it on charge while the mobile hotspot is running.

How to keep track of your mobile data usage

You can track your internet usage in the app or website of your mobile operator, or on your phone itself.

Find “Data Usage” in the menu.

Here you can:

  • see how much data was downloaded in total (via mobile networks and Wi-Fi)
  • view data consumption in certain periods
  • check which apps are consuming the most data
  • set warnings and limits when a certain threshold is reached

See also:

Firmware files for drivers in Linux

What is Linux Firmware for?

Firmware can be confusing because not all users remember them, and firmware are not always pre-installed on Linux distributions. At the same time, firmware is just as important for the normal operation of devices as are drivers (kernel modules), which usually already exist in the system, since they are part of the Linux kernel.

Due to the lack of firmware, the device may not work completely or partially.

The name of the firmware packages differs in distributions (and sometimes it differs in an unobvious way, for example, by rearranging words). Firmware packages can contain both firmware for devices from different manufacturers, and for devices from the same manufacturer.

Sometimes firmware from one manufacturer is divided in different packages, for example, the firmware-intel-sound package contains firmware for Intel sound devices, and the firmware-iwlwifi package contains firmware for Intel wireless cards.

There are cases when the firmware of devices of the same type and the same manufacturer is divided into different packages, for example, the firmware-ath9k-htc and firmware-atheros packages contain firmware for Atheros wireless adapters.

Examples of problems that missing firmware can cause:

Firmware in Kali Linux

Kali Linux has several firmware packages, for example:

  • firmware-linux-free
  • firmware-linux-nonfree
  • firmware-misc-nonfree

The first two packages contain firmware that was previously included in the Linux kernel. The first package contains firmware that complies with the Debian Free Software Guidelines, the second contains the rest that do not comply with the Free Software Guidelines. Most of the firmware got into the non-free package. And the third package contains… more firmware.

In addition to these packages, there are packages containing firmware for certain devices from certain manufacturers, for example, firmware-realtek, firmware-atheros, firmware-iwlwifi.

The Kali Linux repository also has two metapackages:

  • firmware-linux – includes firmware-linux-free and firmware-linux-nonfree
  • kali-linux-firmware – includes bluez-firmware, firmware-amd-graphics, firmware-atheros, firmware-brcm80211, firmware-intel-sound, firmware-iwlwifi, firmware-libertas, firmware-linux, firmware-misc-nonfree, firmware-realtek, firmware-sof-signed, firmware-ti-connectivity, firmware-zd1211

In order not to experience problems with Wi-Fi and other devices in the future, it is recommended to install the kali-linux-firmware package, which will install most of the necessary firmware.

In Kali Linux, it is convenient to search for firmware packages with a command like

apt search SEARCH_STRING

As SEARCH_STRING, you can specify the name of the device, manufacturer, chipset of the device, the name of the firmware file, if you know it.

Firmware in Debian

In Debian, in addition to the firmware-linux-free, firmware-linux-nonfree, and firmware-misc-nonfree packages already familiar from Kali Linux, there is also the already familiar firmware-linux metapackage that combines the first two.

In addition to those discussed, there are firmware for devices from individual manufacturers, for example, firmware-iwlwifi, firmware-ath9k-htc, firmware-atheros, firmware-amd-graphics and others.

Firmware in Ubuntu, Linux Mint

In these distributions, the firmware is not divided into free and nonfree and is placed in one package called linux-firmware.

In addition to this package, there are also firmware for certain manufacturers, such as firmware-ath9k-htc, nouveau-firmware and others.

In general, in Ubuntu and Linux Mint, most of the firmware is collected in a single linux-firmware package, it is convenient!

But the search for firmware packages with a command like

apt search SEARCH_STRING

practically useless if you are trying to search by device model, chipset or firmware file. If you searched and did not find a separate package for your device, then most likely the firmware you need is contained in the linux-firmware package.

Firmware in Arch Linux, Manjaro, BlackArch

Until recently, all firmware were collected in one linux-firmware package. But some large and rare firmware have been divied into separate packages, details in the article “Changes in the linux-firmware package: kernel requirements, separating large files into separate packages”.

How to install all firmware for various drivers in the Linux kernel

In order to avoid possible problems due to missing firmware in the future, it is recommended to install them, since they take up relatively little disk space. Previously, many firmware were part of the kernel (which is understandable, given their importance), but were removed from the kernel, apparently to save space.

Installation of the main firmware packages is performed by the following commands.

On Kali Linux:

sudo apt install kali-linux-firmware

On Debian:

sudo apt install firmware-linux firmware-misc-nonfree firmware-iwlwifi firmware-ath9k-htc

On Ubuntu, Linux Mint:

sudo apt install linux-firmware firmware-iwlwifi firmware-ath9k-htc

On Arch Linux, Manjaro, BlackArch:

sudo pacman -S linux-firmware

Linux does not see Wi-Fi on Intel chipset. “firmware: failed to load iwlwifi” error (SOLVED)

Built-in Wi-Fi adapter manufactured by Intel is not detected by the system. Linux does not see the Wi-Fi device as if it is not connected.

To view system events since the last boot, run the following command.

journalctl -b

You can scroll through the output or search for “iwlwifi”.

An example output related to a non-working Wi-Fi adapter on an Intel chipset:

Jan 27 11:57:00 HackWare-Kali kernel: Intel(R) Wireless WiFi driver for Linux
Jan 27 11:57:00 HackWare-Kali kernel: iwlwifi 0000:00:14.3: enabling device (0000 -> 0002)
Jan 27 11:57:00 HackWare-Kali kernel: iwlwifi 0000:00:14.3: firmware: failed to load iwlwifi-9000-pu-b0-jf-b0-46.ucode (-2)
Jan 27 11:57:00 HackWare-Kali kernel: firmware_class: See https://wiki.debian.org/Firmware for information about missing firmware
Jan 27 11:57:00 HackWare-Kali kernel: iwlwifi 0000:00:14.3: Direct firmware load for iwlwifi-9000-pu-b0-jf-b0-46.ucode failed with error -2
Jan 27 11:57:00 HackWare-Kali kernel: iwlwifi 0000:00:14.3: firmware: failed to load iwlwifi-9000-pu-b0-jf-b0-45.ucode (-2)
Jan 27 11:57:00 HackWare-Kali kernel: iwlwifi 0000:00:14.3: Direct firmware load for iwlwifi-9000-pu-b0-jf-b0-45.ucode failed with error -2
Jan 27 11:57:00 HackWare-Kali kernel: iwlwifi 0000:00:14.3: firmware: failed to load iwlwifi-9000-pu-b0-jf-b0-44.ucode (-2)
Jan 27 11:57:00 HackWare-Kali kernel: iwlwifi 0000:00:14.3: Direct firmware load for iwlwifi-9000-pu-b0-jf-b0-44.ucode failed with error -2
Jan 27 11:57:00 HackWare-Kali kernel: iwlwifi 0000:00:14.3: firmware: failed to load iwlwifi-9000-pu-b0-jf-b0-43.ucode (-2)
Jan 27 11:57:00 HackWare-Kali kernel: iwlwifi 0000:00:14.3: Direct firmware load for iwlwifi-9000-pu-b0-jf-b0-43.ucode failed with error -2
Jan 27 11:57:00 HackWare-Kali kernel: iwlwifi 0000:00:14.3: firmware: failed to load iwlwifi-9000-pu-b0-jf-b0-42.ucode (-2)
Jan 27 11:57:00 HackWare-Kali kernel: iwlwifi 0000:00:14.3: Direct firmware load for iwlwifi-9000-pu-b0-jf-b0-42.ucode failed with error -2
Jan 27 11:57:00 HackWare-Kali kernel: iwlwifi 0000:00:14.3: firmware: failed to load iwlwifi-9000-pu-b0-jf-b0-41.ucode (-2)
Jan 27 11:57:00 HackWare-Kali kernel: iwlwifi 0000:00:14.3: Direct firmware load for iwlwifi-9000-pu-b0-jf-b0-41.ucode failed with error -2
Jan 27 11:57:00 HackWare-Kali kernel: iwlwifi 0000:00:14.3: firmware: failed to load iwlwifi-9000-pu-b0-jf-b0-40.ucode (-2)
Jan 27 11:57:00 HackWare-Kali kernel: iwlwifi 0000:00:14.3: Direct firmware load for iwlwifi-9000-pu-b0-jf-b0-40.ucode failed with error -2
Jan 27 11:57:00 HackWare-Kali kernel: iwlwifi 0000:00:14.3: firmware: failed to load iwlwifi-9000-pu-b0-jf-b0-39.ucode (-2)
Jan 27 11:57:00 HackWare-Kali kernel: iwlwifi 0000:00:14.3: Direct firmware load for iwlwifi-9000-pu-b0-jf-b0-39.ucode failed with error -2
Jan 27 11:57:00 HackWare-Kali kernel: iwlwifi 0000:00:14.3: firmware: failed to load iwlwifi-9000-pu-b0-jf-b0-38.ucode (-2)
Jan 27 11:57:00 HackWare-Kali kernel: iwlwifi 0000:00:14.3: Direct firmware load for iwlwifi-9000-pu-b0-jf-b0-38.ucode failed with error -2
Jan 27 11:57:00 HackWare-Kali kernel: iwlwifi 0000:00:14.3: firmware: failed to load iwlwifi-9000-pu-b0-jf-b0-37.ucode (-2)
Jan 27 11:57:00 HackWare-Kali kernel: iwlwifi 0000:00:14.3: Direct firmware load for iwlwifi-9000-pu-b0-jf-b0-37.ucode failed with error -2
Jan 27 11:57:00 HackWare-Kali kernel: iwlwifi 0000:00:14.3: firmware: failed to load iwlwifi-9000-pu-b0-jf-b0-36.ucode (-2)
Jan 27 11:57:00 HackWare-Kali kernel: iwlwifi 0000:00:14.3: Direct firmware load for iwlwifi-9000-pu-b0-jf-b0-36.ucode failed with error -2
Jan 27 11:57:00 HackWare-Kali kernel: iwlwifi 0000:00:14.3: firmware: failed to load iwlwifi-9000-pu-b0-jf-b0-35.ucode (-2)
Jan 27 11:57:00 HackWare-Kali kernel: iwlwifi 0000:00:14.3: Direct firmware load for iwlwifi-9000-pu-b0-jf-b0-35.ucode failed with error -2
Jan 27 11:57:00 HackWare-Kali kernel: iwlwifi 0000:00:14.3: firmware: failed to load iwlwifi-9000-pu-b0-jf-b0-34.ucode (-2)
Jan 27 11:57:00 HackWare-Kali kernel: iwlwifi 0000:00:14.3: Direct firmware load for iwlwifi-9000-pu-b0-jf-b0-34.ucode failed with error -2
Jan 27 11:57:00 HackWare-Kali kernel: iwlwifi 0000:00:14.3: firmware: failed to load iwlwifi-9000-pu-b0-jf-b0-33.ucode (-2)
Jan 27 11:57:00 HackWare-Kali kernel: iwlwifi 0000:00:14.3: Direct firmware load for iwlwifi-9000-pu-b0-jf-b0-33.ucode failed with error -2
Jan 27 11:57:00 HackWare-Kali kernel: iwlwifi 0000:00:14.3: firmware: failed to load iwlwifi-9000-pu-b0-jf-b0-32.ucode (-2)
Jan 27 11:57:00 HackWare-Kali kernel: iwlwifi 0000:00:14.3: Direct firmware load for iwlwifi-9000-pu-b0-jf-b0-32.ucode failed with error -2
Jan 27 11:57:00 HackWare-Kali kernel: iwlwifi 0000:00:14.3: firmware: failed to load iwlwifi-9000-pu-b0-jf-b0-31.ucode (-2)
Jan 27 11:57:00 HackWare-Kali kernel: iwlwifi 0000:00:14.3: Direct firmware load for iwlwifi-9000-pu-b0-jf-b0-31.ucode failed with error -2
Jan 27 11:57:00 HackWare-Kali kernel: iwlwifi 0000:00:14.3: firmware: failed to load iwlwifi-9000-pu-b0-jf-b0-30.ucode (-2)
Jan 27 11:57:00 HackWare-Kali kernel: iwlwifi 0000:00:14.3: Direct firmware load for iwlwifi-9000-pu-b0-jf-b0-30.ucode failed with error -2
Jan 27 11:57:00 HackWare-Kali kernel: iwlwifi 0000:00:14.3: minimum version required: iwlwifi-9000-pu-b0-jf-b0-30
Jan 27 11:57:00 HackWare-Kali kernel: iwlwifi 0000:00:14.3: maximum version supported: iwlwifi-9000-pu-b0-jf-b0-46
Jan 27 11:57:00 HackWare-Kali kernel: iwlwifi 0000:00:14.3: check git://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git

To search the system log, you can use the following command:

journalctl -b | grep iwlwifi

In the output, the key line is “firmware: failed to load iwlwifi-9000-*.ucode (-2)”, that is, it was not possible to load the iwlwifi firmware.

Searching the package repository

apt search iwlwifi

showed that in Kali Linux, the iwlwifi firmware is placed in the firmware-iwlwifi package, install it:

sudo apt install firmware-iwlwifi

On Ubuntu, Linux Mint and Debian, run the following command to install the firmware:

sudo apt install firmware-iwlwifi

On Arch Linux, Manjaro, BlackArch and their derivatives, run the command:

sudo pacman -S linux-firmware

After installing the firmware and restarting the computer, the problem will disappear and the Wi-Fi adapter will work.

Linux does not see Wi-Fi on Realtek chipset. “firmware: failed to load rt2870.bin” error (SOLVED)

When connecting a Wi-Fi adapter with a Realtek chipset, nothing happens, or the device does not work properly.

Command

iw dev

outputs the following information:

phy#0
        Interface wlan0
                ifindex 3
                wdev 0x1
                addr 52:e7:b0:49:a2:84
                type managed
                txpower 0.00 dBm

The txpower value is zero, the system does not see the Wi-Fi device.

Run command

journalctl -f

and connect the Wi-Fi adapter to your computer

Jan 27 06:09:24 HackWare-Kali kernel: usb 1-1: reset high-speed USB device number 2 using ehci-pci
Jan 27 06:09:25 HackWare-Kali kernel: ieee80211 phy0: rt2x00_set_rt: Info - RT chipset 3572, rev 0223 detected
Jan 27 06:09:25 HackWare-Kali kernel: ieee80211 phy0: rt2x00_set_rf: Info - RF chipset 0009 detected
Jan 27 06:09:25 HackWare-Kali kernel: ieee80211 phy0: Selected rate control algorithm 'minstrel_ht'
Jan 27 06:09:25 HackWare-Kali NetworkManager[612]:   [1643281765.9900] device (wlan0): driver supports Access Point (AP) mode
Jan 27 06:09:25 HackWare-Kali systemd[1]: Starting Load/Save RF Kill Switch Status...
Jan 27 06:09:25 HackWare-Kali NetworkManager[612]:   [1643281765.9949] manager: (wlan0): new 802.11 Wi-Fi device (/org/freedesktop/NetworkManager/Devices/3)
Jan 27 06:09:25 HackWare-Kali kernel: usbcore: registered new interface driver rt2800usb
Jan 27 06:09:26 HackWare-Kali systemd-udevd[1328]: Using default interface naming scheme 'v250'.
Jan 27 06:09:26 HackWare-Kali NetworkManager[612]:   [1643281766.0124] rfkill0: found Wi-Fi radio killswitch (at /sys/devices/pci0000:00/0000:00:0b.0/usb1/1-1/1-1:1.0/ieee80211/phy0/rfkill0) (driver rt2800usb)
Jan 27 06:09:26 HackWare-Kali systemd[1]: Started Load/Save RF Kill Switch Status.
Jan 27 06:09:26 HackWare-Kali NetworkManager[612]:   [1643281766.0298] device (wlan0): state change: unmanaged -> unavailable (reason 'managed', sys-iface-state: 'external')
Jan 27 06:09:26 HackWare-Kali kernel: ieee80211 phy0: rt2x00lib_request_firmware: Info - Loading firmware file 'rt2870.bin'
Jan 27 06:09:26 HackWare-Kali kernel: rt2800usb 1-1:1.0: firmware: failed to load rt2870.bin (-2)
Jan 27 06:09:26 HackWare-Kali kernel: firmware_class: See https://wiki.debian.org/Firmware for information about missing firmware
Jan 27 06:09:26 HackWare-Kali kernel: rt2800usb 1-1:1.0: Direct firmware load for rt2870.bin failed with error -2
Jan 27 06:09:26 HackWare-Kali kernel: ieee80211 phy0: rt2x00lib_request_firmware: Info - Loading firmware file 'rt2870.bin'
Jan 27 06:09:26 HackWare-Kali kernel: rt2800usb 1-1:1.0: firmware: failed to load rt2870.bin (-2)
Jan 27 06:09:26 HackWare-Kali kernel: rt2800usb 1-1:1.0: Direct firmware load for rt2870.bin failed with error -2
Jan 27 06:09:26 HackWare-Kali NetworkManager[612]:   [1643281766.0307] device (wlan0): firmware may be missing.
Jan 27 06:09:26 HackWare-Kali NetworkManager[612]:   [1643281766.0310] device (wlan0): set-hw-addr: set MAC address to 52:E7:B0:49:A2:84 (scanning)
Jan 27 06:09:26 HackWare-Kali dbus-daemon[611]: [system] Activating via systemd: service name='org.freedesktop.Avahi' unit='dbus-org.freedesktop.Avahi.service' requested by ':1.72' (uid=119 pid=1345 comm="/usr/libexec/colord-sane ")
Jan 27 06:09:26 HackWare-Kali dbus-daemon[611]: [system] Activation via systemd failed for unit 'dbus-org.freedesktop.Avahi.service': Unit dbus-org.freedesktop.Avahi.service not found.
Jan 27 06:09:28 HackWare-Kali ModemManager[639]:   [base-manager] couldn't check support for device '/sys/devices/pci0000:00/0000:00:0b.0/usb1/1-1': not supported by any plugin
Jan 27 06:09:31 HackWare-Kali systemd[1]: systemd-rfkill.service: Deactivated successfully.
Jan 27 06:09:33 HackWare-Kali systemd[1]: blueman-mechanism.service: Deactivated successfully.

In the output, the key line is “firmware: failed to load rt2870.bin”, that is, it was not possible to load the firmware rt2870.bin.

In Kali Linux, the rt2870.bin firmware is placed in the firmware-misc-nonfree package, install it:

sudo apt install firmware-misc-nonfree

On Ubuntu, Linux Mint and their derivatives, run the following command:

sudo apt install linux-firmware

On Debian, run:

sudo apt install firmware-misc-nonfree

On Arch Linux, Manjaro, BlackArch and their derivatives, run the command:

sudo pacman -S linux-firmware

After installing the firmware and restarting the computer, the problem will disappear and the Wi-Fi adapter will work.

Note that Debian and derivatives have a firmware-realtek package which also contains Realtek firmware. In addition to these two packages, various distributions contain Realtek drivers and firmware in separate packages – to determine exactly which package you need, search your distribution's package repository for the name of the Wi-Fi adapter, as well as the name of the driver and firmware file that may appear in the error message.

See also the section “Drivers and firmware”.

Linux does not see Alfa AWUS036NHA. “firmware: failed to load ath9k_htc” error (SOLVED)

When connecting a Wi-Fi adapter based on the Atheros chipset, such as Alfa AWUS036NHA, a Linux computer does not see the Wi-Fi device. Command

iw dev

does not output anything, as if the device is not connected.

In the Linux Wi-Fi Cheat Sheet: Tips and Troubleshooting, we'll use the advice from the “How to ask a question about a problem with a Wi-Fi adapter” section, namely, open several terminal windows and run the following commands in them:

iw event
ip monitor
journalctl -f

Then plug the Wi-Fi adapter to the computer.

journalctl gave the following messages:

Jan 27 00:55:28 HackWare-Kali kernel: usb 1-1: ath9k_htc: Firmware ath9k_htc/htc_9271-1.4.0.fw requested
Jan 27 00:55:28 HackWare-Kali kernel: usb 1-1: firmware: failed to load ath9k_htc/htc_9271-1.4.0.fw (-2)
Jan 27 00:55:28 HackWare-Kali kernel: usb 1-1: Direct firmware load for ath9k_htc/htc_9271-1.4.0.fw failed with error -2
Jan 27 00:55:28 HackWare-Kali kernel: usb 1-1: ath9k_htc: Firmware htc_9271.fw requested
Jan 27 00:55:28 HackWare-Kali kernel: usb 1-1: firmware: failed to load htc_9271.fw (-2)
Jan 27 00:55:28 HackWare-Kali kernel: usb 1-1: Direct firmware load for htc_9271.fw failed with error -2
Jan 27 00:55:28 HackWare-Kali kernel: usb 1-1: no suitable firmware found!
Jan 27 00:55:28 HackWare-Kali kernel: usb 1-1: ath9k_htc: USB layer deinitialized

The key to solving the problem in these messages is the information that the ath9k_htc firmware is not loaded. For devices to work, in addition to the driver (which can be part of the kernel or installed separately), firmware is required.

Let's search for the firmware:

apt search ath9k_htc

In Kali Linux, the ath9k_htc firmware is placed in a separate firmware-atheros package, install it:

sudo apt install firmware-atheros

On Debian, Ubuntu and Linux Mint, run the following command to install:

sudo apt firmware-ath9k-htc

On Arch Linux, Manjaro, BlackArch and their derivatives, run the command:

sudo pacman -S linux-firmware

After installing the firmware and restarting the computer, the problem will disappear and the Wi-Fi adapter will work.

Why does my phone not switch to mobile Internet for a long time (SOLVED)

A Wi-Fi connection is generally faster and more stable than a mobile Internet connection. Therefore, when possible, most users use Wi-Fi, which is usually free and unlimited. At home, at work, sometimes even on public transport, we connect to Wi-Fi and enjoy a good quality Internet connection.

When you disconnect from Wi-Fi, your phone is set to switch to mobile internet so you can stay online at all times. You may have noticed that if you are already quite far from the wireless Access Point (for example, you left the house), then the Wi-Fi connection icon will still be shown on the phone, albeit with a weak signal, but if you try to use the Internet, then it may turn out that the connection is actually missing.

In this article, you will learn how to turn on the hidden setting on Android phones to quickly disconnect from Wi-Fi when the signal is weak.

To find this setting, you need to enable Developer options.

To enable Developer options, open the Settings screen, scroll down and tap About Phone or About Tablet.

We need to find an item with information about the build number. Scroll down, you can probably see it right away. If not, look for items like “Software Information” and navigate to it.

Find “Build number”.

Tap the Build number box seven times to enable Developer options. Press a few times and you will see a countdown toast notification that says “You are now X steps away from the developer”.

When you are done, you will see the message “You are a developer now!” Congratulations. Don't let this newfound power hit you in the head.

Press the Back button and you'll see the Developer options menu just below or just above the About Phone section in Settings. This menu is now enabled on your device – you don't have to repeat this process until you've done a factory reset.

So, go to Developer options.

In the “Network” section, find the item "Aggressive Wi-Fi/cell handover”.

The comments to this point say: Switch from Wi-Fi to mobile networks more quickly when the Wi-Fi signal is weak.

That is, if the signal is really weak and the power of the phone's transmitter is simply not enough to deliver data to the router, then disconnection from Wi-Fi will be performed. This situation is not uncommon: the phone sees the signal from the router, but the router cannot receive the signal from the phone, since the router has a more powerful transmitter and, as a rule, external, larger antennas.

While using Wi-Fi, the phone is still connected to mobile networks to make calls and send or receive SMS. But the Internet connection on mobile networks is turned off. As a result, when disconnecting from Wi-Fi, the phone takes some time to establish an Internet connection on the mobile network. You can enable the “Keep mobile data turned on” setting.

A note to this option says: Keep mobile data turned on at all times, even while Wi-Fi is in use, to make it quicker to switch networks.

As a result, when you disconnect from Wi-Fi, you can immediately use the mobile Internet without delay in connecting to it.

Most likely, turning on the last setting (Keep mobile data turned on at all times) will lead to a small additional traffic consumption. And enabling the option to aggressively disconnect from Wi-Fi when the signal is weak can increase the number of disconnections if you often have a weak signal.

Therefore, experiment with these options – they may make communication more or less comfortable depending on your specific conditions. The final decision on their use you need to make after checking in practice how they suit you.

How to install Wi-Fi driver in Linux if the computer is offline

If you cannot connect to Wi-Fi because the wireless card driver is not yet installed in your Linux and there is no wired connection, then you get a vicious circle: it is impossible to install the driver because there is no Internet.

There is a way out of the situation – for this you only need an Android phone. Moreover, you do not need to use mobile data, you can use a Wi-Fi connection via your phone.

How to use an Android phone as a USB tethering

It's pretty simple. Start by connecting your phone to your computer with a USB cable.

Then go to settings. The name of the settings items may differ on different phone models, but the essence will be the same everywhere.

Go to the “Connections” section.

Find the item “Mobile Hotspot and Tethering” there.

Turn on “USB tethering”.

Everything is ready – now your computer is online and can connect to the Internet. You can install Wi-Fi drivers or perform other actions you want on the network.

Please note that if the phone is not connected to Wi-Fi, then mobile data will be used – if you do not have an unlimited tariff, then it will cost you money. But you can connect your phone to a Wi-Fi network and still use it as a USB modem. As a result, it turns out that your computer is using Wi-Fi over the phone, and not mobile data.

libpcap-dev for Cygwin

When compiling programs from source in Cygwin, an error may occur containing the line “when searching for -lwpcap”.

The essence of the error is that the headers of the pcap library are searched.

These header files are present in the libpcap-dev package (Debian and derivatives). This package may also be called libpcap (for example, on Arch Linux). There are no such packages in the Cygwin repositories, since their functioning is closely related to the operating system drivers and libpcap is intended for Linux, while Cygwin runs on Windows.

When traversing the file system looking for the correct header files, the following messages may be displayed:

/usr/lib/gcc/x86_64-pc-cygwin/4.9.3/../../../../x86_64-pc-cygwin/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-pc-cygwin/4.9.3/../../../../lib/libwpcap.a when searching for -lwpcap
/usr/lib/gcc/x86_64-pc-cygwin/4.9.3/../../../../x86_64-pc-cygwin/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-pc-cygwin/4.9.3/../../../../lib/libwpcap.a when searching for -lwpcap
/usr/lib/gcc/x86_64-pc-cygwin/4.9.3/../../../../x86_64-pc-cygwin/bin/ld: skipping incompatible /lib/../lib/libwpcap.a when searching for -lwpcap
/usr/lib/gcc/x86_64-pc-cygwin/4.9.3/../../../../x86_64-pc-cygwin/bin/ld: skipping incompatible /lib/../lib/libwpcap.a when searching for -lwpcap
/usr/lib/gcc/x86_64-pc-cygwin/4.9.3/../../../../x86_64-pc-cygwin/bin/ld: skipping incompatible /usr/lib/../lib/libwpcap.a when searching for -lwpcap
/usr/lib/gcc/x86_64-pc-cygwin/4.9.3/../../../../x86_64-pc-cygwin/bin/ld: skipping incompatible /usr/lib/../lib/libwpcap.a when searching for -lwpcap
/usr/lib/gcc/x86_64-pc-cygwin/4.9.3/../../../../x86_64-pc-cygwin/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-pc-cygwin/4.9.3/../../../libwpcap.a when searching for -lwpcap
/usr/lib/gcc/x86_64-pc-cygwin/4.9.3/../../../../x86_64-pc-cygwin/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-pc-cygwin/4.9.3/../../../libwpcap.a when searching for -lwpcap
/usr/lib/gcc/x86_64-pc-cygwin/4.9.3/../../../../x86_64-pc-cygwin/bin/ld: skipping incompatible /usr/lib/libwpcap.a when searching for -lwpcap
/usr/lib/gcc/x86_64-pc-cygwin/4.9.3/../../../../x86_64-pc-cygwin/bin/ld: skipping incompatible /usr/lib/libwpcap.a when searching for -lwpcap
/usr/lib/gcc/x86_64-pc-cygwin/4.9.3/../../../../x86_64-pc-cygwin/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-pc-cygwin/4.9.3/../../../../lib/libwpcap.a when searching for -lwpcap
/usr/lib/gcc/x86_64-pc-cygwin/4.9.3/../../../../x86_64-pc-cygwin/bin/ld: skipping incompatible /lib/../lib/libwpcap.a when searching for -lwpcap
/usr/lib/gcc/x86_64-pc-cygwin/4.9.3/../../../../x86_64-pc-cygwin/bin/ld: skipping incompatible /usr/lib/../lib/libwpcap.a when searching for -lwpcap
/usr/lib/gcc/x86_64-pc-cygwin/4.9.3/../../../../x86_64-pc-cygwin/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-pc-cygwin/4.9.3/../../../libwpcap.a when searching for -lwpcap
/usr/lib/gcc/x86_64-pc-cygwin/4.9.3/../../../../x86_64-pc-cygwin/bin/ld: skipping incompatible /usr/lib/libwpcap.a when searching for -lwpcap
/usr/lib/gcc/x86_64-pc-cygwin/4.9.3/../../../../x86_64-pc-cygwin/bin/ld: cannot find -lwpcap
collect2: error: ld returned 1 exit status

As an alternative to libpcap for Windows (and therefore also for Cygwin) you can use:

  • WinPCAP – popular software, but no longer developed and maintained
  • Npcap – based on WinPCAP and is actively developing at the present time

To compile programs that require the libpcap library, you need source files, WinPCAP or Npcap headers.

The WinPCAP header files are in the Developer's Pack, and the Npcap header files can be found in the Npcap SDK.

WinPCAP for Cygwin

Follow the steps below to install WinPCAP headers in Cygwin.

Go to https://www.winpcap.org/devel.htm and download the developer pack.

Unpack the downloaded archive.

Copy the libraries:

  • WpdPack\Lib\libpacket.a in cygwin\lib\
  • WpdPack\Lib\libwpcap.a in cygwin\lib\

Copy headers from WpdPack\Include to cygwin\usr\include\.

Make sure you have the Winpcap libraries installed and that they are available in the PATH by running the commands:

which Packet.dll
which wpcap.dll

They should be in /cygdrive/c/WINDOWS/system32/.

Npcap for Cygwin

Go to https://nmap.org/npcap/ and download the Npcap SDK.

Unpack the downloaded archive.

Copy headers from Include to cygwin\usr\include\.

Make sure you have the Npcap libraries installed and that they are available in the PATH by running the commands:

which Packet.dll
which wpcap.dll

They should be in /cygdrive/c/WINDOWS/system32/.

How to fix ERR_NETWORK_CHANGED error (SOLVED)

What is the error ERR_NETWORK_CHANGED

The ERR_NETWORK_CHANGED error shows the Google Chrome web browser when it was unable to load the site page due to the change in network parameters. More specifically, the web browser initiated the connection and the remote host responded, but before the page was loaded, something changed on the network.

Your connection was interrupted
A network change was detected.
ERR_NETWORK_CHANGED

ERR_NETWORK_CHANGED means that changes have occurred in the your local network, as a result of which already established connections cannot be continued, that is, they are broken, but there are no obstacles to establishing new connections.

Examples of situations where ERR_NETWORK_CHANGED is the norm, that is, when the network is really changing:

  • reconnecting to a Wi-Fi hotspot
  • connecting to another Wi-Fi hotspot
  • VPN connection established
  • reconnection to another Cellular Network base station
  • switch from wired to wireless network connection or vice versa
  • changing the used network adapter – for example, the computer is connected to Wi-Fi, and then connects to a wired network, as a result, the wired network adapter starts to be used, it also becomes the default gateway
  • the computer's IP address has changed

That is, in these situations, ERR_NETWORK_CHANGED is inevitable if you continue to use the network when reconnecting. If at the time of reconnection you are not using the network, then you will not notice anything.

ERR_NETWORK_CHANGED error often occurs when connecting to Wi-Fi

But there is a strange situation when, without reconnections, when using the same Wi-Fi Access Point, the ERR_NETWORK_CHANGED error occurs.

The likely cause of the error is interference from other wireless access points. At 2.4 GHz, wireless routers can use 13 channels. Moreover, the router itself can choose the most suitable (that is, the least loaded) channel, or you can set the channel manually.

Routers of the same type can be configured to use the same channel by default, for example, channel 1, as a result, the frequencies of this channel are overloaded and Wi-Fi networks begin to interfere with each other. You can fix this problem by changing your router settings.

Go to the control panel of your router – to do this, open one of the following addresses in your web browser:

If none of the addresses worked, then refer to the documentation of your router.

Enter the username and password – if you have not changed it, then often this is the pair admin:admin, admin:password, if this does not work, then refer to the documentation of your router.

Find the Wi-Fi network settings section, find the channel settings:

And switch to another channel, or select “Auto”:

Save your settings. It may take a little time for the router to apply the settings. As for client devices (phones, computers), they do not need to configure anything – they will automatically determine the correct channel and switch to it.

The opposite situation is possible – the “network change” error appears due to the fact that the router in the automatic selection mode often changes channels. In this case, set a fixed channel. To do this, select the channel on which the connection is the fastest and most stable (this should be the least busy channel, but you will not be able to check this by conventional means).

Write in the comments if this method helped you to cope with the ERR_NETWORK_CHANGED error. If it doesn't help, then check if this error disappears if you use Wi-Fi closer to a wireless router – if it really helps, then due to insufficient signal strength (router or your device), you have an unstable connection. In this case, you can rearrange the router (or client device), or even replace the router with a more powerful one with external antennas.

Loading...
X