Host platform: UBUNTU14.04 Hardware platform: Mingyuan Zhirui MY-IMX6-EK200 Compiler: gcc-linaro-arm-linux-gnueabihf-4.9-2014.09_linux.tar.xz Buildroot version: buildroot-2017.02.5.tar.bz2 Kernel version linux-3.14.52 1. The kernel needs to be configured. After configuration, compile zImage directly CONFIG_CFG80211=y CONFIG_MAC80211=y CONFIG_HOSTAP=y CONFIG_USB_USBNET=y 2. Compile rtl8188eus module source package: rtl8188EUS_linux_v4.3.0.9_15178.20150907%28myimx6%29.tar.xz $ tar xvf rtl8188EUS_linux_v4.3.0.9_15178.20150907%28myimx6%29.tar.xz $ cd rtl8188EUS_linux_v4.3.0.9_15178.20150907 $ vim Makefile Modify and add (source code path and cross-compilation tool path) ifeq ($(CONFIG_PLATFORM_ARM_MYIMX6), y) EXTRA_CFLAGS += -DCONFIG_LITTLE_ENDIAN ARCH := arm CROSS_COMPILE ?= ~/IMX6/gcc-linaro-arm-linux-gnueabihf-4.9-2014.09_linux/bin/arm-linux-gnueabihf- KVER ?= 3.14.52 KSRC ?= /home/linyn/rs485/linux-custom endif vim include/autoconf.h Modify: #define CONFIG_IOCTL_CFG80211 #ifdef CONFIG_IOCTL_CFG80211 #define RTW_USE_CFG80211_STA_EVENT //#defineCONFIG_CFG80211_FORCE_COMPATIBLE_2_6_37_UNDER //#define CONFIG_DEBUG_CFG80211 1 #endif ... ... #define CONFIG_CONCURRENT_MODE … Finally compile module 8188eu.ko 3. Transplant hostapd and dhcpd a) If you use buildroot to compile, just use make menuconfig to configure, which is not discussed here b) Or compile hostapd and dhcpd independently For independent compilation, please refer to the website https://blog.csdn.net/beesui/article/details/10227931https://blog.csdn.net/hinyunsin/article/details/6029749 4. Configure hostapd and dhcpd a) Configure hostapd vim /etc/hostapd.conf interface=wlan0 driver=nl80211 ssid=MYZR channel=9 hw_mode=g macaddr_acl=0 ignore_broadcast_ssid=0 auth_algs=1 wpa=3 wpa_passphrase=12345678 wpa_key_mgmt=WPA-PSK wpa_pairwise=TKIP rsn_pairwise=CCMP b)Configure dhcpd touch /var/db/dhcpd.leases vim /etc/dhcpd.conf Add at the end: subnet 192.168.155.0 netmask 255.255.255.0 { range 192.168.155.2 192.168.155.10; option domain-name-servers 8.8.8.8; option routers 192.168.155.1; } 5.Start the hotspot and automatically obtain an IP echo "1" >/proc/sys/net/ipv4/ip_forward hostapd -B /etc/hostapd.conf ifconfig wlan0 192.168.155.1 dhcpd wlan0 see the image "WIFIAP.png" Finally, you can search for the hotspot "MYZR" through your mobile phone and directly enter the password "12345678". In this way, the mobile phone WIF connection is successful and the IP of 192.168.155.* will be automatically assigned. Note: Although the IP is assigned above, you cannot access the Internet. You need to use iptables to enable local SNAT. After the previous steps, the wireless network card can automatically assign an IP. Now you only need to send the data of the wireless network card to the external network through eth0 (wired network), which requires IP forwarding. 6. Configure the kernel Networking support ---> Networking options --->Network packet filtering framework (Netfilter) ---> Core Netfilter Configuration ---> //Select all except those listed below< > Transparent proxying support (EXPERIMENTAL) < > set target and match support < > CHECKSUM target support < > "CT" target support < > "DSCP" and "TOS" target support < > "NOTRACK" target support < > "TCPOPTSTRIP" target support (EXPERIMENTAL) < > "dscp" and "tos" match support < > "ipvs" match support <*> IP set support ---> (256) Maximum number of IP sets <*> bitmap:ip set support <*> bitmap:ip,mac set support <*> bitmap:port set support <*> list:set set support <*> IP virtual server support ---> //Select all except those listed below [ ] IP virtual server debugging [ ] SCTP load balancing support < > FTP protocol helper < > SIP persistence engine IP: Netfilter Configuration ---> //Select all <*> RF switch subsystem support ---> //Be sure to select the last item, otherwise you will be using hostapd An error will occur during the command, "rfkill: Cannot open RFKILL control device". 7. To transplant iptables, just use the buildroot configuration to compile it directly, or compile it independently, which is not the case here. Talked aboutudhcpc -i eth0 iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE After connecting to wifi in this way, the mobile phone and Ubuntu's WPA2-PSK wireless wifi AP are set up and can be used normally.