Tina通过命令行连接WiFi
-
首先配置wpa_supplicant的配置文件:/etc/wifi/ake.conf
ctrl_interface=/var/run/wpa_supplicant update_config=1 network={ ssid="(SSID)" psk="(PWD)" }
然后
# 主要连接操作 wpa_supplicant -Dnl80211 -iwlan0 -c/etc/wifi/ake.conf -B # 通过DHCP服务获得IP地址等信息 udhcpc -i wlan0 -B # 搜索WIFI wpa_cli -iwlan0 scan wpa_cli -iwlan0 scan_result # 检查WiFi连接状态 wpa_cli -iwlan0 status
WiFi已连接的应答
想开机配置网络和WiFi, 可以修改/etc/init.d/wpa_supplicant文件第48行左右:
if [ x$brlan=="xbr-lan" ]; then echo "change the default ip address 192.168.1.1" ifconfig br-lan 192.168.100.1 # 加你所想操作的指令 fi
-
我又一个更好的方法,不知当讲不当讲,
忍不住了,我还是说说
1.扫描wifi
root@TinaLinux:/# wifi_scan_results_test ********************************* ***Start scan!*** ********************************* bssid / frequency / signal level / flags / ssid 90:67:1c:f8:11:ac 2422 -37 [WPA-PSK-CCMP+TKIP][WPA2-PSK-CCMP+TKIP][WPS][ESS] AW-PDC-RTOS-MUSIC 9c:9d:7e:e1:a7:c6 2462 -45 [WPA2-PSK-CCMP][WPS][ESS] Redmi_9EC8 88:d7:f6:88:8b:c0 2412 -50 [WPA2-PSK-CCMP][WPS][ESS] AW-PDC-PD4-316Test 34:29:12:ac:c3:b9 2462 -56 [WPA2-PSK-CCMP][WPS][ESS] 50:d2:f5:f1:b7:08 2457 -58 [WPA-PSK-CCMP+TKIP][WPA2-PSK-CCMP+TKIP][WPS][ESS] AW-PDC-PD2-xiaomi2.4g 34:29:12:ac:c3:b8 2462 -59 [WPA2-PSK-CCMP][WPS][ESS] AW-PDC-KY_IPV6_1 80:e8:6f:d9:6b:80 2437 -61 [WPA-EAP-CCMP][WPA2-EAP-CCMP][ESS] AWOffice 3c:20:93:0e:2f:97 2412 -54 [WPA-PSK-TKIP][WPA2-PSK-CCMP][ESS] test_123 7e:b5:9b:1d:e2:89 2437 -64 [WPA2-PSK-CCMP][ESS] AWTest 7c:b5:9b:fd:e2:89 2437 -65 [WPA-EAP-CCMP+TKIP][WPA2-EAP-CCMP+TKIP][ESS] AWOffice 7e:b5:9b:2d:e2:89 2437 -66 [WPA-PSK-CCMP+TKIP][WPA2-PSK-CCMP+TKIP][ESS] CangKu-221 7e:b5:9b:3d:e2:89 2437 -66 [WPA-PSK-CCMP+TKIP][WPA2-PSK-CCMP+TKIP][ESS] AW-MLC-221 80:e8:6f:d9:6b:82 2437 -62 [WPA2-PSK-CCMP][ESS] AWTest ac:e3:42:9c:7f:78 2412 -64 [WPA2-PSK-CCMP][WPS][ESS] AW-PDC-PSW-CAI 04:d4:c4:b9:b9:f8 2457 -67 [WPA2-PSK-CCMP][WPS][ESS] ipv6 5c:a4:8a:bf:25:72 2437 -68 [WPA2-PSK-CCMP][ESS] AWTest 5c:a4:8a:bf:25:70 2437 -69 [WPA-EAP-CCMP][WPA2-EAP-CCMP][ESS] AWOffice bc:67:1c:f8:9f:80 2427 -70 [WPA2-PSK-CCMP][ESS] AWTest 2e:f4:32:07:7e:02 2452 -73 [WPA-PSK-CCMP+TKIP][WPA2-PSK-CCMP+TKIP][ESS] OUT RF 80:e8:6f:d9:fd:a2 2412 -74 [WPA2-PSK-CCMP][ESS] AWTest 38:1c:1a:2e:b3:50 2437 -74 [WPA-EAP-CCMP][WPA2-EAP-CCMP][ESS] AWOffice 80:e8:6f:d9:fd:a0 2412 -75 [WPA-EAP-CCMP][WPA2-EAP-CCMP][ESS] AWOffice 38:1c:1a:2e:b3:52 2437 -75 [WPA2-PSK-CCMP][ESS] AWTest ec:6c:9f:af:89:79 2452 -76 [WPA2-PSK-CCMP][ESS] AW-APD-GMSipv6 66:6e:97:1a:5a:e4 2462 -81 [WPA2-PSK-CCMP][ESS] AWTest 8c:be:be:2d:ec:22 2412 -81 [WPA-PSK-CCMP+TKIP][WPA2-PSK-CCMP+TKIP][WPS][ESS] AW-AE2-TEST1 80:8f:1d:8a:36:76 2412 -61 [ESS] AW-PDC-PD2-TEST-2.4G fc:53:9e:c1:b9:2d 2462 -72 [ESS] MEIZUtest ****************************** Wifi get_scan_results: Success! ******************************
2. 连接wifi
# 后面两个参数是 ssid 和 pwd root@TinaLinux:/# wifi_connect_ap_test AWTest xxxxxx ================================== Connecting to the network(AWTest)...... Connected to the AP(AWTest) Getting ip address(AWTest)...... Wifi connect ap : Success! ==================================
开机连接如上
-
-
-
-
此回复已被删除! -
这个怎么解决呢?
-
请问一下这是什么原因?
-
@yi20416yi log提示你检查驱动,你要先确定内核配置文件里面WiFi相关的驱动和选项都选好了,WiFi驱动也没问题并且编译上了,还有那你设备树sdio引脚和WiFi regon什么的引脚之类的,再或者你WiFi驱动的固件文件是对的,嗯。。很多
Copyright © 2024 深圳全志在线有限公司 粤ICP备2021084185号 粤公网安备44030502007680号