本帖最后由 qinyunti 于 2023-4-11 10:22 编辑

WIFI联网配置
参考3-用户手册\2-1-评估板测试手册.pdf
接好天线
image.png
4-软件资料\Demo\module-demos\usb_wifi_test
bin下的所有文件
Driver下的8188eu.ko导入到开发板
image.png
  1. insmod 8188eu.ko
  2. ifconfig eth0 down
  3. ifconfig eth1 down
  4. ifconfig usb0 down
kill掉wpa_supplicant进程
  1. root@IMX8-Tronlong:~# ps -aux | grep wpa_supplicant
  2. root         328  0.0  0.8  12888  8124 ?        Ss   03:00   0:00 /sbin/wpa_supplicant -u -s -O /run/wpa_supplicant
  3. root        1727  0.0  0.0  10296   748 ttymxc1  S+   03:29   0:00 grep --color=auto wpa_supplicant
  4. root@IMX8-Tronlong:~#
kill -9 328
查看网卡
  1. root@IMX8-Tronlong:~# ifconfig
  2. lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
  3.         inet 127.0.0.1  netmask 255.0.0.0
  4.         inet6 ::1  prefixlen 128  scopeid 0x10<host>
  5.         loop  txqueuelen 1000  (Local Loopback)
  6.         RX packets 968  bytes 63448 (63.4 KB)
  7.         RX errors 0  dropped 0  overruns 0  frame 0
  8.         TX packets 968  bytes 63448 (63.4 KB)
  9.         TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
  10. wlxb46dc2a047af: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
  11.         ether b4:6d:c2:a0:47:af  txqueuelen 1000  (Ethernet)
  12.         RX packets 0  bytes 0 (0.0 B)
  13.         RX errors 0  dropped 0  overruns 0  frame 0
  14.         TX packets 0  bytes 0 (0.0 B)
  15.         TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
  16. wlxb66dc2a047af: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
  17.         ether b6:6d:c2:a0:47:af  txqueuelen 1000  (Ethernet)
  18.         RX packets 0  bytes 0 (0.0 B)
  19.         RX errors 0  dropped 0  overruns 0  frame 0
  20.         TX packets 0  bytes 0 (0.0 B)
  21.         TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
  22. root@IMX8-Tronlong:~#
网卡名字不是wlan0,按照如下修改
  1. cp  /lib/udev/rules.d/80-net-setup-link.rules   /etc/udev/rules.d/
  2. vi /etc/udev/rules.d/80-net-setup-link.rules
ID_NET_NAME改成ID_NET_SLOT即可
image.png
重启
看到改过来了
  1. root@IMX8-Tronlong:~# ifconfig
  2. lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
  3.         inet 127.0.0.1  netmask 255.0.0.0
  4.         inet6 ::1  prefixlen 128  scopeid 0x10<host>
  5.         loop  txqueuelen 1000  (Local Loopback)
  6.         RX packets 56  bytes 3696 (3.6 KB)
  7.         RX errors 0  dropped 0  overruns 0  frame 0
  8.         TX packets 56  bytes 3696 (3.6 KB)
  9.         TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
  10. wlan0: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
  11.         ether b4:6d:c2:a0:47:af  txqueuelen 1000  (Ethernet)
  12.         RX packets 0  bytes 0 (0.0 B)
  13.         RX errors 0  dropped 0  overruns 0  frame 0
  14.         TX packets 0  bytes 0 (0.0 B)
  15.         TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
  16. wlan1: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
  17.         ether b6:6d:c2:a0:47:af  txqueuelen 1000  (Ethernet)
  18.         RX packets 0  bytes 0 (0.0 B)
  19.         RX errors 0  dropped 0  overruns 0  frame 0
  20.         TX packets 0  bytes 0 (0.0 B)
  21.         TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
  22. root@IMX8-Tronlong:~#
  1. ifconfig wlan0 up
  2. chmod +x ./wifi_setup.sh
  3. ./wifi_setup.sh -i qiqiqiqi -p cqmygysdss
看到连接成功
ping www.baidu.com确认联网成功。
image.png
查看ip
  1. root@IMX8-Tronlong:~# ifconfig
  2. eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
  3.         ether 86:2e:15:d7:eb:1b  txqueuelen 1000  (Ethernet)
  4.         RX packets 54  bytes 4960 (4.9 KB)
  5.         RX errors 0  dropped 0  overruns 0  frame 0
  6.         TX packets 94  bytes 16292 (16.2 KB)
  7.         TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
  8. eth1: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
  9.         ether 66:18:50:66:2f:c5  txqueuelen 1000  (Ethernet)
  10.         RX packets 0  bytes 0 (0.0 B)
  11.         RX errors 0  dropped 0  overruns 0  frame 0
  12.         TX packets 0  bytes 0 (0.0 B)
  13.         TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
  14. lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
  15.         inet 127.0.0.1  netmask 255.0.0.0
  16.         inet6 ::1  prefixlen 128  scopeid 0x10<host>
  17.         loop  txqueuelen 1000  (Local Loopback)
  18.         RX packets 688  bytes 50232 (50.2 KB)
  19.         RX errors 0  dropped 0  overruns 0  frame 0
  20.         TX packets 688  bytes 50232 (50.2 KB)
  21.         TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
  22. wlan0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
  23.         inet 192.168.31.90  netmask 255.255.255.0  broadcast 192.168.31.255
  24.         inet6 fe80::b66d:c2ff:fea0:47af  prefixlen 64  scopeid 0x20<link>
  25.         ether b4:6d:c2:a0:47:af  txqueuelen 1000  (Ethernet)
  26.         RX packets 190969  bytes 213956610 (213.9 MB)
  27.         RX errors 0  dropped 4103  overruns 0  frame 0
  28.         TX packets 51883  bytes 4962112 (4.9 MB)
  29.         TX errors 0  dropped 1 overruns 0  carrier 0  collisions 0
更新系统
联网之后就可以使用,apt包管理了
sudo apt-get update
image.png image.png
sudo apt-get upgrade
image.png
上下按键选择第二个keep the local... 回车
image.png