lk/networking/wireless.md

66 lines
842 B
Markdown
Raw Normal View History

2022-01-16 18:20:39 +00:00
---
title: "wireless"
2025-02-12 21:50:27 +00:00
tags: [ "networking" ]
2022-01-16 18:20:39 +00:00
---
2022-01-22 18:57:34 +00:00
2025-02-12 21:50:27 +00:00
Check wifi's working
```sh
lspci -k
```
2022-01-22 18:57:34 +00:00
Or for usb wifi:
2025-02-12 21:50:27 +00:00
```sh
dmesg | grep usbcore
```
2022-01-22 18:57:34 +00:00
2025-02-12 21:50:27 +00:00
...and hopefully it'll say the new interface is registered.
2022-01-22 18:57:34 +00:00
2025-02-12 21:50:27 +00:00
Check if a wifi interface has been created
2022-01-22 18:57:34 +00:00
2025-02-12 21:50:27 +00:00
```sh
ip link
```
2022-01-22 18:57:34 +00:00
2025-02-12 21:50:27 +00:00
...or
2022-01-22 18:57:34 +00:00
2025-02-12 21:50:27 +00:00
```sh
iw dev
```
2022-01-22 18:57:34 +00:00
Assuming it's wlan0, bring it up with
2025-02-12 21:50:27 +00:00
```sh
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
2025-02-12 21:50:27 +00:00
```sh
dmesg | grep firmware
```
2022-01-22 18:57:34 +00:00
# Utilities
2025-02-12 21:50:27 +00:00
- `iw` doesn't do wpa/wpa2.
- `iwd` does everything except WEXT encryption.
- `wpa_supplicant` does everything.
2022-01-22 18:57:34 +00:00
# Connecting
Get the link status:
2025-02-12 21:50:27 +00:00
```sh
iw dev wlan0 link
```
2022-01-22 18:57:34 +00:00
Scan for available points:
2025-02-12 21:50:27 +00:00
```sh
iw dev wlan0 scan
```
2022-01-22 18:57:34 +00:00
The connecting commands do not cover wpa2.