CubieBoard中文论坛

 找回密码
 立即注册
搜索
热搜: unable
查看: 28624|回复: 13

cubieboard上使用8188eu网卡创建软AP

[复制链接]
发表于 2013-5-28 22:20:18 | 显示全部楼层 |阅读模式
本帖最后由 swn1012 于 2013-6-5 09:14 编辑

在上一个帖子里写了8188eu的驱动编译与无线客户端的使用:http://cn.cubieboard.org/forum.p ... &extra=page%3D1,软AP的使用基于此帖进行。

1. 编译hostapd及工具
   1) realtek 驱动包下载
      经过测试发现hostapd网站(http://hostap.epitest.fi/hostapd/)上的hostapd测试不通过,因此选择realtek官网上rtl8192cu的hostapd(可用在8188eu上)
      网址:http://www.realtek.com.tw/downlo ... oads=true#RTL8192CU

      下载RTL8192CU的Unix (Linux)软件包
      下载后文件名为: RTL8192xC_USB_linux_v3.4.4_4749.20121105.zip
  1. unzip RTL8192xC_USB_linux_v3.4.4_4749.20121105.zip
  2. RTL8188C_8192C_USB_linux_v3.4.4_4749.20121105
复制代码
2) 编译hostapd
  1. cd RTL8188C_8192C_USB_linux_v3.4.4_4749.20121105/wpa_supplicant_hostapd
  2. unzip wpa_supplicant_hostapd-0.8_rtw_20120803.zip
  3. cd wpa_supplicant_hostapd-0.8/hostapd
  4. export PATH=/opt/arm-2010.09/bin:$PATH
  5. make clean
  6. 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
  1. cd RTL8188C_8192C_USB_linux_v3.4.4_4749.20121105/wireless_tools
  2. tar -zxvf wireless_tools.30.rtl.tar.gz
  3. cd wireless_tools.30.rtl
  4. make clean
  5. make CC=arm-none-linux-gnueabi-gcc
复制代码
生成iwconfig与iwlib.so,拷贝iwconfig到cb开发板的/sbin目录下,拷贝iwlib.so到cb开发板的/lib目录下
      
2. 创建软AP
   加载已经编译好的8188eu的驱动:insmod 8188eu.ko   
   启动AP:
  1.   ifconfig wlan0 up
  2. 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网卡测试通过。

评分

参与人数 1威望 +5 金钱 +5 贡献 +5 收起 理由
cubieplayer + 5 + 5 + 5 很给力!

查看全部评分

回复

使用道具 举报

发表于 2013-6-2 14:02:41 | 显示全部楼层
赞!我按楼主的方法成功设置软AP了。
不过LZ没有提到dhcp的设置,我参考了这个帖子 http://cn.cubieboard.org/forum.php?mod=viewthread&tid=424 成功把dhcp也开起来了
回复 支持 反对

使用道具 举报

发表于 2013-6-4 13:41:11 | 显示全部楼层
楼主编辑一下帖子吧,改加链接的加链接,该加代码引用的加代码引用。
回复 支持 反对

使用道具 举报

 楼主| 发表于 2013-6-5 09:15:30 | 显示全部楼层
hipboi 发表于 2013-6-4 13:41
楼主编辑一下帖子吧,改加链接的加链接,该加代码引用的加代码引用。

已编辑,使用纯文本习惯了
回复 支持 反对

使用道具 举报

发表于 2013-6-20 12:32:42 | 显示全部楼层
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 可以使用
回复 支持 反对

使用道具 举报

发表于 2013-6-23 13:52:18 | 显示全部楼层
yarshure 发表于 2013-6-20 12:32
root@cubieboard:~# hostapd
-bash: /usr/sbin/hostapd: No such file or directory
很奇怪,为什么找不到 ...

file下hostapd
另外顺便ldd一下,发下结果
回复 支持 反对

使用道具 举报

发表于 2013-7-16 21:53:04 | 显示全部楼层
本帖最后由 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.h  wireless.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.diff  iwmulticall.c    wireless.17.h
iw262_restore_full_essid.diff  iwpriv           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$
回复 支持 反对

使用道具 举报

发表于 2013-7-18 12:18:53 | 显示全部楼层
请问怎么设置HOSTADP,让网卡能工作在80211n模式下,那样速度更快些呢?
回复 支持 反对

使用道具 举报

发表于 2013-9-29 11:10:26 | 显示全部楼层
楼主你好,我是新手,编译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: *** [main.o] 错误 1

请教这个怎么解决,谢谢!
回复 支持 反对

使用道具 举报

发表于 2013-9-29 23:40:59 | 显示全部楼层
本帖最后由 @allen 于 2013-9-30 09:34 编辑
eddiedane 发表于 2013-9-29 11:10
楼主你好,我是新手,编译hostapd到时候遇到一个问题:
In file included from main.c:15:0:
../src/utils/ ...

sudo apt-get install build-essential 试下
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|Archiver|手机版|粤ICP备13051116号|cubie.cc---深刻的嵌入式技术讨论社区

GMT+8, 2024-5-2 16:54 , Processed in 0.026978 second(s), 16 queries .

Powered by Discuz! X3.4

© 2001-2012 Comsenz Inc. | Style by Coxxs

返回顶部