cubieboard上使用8188eu网卡创建软AP
本帖最后由 swn1012 于 2013-6-5 09:14 编辑在上一个帖子里写了8188eu的驱动编译与无线客户端的使用:http://cn.cubieboard.org/forum.php?mod=viewthread&tid=505&extra=page%3D1,软AP的使用基于此帖进行。
1. 编译hostapd及工具
1) realtek 驱动包下载
经过测试发现hostapd网站(http://hostap.epitest.fi/hostapd/)上的hostapd测试不通过,因此选择realtek官网上rtl8192cu的hostapd(可用在8188eu上)
网址:http://www.realtek.com.tw/downloads/downloadsView.aspx?Langid=3&PNid=48&PFid=48&Level=5&Conn=4&DownTypeID=3&GetDown=false&Downloads=true#RTL8192CU
下载RTL8192CU的Unix (Linux)软件包
下载后文件名为: RTL8192xC_USB_linux_v3.4.4_4749.20121105.zipunzip RTL8192xC_USB_linux_v3.4.4_4749.20121105.zip
RTL8188C_8192C_USB_linux_v3.4.4_4749.201211052) 编译hostapdcd RTL8188C_8192C_USB_linux_v3.4.4_4749.20121105/wpa_supplicant_hostapd
unzip wpa_supplicant_hostapd-0.8_rtw_20120803.zip
cd wpa_supplicant_hostapd-0.8/hostapd
export PATH=/opt/arm-2010.09/bin:$PATH
make clean
make CC=arm-none-linux-gnueabi-gcc生成hostapd,拷贝到cb开发板的/sbin目录。
同时拷贝 RTL8188C_8192C_USB_linux_v3.4.4_4749.20121105/wpa_supplicant_hostapd/rtl_hostapd_2G.conf到cb开发板的/etc目录下
3) 编译wireless_tools cd RTL8188C_8192C_USB_linux_v3.4.4_4749.20121105/wireless_tools
tar -zxvf wireless_tools.30.rtl.tar.gz
cd wireless_tools.30.rtl
make clean
make CC=arm-none-linux-gnueabi-gcc生成iwconfig与iwlib.so,拷贝iwconfig到cb开发板的/sbin目录下,拷贝iwlib.so到cb开发板的/lib目录下
2. 创建软AP
加载已经编译好的8188eu的驱动:insmod 8188eu.ko
启动AP:ifconfig wlan0 up
hostapd -B /etc/rtl_hostapd_2G.conf然后使用iwconfig命令查看到AP的SSID为:"rtwap"
设置AP的IP地址:ifconfig wlan0 192.168.1.222
3. 使用笔记本搜索AP的SSID "rtwap",连接,输入密码:87654321,配置无线网络的IP地址为静态地址:192.168.1.111
ping 192.168.1.222通过,不通的话反ping一下。
以上方式已经用水星的mw150us网卡测试通过。 赞!我按楼主的方法成功设置软AP了。
不过LZ没有提到dhcp的设置,我参考了这个帖子 http://cn.cubieboard.org/forum.php?mod=viewthread&tid=424 成功把dhcp也开起来了 楼主编辑一下帖子吧,改加链接的加链接,该加代码引用的加代码引用。 hipboi 发表于 2013-6-4 13:41 static/image/common/back.gif
楼主编辑一下帖子吧,改加链接的加链接,该加代码引用的加代码引用。
已编辑,使用纯文本习惯了:L。 root@cubieboard:~# hostapd
-bash: /usr/sbin/hostapd: No such file or directory
很奇怪,为什么找不到文件呢
root@cubieboard:~# ls -l /usr/sbin/hostapd
-rwxr-xr-x 1 root root 1807349 Jun 20 04:29 /usr/sbin/hostapd
而且和我在pc上编译的一样
root@cubieboard:~# uname -a
Linux cubieboard 3.4.43 #1 PREEMPT Thu May 23 17:55:44 CST 2013 armv7l armv7l armv7l GNU/Linux
iwconfig 可以使用 yarshure 发表于 2013-6-20 12:32 static/image/common/back.gif
root@cubieboard:~# hostapd
-bash: /usr/sbin/hostapd: No such file or directory
很奇怪,为什么找不到 ...
file下hostapd
另外顺便ldd一下,发下结果 本帖最后由 yzbx 于 2013-7-16 21:55 编辑
按照楼主的方法,我也成功了!
以下是运行过程
yzbx@yzbx-ThinkPad-E420:~/桌面/0android/RTL8188C_8192C_USB_linux_v3.4.4_4749.201
21105/wireless_tools/wireless_tools.30.rtl$ make clean
rm -f *.BAK *.bak *.d *.o *.so ,* *~ *.a *.orig *.rej *.out
yzbx@yzbx-ThinkPad-E420:~/桌面/0android/RTL8188C_8192C_USB_linux_v3.4.4_4749.201
21105/wireless_tools/wireless_tools.30.rtl$ make CC=arm-none-linux-gnueabi-gcc
arm-none-linux-gnueabi-gcc -Os -W -Wall -Wstrict-prototypes -Wmissing-prototypes -Wshadow -Wpointer-arith -Wcast-qual -Winline -I. -MMD -fPIC -c -o iwlib.so iwlib.c
rm -f libiw.a
ar cru libiw.a iwlib.so
ranlib libiw.a
arm-none-linux-gnueabi-gcc -Os -W -Wall -Wstrict-prototypes -Wmissing-prototypes -Wshadow -Wpointer-arith -Wcast-qual -Winline -I. -MMD -c iwconfig.c
arm-none-linux-gnueabi-gcc -Os -W -Wall -Wstrict-prototypes -Wmissing-prototypes -Wshadow -Wpointer-arith -Wcast-qual -Winline -I. -MMD -o iwconfig iwconfig.o libiw.a -lm
arm-none-linux-gnueabi-gcc -Os -W -Wall -Wstrict-prototypes -Wmissing-prototypes -Wshadow -Wpointer-arith -Wcast-qual -Winline -I. -MMD -c iwlist.c
arm-none-linux-gnueabi-gcc -Os -W -Wall -Wstrict-prototypes -Wmissing-prototypes -Wshadow -Wpointer-arith -Wcast-qual -Winline -I. -MMD -o iwlist iwlist.o libiw.a -lm
arm-none-linux-gnueabi-gcc -Os -W -Wall -Wstrict-prototypes -Wmissing-prototypes -Wshadow -Wpointer-arith -Wcast-qual -Winline -I. -MMD -c iwpriv.c
arm-none-linux-gnueabi-gcc -Os -W -Wall -Wstrict-prototypes -Wmissing-prototypes -Wshadow -Wpointer-arith -Wcast-qual -Winline -I. -MMD -o iwpriv iwpriv.o libiw.a -lm
arm-none-linux-gnueabi-gcc -Os -W -Wall -Wstrict-prototypes -Wmissing-prototypes -Wshadow -Wpointer-arith -Wcast-qual -Winline -I. -MMD -c iwspy.c
arm-none-linux-gnueabi-gcc -Os -W -Wall -Wstrict-prototypes -Wmissing-prototypes -Wshadow -Wpointer-arith -Wcast-qual -Winline -I. -MMD -o iwspy iwspy.o libiw.a -lm
arm-none-linux-gnueabi-gcc -Os -W -Wall -Wstrict-prototypes -Wmissing-prototypes -Wshadow -Wpointer-arith -Wcast-qual -Winline -I. -MMD -c iwgetid.c
arm-none-linux-gnueabi-gcc -Os -W -Wall -Wstrict-prototypes -Wmissing-prototypes -Wshadow -Wpointer-arith -Wcast-qual -Winline -I. -MMD -o iwgetid iwgetid.o libiw.a -lm
arm-none-linux-gnueabi-gcc -Os -W -Wall -Wstrict-prototypes -Wmissing-prototypes -Wshadow -Wpointer-arith -Wcast-qual -Winline -I. -MMD -c iwevent.c
arm-none-linux-gnueabi-gcc -Os -W -Wall -Wstrict-prototypes -Wmissing-prototypes -Wshadow -Wpointer-arith -Wcast-qual -Winline -I. -MMD -o iwevent iwevent.o libiw.a -lm
arm-none-linux-gnueabi-gcc -Os -W -Wall -Wstrict-prototypes -Wmissing-prototypes -Wshadow -Wpointer-arith -Wcast-qual -Winline -I. -MMD -c ifrename.c
arm-none-linux-gnueabi-gcc -Os -W -Wall -Wstrict-prototypes -Wmissing-prototypes -Wshadow -Wpointer-arith -Wcast-qual -Winline -I. -MMD -o ifrename ifrename.o libiw.a -lm
yzbx@yzbx-ThinkPad-E420:~/桌面/0android/RTL8188C_8192C_USB_linux_v3.4.4_4749.201
21105/wireless_tools/wireless_tools.30.rtl$ ls
19-udev-ifrename.rules iwevent.8 iwspy.c
Android.mk iwevent.c iwspy.d
android_readme iwevent.d iwspy.o
CHANGELOG.h iwevent.o libiw.a
COPYING iwgetid macaddr.c
cs iwgetid.8 Makefile
DISTRIBUTIONS.txt iwgetid.c PCMCIA.txt
ESSID-BUG.txt iwgetid.d README
fr.ISO8859-1 iwgetid.o README.fr
fr.UTF-8 iwlib.c sample_enc.c
HOTPLUG-UDEV.txt iwlib.d sample_pm.c
ifrename iwlib.h sample_priv_addr.c
ifrename.8 iwlib-private.hwireless.10.h
ifrename.c iwlib.so wireless.11.h
ifrename.d iwlist wireless.12.h
ifrename.o iwlist.8 wireless.13.h
IFRENAME-VS-XXX.txt iwlist.c wireless.14.h
iftab.5 iwlist.d wireless.15.h
INSTALL iwlist.o wireless.16.h
iw261_restore_full_essid.diffiwmulticall.c wireless.17.h
iw262_restore_full_essid.diffiwpriv wireless.18.h
iwconfig iwpriv.8 wireless.19.h
iwconfig.8 iwpriv.c wireless.20.h
iwconfig.c iwpriv.d wireless.21.h
iwconfig.d iwpriv.o wireless.7
iwconfig.o iwspy wireless.h
iwevent iwspy.8
yzbx@yzbx-ThinkPad-E420:~/桌面/0android/RTL8188C_8192C_USB_linux_v3.4.4_4749.201
21105/wireless_tools/wireless_tools.30.rtl$
请问怎么设置HOSTADP,让网卡能工作在80211n模式下,那样速度更快些呢? 楼主你好,我是新手,编译hostapd到时候遇到一个问题:
In file included from main.c:15:0:
../src/utils/includes.h:25:20: fatal error: stdlib.h: No such file or directory
compilation terminated.
make: *** 错误 1
请教这个怎么解决,谢谢! 本帖最后由 @allen 于 2013-9-30 09:34 编辑
eddiedane 发表于 2013-9-29 11:10 static/image/common/back.gif
楼主你好,我是新手,编译hostapd到时候遇到一个问题:
In file included from main.c:15:0:
../src/utils/ ...
sudo apt-get install build-essential 试下
页:
[1]
2