[linux][wifi][Lichee][D1-H] wifi 连接过程

root@MaixLinux:/mnt/SDCARD# wpa_cli -i wlan0 scan_result 
bssid / frequency / signal level / flags / ssid
3c:cd:57:7b:2c:cc	2467	-26	[WPA2-PSK-CCMP][ESS]	LEDL

root@MaixLinux:/mnt/SDCARD# wpa_cli -i wlan0 status  
wpa_state=SCANNING
address=34:20:03:2a:10:72
uuid=ef2db822-72be-54bf-b522-2b2085f586c8

root@MaixLinux:/mnt/SDCARD# wpa_cli -i wlan0 add_network 
1

root@MaixLinux:/mnt/SDCARD# wpa_cli set_network 1  ssid '"LEDL"' 
Selected interface 'wlan0'
OK

root@MaixLinux:/mnt/SDCARD# wpa_cli set_network 1 psk '"password"'
Selected interface 'wlan0'
OK

root@MaixLinux:/mnt/SDCARD# wpa_cli set_network 1 scan_ssid 1
Selected interface 'wlan0'
OK

root@MaixLinux:/mnt/SDCARD# wpa_cli set_network 1  priority  1
Selected interface 'wlan0'
OK

root@MaixLinux:/mnt/SDCARD# wpa_cli -i wlan0 save_config 
OK

root@MaixLinux:/mnt/SDCARD# wpa_cli -i wlan0 list_network
network id / ssid / bssid / flags
0	Sipeed_Test	any	
1	LEDL	any	[DISABLED]
root@MaixLinux:/mnt/SDCARD# wpa_cli -i wlan0 select_network 1
OK

root@MaixLinux:/mnt/SDCARD# wpa_cli -i wlan0 enable_network 1
OK

root@MaixLinux:/mnt/SDCARD# ifconfig 
wlan0     Link encap:Ethernet  HWaddr **************
          inet6 addr: ***********
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:2 errors:0 dropped:0 overruns:0 frame:0
          TX packets:11 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:322 (322.0 B)  TX bytes:2122 (2.0 KiB)

root@MaixLinux:/mnt/SDCARD# ping www.baidu.com
ping: bad address 'www.baidu.com'
root@MaixLinux:/mnt/SDCARD# ^C
root@MaixLinux:/mnt/SDCARD# cat /etc/wpa_supplicant.conf 
ctrl_interface=/var/run/wpa_supplicant
update_config=1


root@MaixLinux:/mnt/SDCARD# dmesg | tail -n 20
[  510.898829] RTW: static smps : N
[  510.898834] RTW: bw_mode : 40MHz, ra_bw_mode : 40MHz
[  510.898838] RTW: rate_id : 5
[  510.898843] RTW: rssi : 79 (%), rssi_level : 0
[  510.898848] RTW: is_support_sgi : Y, is_vht_enable : N
[  510.898853] RTW: disable_ra : N, disable_pt : N
[  510.898856] RTW: is_noisy : N
[  510.898860] RTW: txrx_state : 0
[  510.898866] RTW: curr_tx_rate : CCK_1M (L)
[  510.898869] RTW: curr_tx_bw : 20MHz
[  510.898873] RTW: curr_retry_ratio : 0
[  510.898877] RTW: ra_mask : 0x00000000000ffff0
[  510.898877] 
[  510.995543] RTW: recv eapol packet 1/4
[  510.996260] RTW: send eapol packet 2/4
[  510.998453] RTW: recv eapol packet 3/4
[  510.998799] RTW: send eapol packet 4/4
[  510.999655] IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready
[  510.999904] RTW: set pairwise key camid:0, addr:3c:cd:57:7b:****, kid:0, type:AES
[  511.001365] RTW: set group key camid:1, addr:3c:cd:57:7b:****, kid:2, type:AES
root@MaixLinux:/mnt/SDCARD# wpa_cli -i wlan0 select_network 1
OK
root@MaixLinux:/mnt/SDCARD#  wpa_cli -i wlan0 enable_network 1
OK

posted @ 2023-07-25 09:40  dysonnnn  阅读(30)  评论(0编辑  收藏  举报