你们好!首先,很高兴获得电鱼电子的支持,让我有一次宝贵的测评335x wifi热点的机会。而后,话很少说,让咱们进入正题。 注意:前方高能!干货满满哦~ linux
1.335x前边已经移植好了hostapd;直接使用就能够 热点名为rtwap,密码为87654321网络
2.dhcpd 配置文件修改spa
建立空文件/var/db/dhcpd.leasescode
mkdir -p /var/dbip
touch /var/db/dhcpd.leases开发
3.it
ifconfig eth0 upio
udhcpc -i eth0编译
ifconfig wlan0 up table
ifconfig wlan0 10.5.5.1 netmask 255.255.255.0
echo 1 > /proc/sys/net/ipv4/ip_forward /* 打开IP转发 */
/sbin/iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
设置网卡的混杂模式
# ifconfig wlan0 promisc
[ 3725.324000] device wlan0 entered promiscuous mode
dhcpd -cf /etc/dhcpd.conf wlan0 &
hostapd /etc/hostapd.conf -B
4.前边命令中须要用到iptables,文件系统中须要移植iptables (iptables编译)
./configure --host=arm-arago-linux-gnueabi --prefix=/root/335x/localcode/iptables/install --disable-nftables --with-ksource=/root/335x/localcode/kernel-3.2.0 --enable-static --disable-shared
make
make install
编译完成后须要将iptables移植到开发板上;
内核中也须要配置iptables的支持
Networking options --->
Core Netfilter Configuration --->(所有选上)
IP: Netfilter Configuration ---> (所有选上)
而后就OK啦!