17922 views|0 replies

30

Posts

0

Resources
The OP
 

MYZR IMX6 EK200 RTL8188EUS WIFI AP [Copy link]

IMX6 EK200 RTL8188EUS WIFI AP Host platform: UBUNTU14.04 Hardware platform: Mingyuan Zhirui MY-IMX6-EK200 MY-IMX6-EK200 MY-IMX6-EK200 Compiler: gcc-linaro-arm-linux-gnueabihf-4.9-2014.09_linux.tar.xz buildrootVersion:buildroot-2017.02.5.tar.bz2 Kernel version linux-3.14.52 1.The kernel needs to be configured,Compile directly after configurationzImage CONFIG_CFG80211=y CONFIG_MAC80211=y CONFIG_HOSTAP=y CONFIG_USB_USBNET=y 2. Compilertl8188eusmodule 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
修改:
#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

最后编译模块8188eu.ko

3.移植hostapddhcpd
a)如果是用buildroot编译的话,直接用make menuconfig配置就行,这里不讲了
b)或者自己独立编译hostapddhcpd

4.配置hostapddhcpd
a) 配置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)配置dhcpd
touch  /var/db/dhcpd.leases

vim  /etc/dhcpd.conf
在最后增加:
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.启动热点和自动获取IP
echo "1" >/proc/sys/net/ipv4/ip_forward
hostapd -B /etc/hostapd.conf
ifconfig wlan0 192.168.155.1
dhcpd wlan0
看图片“WIFIAP.png” Finally, you can search for the “MYZR” hotspot through your mobile phone and directly enter the password“12345678”. In this way, the mobile phoneWIF will be connected successfully and will automatically distinguish192.168.155.*IP. Note: Although the above IP is assigned, it cannot access the Internet. You need to use iptables to enable local SNAT After the previous steps, the wireless network card can automatically allocate an IP. Now you just 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 in <*> RF switch subsystem support ---> //Note that you must select the last item, otherwise you will get an error when using the hostapdcommand, “rfkill: Cannot open RFKILL control device”. 7.TransplantiptablesJust use buildroot to configure and compile, or compile independently, which I will not explain here udhcpc -i eth0 iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE Connecting to wifi in this way, the settings of the mobile phone and ubuntu'sWPA2-PSK's wirelesswifi AP are complete and can be used normally.
Transplantiptables Just use buildroot to configure and compile. Or compile it independently, I won’t talk about it hereudhcpc -i eth0 iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE Connect like thiswifi , mobile phone and ubuntu’sWPA2-PSK Wirelesswifi AP is set up and can be used normally.

This post is from Embedded System

Just looking around
Find a datasheet?

EEWorld Datasheet Technical Support

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京B2-20211791 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号
快速回复 返回顶部 Return list