2022-01-16 18:20:39 +00:00
|
|
|
---
|
|
|
|
title: "wireless"
|
2022-01-26 22:35:07 +00:00
|
|
|
tags: [ "Documentation", "Networking" ]
|
2022-01-16 18:20:39 +00:00
|
|
|
---
|
2022-01-22 18:57:34 +00:00
|
|
|
|
|
|
|
# Check wifi's working
|
2023-06-17 19:28:20 +00:00
|
|
|
```bash
|
|
|
|
lspci -k
|
|
|
|
```
|
2022-01-22 18:57:34 +00:00
|
|
|
|
|
|
|
Or for usb wifi:
|
|
|
|
|
2023-06-17 19:28:20 +00:00
|
|
|
```bash
|
|
|
|
dmesg | grep usbcore
|
|
|
|
```
|
2022-01-22 18:57:34 +00:00
|
|
|
|
|
|
|
... and hopefully it'll say the new interface is registered.
|
|
|
|
|
|
|
|
# Check if a wifi interface has been created
|
|
|
|
|
2023-06-17 19:28:20 +00:00
|
|
|
```bash
|
|
|
|
ip link
|
|
|
|
```
|
2022-01-22 18:57:34 +00:00
|
|
|
|
|
|
|
or
|
|
|
|
|
2023-06-17 19:28:20 +00:00
|
|
|
```bash
|
|
|
|
iw dev
|
|
|
|
```
|
2022-01-22 18:57:34 +00:00
|
|
|
|
|
|
|
Assuming it's wlan0, bring it up with
|
|
|
|
|
2023-06-17 19:28:20 +00:00
|
|
|
```bash
|
|
|
|
ip link set wlan0 up
|
|
|
|
```
|
2022-01-22 18:57:34 +00:00
|
|
|
|
|
|
|
Error messages probably means your wireless chipset requires a firmware to function. In this case, check the kernel messages for firmware being loaded
|
|
|
|
|
2023-06-17 19:28:20 +00:00
|
|
|
```bash
|
|
|
|
dmesg | grep firmware
|
|
|
|
```
|
2022-01-22 18:57:34 +00:00
|
|
|
|
|
|
|
# Utilities
|
|
|
|
|
|
|
|
iw doesn't do wpa/wpa2. wpa_supplicant does everything. iwd does everything except WEXT encryption.
|
|
|
|
|
|
|
|
# Connecting
|
|
|
|
|
|
|
|
Get the link status:
|
|
|
|
|
2023-06-17 19:28:20 +00:00
|
|
|
```bash
|
|
|
|
iw dev wlan0 link
|
|
|
|
```
|
2022-01-22 18:57:34 +00:00
|
|
|
|
|
|
|
Scan for available points:
|
|
|
|
|
2023-06-17 19:28:20 +00:00
|
|
|
```bash
|
|
|
|
iw dev wlan0 scan
|
|
|
|
```
|
2022-01-22 18:57:34 +00:00
|
|
|
|
|
|
|
The connecting commands do not cover wpa2.
|
|
|
|
|