Lichee zero使用USB wifi(RTL8188EU)

一. kernal修改

     1.1. 添加RTL8188EU驱动

           1.1.1. 查看现有kernal是否有驱动

                 a. 查看usb wifi ID

 

 

                b. Linux4.1.x的内核是否支持,试试到,说明支持

                        cd drivers/net/wireless/
                        sudo grep "0x8179" * -wnr

 

 

         1.1.2. 修改menuconfig

               a. make ARCH=arm menuconfig          

Device Drivers  ---> [*] Staging drivers  ---> <*>   Realtek RTL8188EU Wireless LAN NIC driver
Device Drivers  ---> [*] Network device support  --->[*]   Wireless LAN  ---><*>     Realtek rtlwifi family of devices  ---><*>   Realtek RTL8188EE Wireless Network Adapter
Device Drivers  ---> [*] Network device support  ---><*>   USB Network Adapters  ---><*>   USB RTL8150 based ethernet device support  
[*] Networking support  --->  -*-   Wireless  --->  <*>   Generic IEEE 802.11 Networking Stack (mac80211)

二. 根文件修改

     2.1. 修改menuconfig

   a. 添加RTL81xx的fireware

 

 

         b. 添加hostapd,iw,wireless tools,openssh,wpa_supplicant(注意全选)

                target packet -> network applications

         c. 添加dhcp

               buildroot -> busybox-menuconfig -> networking utilities -> udhcpd, udhcpc

三. 测试

    3.1. 添加启动网络命令

        3.1.1. 设置wifi

               vi /etc/wpa_supplicant.conf

ctrl_interface=/var/run/wpa_supplicant
ap_scan=1

network={
  ssid="xxxxx"
  psk="yyyyyyyy"
}

            

        3.1.2. 添加启动命令在/etc/init.d/rcS

wpa_supplicant -D wext -c /etc/wpa_supplicant.conf -i wlan0 &

 

    3.2. 联网测试

         3.2.1. ping www.baidu.com

    3.3. ssh测试

        3.3.1. ubuntu 远程Lichee zero pi

              连接时报:Permission denied, please try again.

 

             解决:修改lichee zero pi  /etc/ssh/sshd_config,然后重启

 

 

补充:设置wifi静态IP

     1. 修改/etc/network/interfaces

# interface file auto-generated by buildroot

auto lo
iface lo inet loopback

auto wlan0
iface wlan0 inet static
address 192.168.1.20
network 192.168.1.0
netmask 255.255.255.0
broadcast 192.168.1.255
gateway 192.168.1.1

 

 

参考文献:https://www.cnblogs.com/chencanjian/p/5983997.html

参考文献:https://blog.csdn.net/Guet_Kite/article/details/80583828?utm_source=blogxgwz4

posted @ 2020-04-19 12:25  三七鸽  阅读(1120)  评论(0编辑  收藏  举报