Wireless stuff in Arch/Manjaro, power reduction #024

notes about:
 find the wireless card USB or PCI
 list driver
 check driver messages
 check wireless networks
 connect to a network
 reduce power usage

All commands under Manjaro 18.1.1, no additional software installed.



wireless devices are usually connected either to the USB bus or the PCI bus, to list devices in the usb bus open terminal and use lsusb command, use -t for tree output, -v for verbose mode, -vv for more verbose

lsusb -t -vv


there are two wireless devices, both on : /dev/bus/usb/002/008, to gather more details use the -D parameter:

lsusb -D /dev/bus/usb/002/008


so its a Bluetooth device that is connected to the USB bus.

Update(May/2021) added USB device AWUS036NH
the result of lsusb -t -vv now includes:

the driver that it uses is rt2800usb
so the result of driver message dmesg is:

to list devices on the PCI bus:

lspci -v


to get a bit more details about the device:

lspci -vv -s 04:00.0

so, the card is connected to pci bus, and the driver is iwlwifi, it is required to check if the driver was loaded during boot, so filter the kernel boot message by the driver name using driver message command dmesg:

sudo dmesg | grep iwlwifi


the iwlwifi driver is being loaded during boot, so according to the arch wiki its possible to add some options to the file /etc/modprobe.d/iwlwifi.conf to enable power saving and reduce power use by disabling wireless high speed:

sudo nano /etc/modprobe.d/iwlwifi.conf

options iwlwifi power_save=1 11n_disable=1

to check for more parameters, modinfo command might show some:

modinfo iwlwifi


options iwlwifi power_save=1 11n_disable=1 power_level=5

Useful wireless commands

to list the network devices/interfaces:

iw dev

get specific device/interface info:

iw dev wlp4s0 info

more on the link status :

iw dev wlp4s0 link

check signal strength and errors:

iw dev wlp4s0 station dump

to get all the devices capabilities:

iw list

scan for wireless networks:

iw dev wlp4s0 scan | less

to connect to a wireless networks:

sudo iw dev wlp4s0 connect "network ssid"

to check the status of the connection:

ip link

check connection :

ip link show wlp4s0

check ip address:

ip address show


from the command output we get ip address : "inet 192.168.3.4"

check gateway:

ip route show


from the command output we get gateway: "default via 192.168.3.1"

display tcp sockets with ports:

ss -atn

display udp ports:

ss -au

Attempting to create an Access Point using internet from USB Wifi adapter and internal Wifi as the interfacing hosting.
First step check if the adapter support Access Point mode (AP) using iw list command:

iw list

Using hostapd package to create the Acess Point by editing /etc/hostapd/hostapd.conf file




Comments