📚
jetson nano でWiFiを使う
手元にあった無名ブランドのUSBのWiFiドングルを挿してみたら認識したのでラッキー。そのメモ。
jetson nanoのリビジョンは以下の通り。
$ cat /etc/nv_tegra_release
# R32 (release), REVISION: 7.1, GCID: 29818004, BOARD: t210ref, EABI: aarch64, DATE: Sat Feb 19 17:05:08 UTC 2022
WiFiのUSBドングルを挿す
$ lsusb
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 002: ID 1a40:0801 Terminus Technology Inc.
Bus 001 Device 004: ID 0bda:0811 Realtek Semiconductor Corp.
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
$ lsusb -t
/: Bus 02.Port 1: Dev 1, Class=root_hub, Driver=tegra-xusb/4p, 5000M
/: Bus 01.Port 1: Dev 1, Class=root_hub, Driver=tegra-xusb/5p, 480M
|__ Port 2: Dev 4, If 0, Class=Vendor Specific Class, Driver=rtl8821au, 480M
|__ Port 3: Dev 2, If 0, Class=Hub, Driver=hub/4p, 480M
Realtek Semiconductor Corp.
として認識されました。
Driver=rtl8821au
となっているのでドライバーもロードされています。
ネットワークデバイスの状態の確認
nmcli
というnetwork-managerのcli版を使用します。
$ nmcli help
Usage: nmcli [OPTIONS] OBJECT { COMMAND | help }
OPTIONS
-t[erse] terse output
-p[retty] pretty output
-m[ode] tabular|multiline output mode
-c[olors] auto|yes|no whether to use colors in output
-f[ields] <field1,field2,...>|all|common specify fields to output
-g[et-values] <field1,field2,...>|all|common shortcut for -m tabular -t -f
-e[scape] yes|no escape columns separators in values
-a[sk] ask for missing parameters
-s[how-secrets] allow displaying passwords
-w[ait] <seconds> set timeout waiting for finishing operations
-v[ersion] show program version
-h[elp] print this help
OBJECT
g[eneral] NetworkManager's general status and operations
n[etworking] overall networking control
r[adio] NetworkManager radio switches
c[onnection] NetworkManager's connections
d[evice] devices managed by NetworkManager
a[gent] NetworkManager secret agent or polkit agent
m[onitor] monitor NetworkManager changes
$ nmcli d
DEVICE TYPE STATE CONNECTION
eth0 ethernet connected Wired connection 1
docker0 bridge connected docker0
wlan0 wifi disconnected --
l4tbr0 bridge unmanaged --
dummy0 dummy unmanaged --
rndis0 ethernet unmanaged --
usb0 ethernet unmanaged --
lo loopback unmanaged --
wlan0が存在しています。
WiFiをONにする
$ nmcli r wifi on
$ nmcli d wifi list
IN-USE SSID MODE CHAN RATE SIGNAL BARS SECURITY
F660A-S5b9-G Infra 6 405 Mbit/s 100 ▂▄▆█ WPA1 WPA2
F660A-S5b9-A Infra 36 405 Mbit/s 100 ▂▄▆█ WPA1 WPA2
F660T-Avst-A Infra 60 405 Mbit/s 45 ▂▄__ WPA1 WPA2
48E2448B1105-2G Infra 11 195 Mbit/s 34 ▂▄__ WPA1 WPA2
F660T-GzEF-A Infra 40 405 Mbit/s 29 ▂___ WPA1 WPA2
48E2448B1105-5G Infra 52 405 Mbit/s 29 ▂___ WPA1 WPA2
Buffalo-G-EF30 Infra 3 130 Mbit/s 27 ▂___ WPA2
アクセスポイントが見えました。
$ sudo nmcli d wifi connect F660A-S5b9-A password XXXXYYYY
Device 'wlan0' successfully activated with 'e471264d-e51a-47f4-aab3-c1cc4205cd48'.
パスワードは伏せ字にしてあります。
$ iwconfig
wlan0 IEEE 802.11AC ESSID:"F660A-S5b9-A" Nickname:"<WIFI@REALTEK>"
Mode:Managed Frequency:5.18 GHz Access Point: 8C:DC:02:47:2B:EE
Bit Rate:434 Mb/s Sensitivity:0/0
Retry:off RTS thr:off Fragment thr:off
Power Management:off
Link Quality=92/100 Signal level=75/100 Noise level=0/100
Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
Tx excessive retries:0 Invalid misc:0 Missed beacon:0
...
$ ip a
...
8: wlan0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
link/ether 04:5f:a7:11:93:82 brd ff:ff:ff:ff:ff:ff
inet 192.168.1.5/24 brd 192.168.1.255 scope global dynamic noprefixroute wlan0
valid_lft 86298sec preferred_lft 86298sec
inet6 240d:1a:4c5:8c00:78d2:f907:a336:4b60/64 scope global temporary dynamic
valid_lft 6822sec preferred_lft 6822sec
inet6 240d:1a:4c5:8c00:7510:5fb3:e221:f881/64 scope global dynamic mngtmpaddr noprefixroute
valid_lft 6822sec preferred_lft 6822sec
inet6 fe80::19cf:f721:ec5c:b4a3/64 scope link noprefixroute
valid_lft forever preferred_lft forever
IPアドレスも取得できました。
電源を切って再起動してもWiFiは使えました。
参考
関連
Discussion