Ubuntu下成功安裝台式機網卡realtek的rtl8188eu芯片驅動並實現AP功能


1,下載驅動

https://github.com/lwfinger/rtl8188eu

使用注意:

https://github.com/lwfinger/rtl8188eu/issues/3

2.編譯安裝

 $make  
    $sudo make install 

3.關於hostapd的配置文件

# Basic configuration

interface=wlan0
ssid=11111
channel=10
#bridge=br0

# WPA and WPA2 configuration

macaddr_acl=0
auth_algs=1
ignore_broadcast_ssid=0
wpa=3
wpa_passphrase=123456789
wpa_key_mgmt=WPA-PSK
wpa_pairwise=TKIP
rsn_pairwise=CCMP

# Hardware configuration

driver=rtl871xdrv
ieee80211n=1
hw_mode=g
device_name=RTL8192CU
manufacturer=Realtek
••••••••••

 4.基本操作

sudo ifconfig wlan1 up //打開端口
sudo hostapd -B /etc/hostapd/hostapd.conf
sudo hostapd  -d /etc/hostapd/hostapd.conf
sudo hostapd /etc/hostapd/hostapd.conf

5.手機搜索不到SSID(wifi熱點的名字)

在網上找到

手機收不到SSID
系統是archlinux,做軟ap。之前是運行一個ad-hoc的腳本,有些android手機不支持ad-hoc模式,就安裝了hostapd,
運行 # hostapd  -d /etc/hostapd/hostapd.conf
手機可以連上&上網
重啟電腦再運行hostapd,手機就不能獲取ip地址了。必須運行ad-hoc腳本,再運行hostapd才行。
是不是哪里沒有設置好?
另外,手機連上ap后似乎不能建立安全鏈接,wifi信號是灰色的不是藍色,gtalk不能登錄,但能看到在線好友?????

於是就編輯了一個ad-hoc的wifi熱點,熱點名稱與hostapd中配置的名稱一樣,這里為”11111“

顯示“11111”已連接上網絡,然后就可以收到SSID 的信號(信號由hostapd產生)。

6.手機收到信號后,連接不上,顯示身份信息驗證失敗

后來嘗試了很多辦法

你可以檢查:
1、你的AP或無線路由器和你終端的加密方式是否相同
2、密鑰有沒有設置對
3、密鑰是字符還是ASCII碼
4、無線網絡經常會有相同SSID的,你聯的無線網絡是不是要聯的。
hostapd基本配置
http://www.cnblogs.com/zhuwenger/archive/2011/03/11/1980294.html

報錯:

+rtl871x_get_sta_wpaie, 00:08:22:68:de:cd is sta's address
wlan0: STA 00:08:22:68:de:cd IEEE 802.11: associated
rtl871x_set_key_ops
rtl871x_set_key_ops
rtl871x_set_key_ops
+rtl871x_send_eapol
wlan0: STA 00:08:22:68:de:cd IEEE 802.11: disassociated
wlan0: AP-STA-DISCONNECTED 00:08:22:68:de:cd
rtl871x_set_key_ops
rtl871x_set_key_ops
+rtl871x_sta_remove_ops, 00:08:22:68:de:cd is sta address removed
+rtl871x_get_sta_wpaie, 00:08:22:68:de:cd is sta's address
wlan0: STA 00:08:22:68:de:cd IEEE 802.11: associated
rtl871x_set_key_ops
rtl871x_set_key_ops
+rtl871x_send_eapol
wlan0: STA 00:08:22:68:de:cd IEEE 802.11: disassociated
wlan0: AP-STA-DISCONNECTED 00:08:22:68:de:cd
rtl871x_set_key_ops
rtl871x_set_key_ops
+rtl871x_sta_remove_ops, 00:08:22:68:de:cd is sta address removed

還是不行,后來想想hostapd產生的SSID應該與ad-hoc產生的wifi熱點沒關系,只是需要啟動一下ad-hoc而已。

看了看手機收到的SSID,選定靜態配置(沒有用到DHCP),然后及可以並使用了。

其他參考

sudo gedit /etc/hostapd/hostapd.conf

http://my.oschina.net/syscde/blog?disp=2
查看系統資源 gnome-system-monitor

驅動 /rtl8188eu
可用的hostapd  home/xdj/RTL8188-hostapd-1.1/src      
home/xdj/RTL8188-hostapd/src

成功:

rtl871x_set_key_ops
rtl871x_set_key_ops
+rtl871x_send_eapol
+rtl871x_send_eapol
rtl871x_set_key_ops
wlan0: AP-STA-CONNECTED 00:08:22:6a:c5:4f
wlan0: STA 00:08:22:6a:c5:4f RADIUS: starting accounting session 53D0F5EA-00000000
wlan0: STA 00:08:22:6a:c5:4f WPA: pairwise key handshake completed (RSN)
+rtl871x_send_eapol
wlan0: STA 00:08:22:6a:c5:4f WPA: group key handshake completed (RSN)
rtl871x_set_key_ops

 

不含有WEP和WPA(IEEE802.11i)驗證的hostapd.conf

# Basic configuration

interface=wlan0
ssid=XDJ
channel=6
bridge=br0

# WPA and WPA2 configuration

#macaddr_acl=0
#auth_algs=1
#wmm_enabled=0 
#ignore_broadcast_ssid=0
#wpa=3
#wpa_passphrase=12345678
#wpa_key_mgmt=WPA-PSK
#wpa_pairwise=TKIP
#rsn_pairwise=TKIP CCMP

# Hardware configuration

driver=rtl871xdrvXDJ
ieee80211n=1
hw_mode=g
device_name=RTL8192CU
manufacturer=Realtek

 

xdj@xdj-MS-7519:~$ sudo ifconfig wlan0 up
[sudo] password for xdj: 
xdj@xdj-MS-7519:~$ sudo hostapd /etc/hostapd/hostapd.conf 
Configuration file: /etc/hostapd/hostapd.conf
drv->ifindex=3
l2_packet_init: ioctl[SIOCGIFINDEX]: No such device
no br0 interface , let l2_sock_recv==l2_sock_xmit=0x0x86b2648
+rtl871x_sta_deauth_ops, ff:ff:ff:ff:ff:ff is deauth, reason=2
rtl871x_set_key_ops
rtl871x_set_key_ops
rtl871x_set_key_ops
rtl871x_set_key_ops
Using interface wlan0 with hwaddr 08:57:00:37:d3:9e and ssid 'XDJ'
rtl871x_set_wps_assoc_resp_ie
rtl871x_set_wps_beacon_ie
rtl871x_set_wps_probe_resp_ie
rtl871x_set_beacon_ops
+rtl871x_get_sta_wpaie, 00:08:22:ea:27:e3 is sta's address
wlan0: STA 00:08:22:ea:27:e3 IEEE 802.11: associated
wlan0: STA 00:08:22:ea:27:e3 RADIUS: starting accounting session 53D9F19B-00000000

 

 IPV4設置方法:1.與其他計算機共享

                           需要IPV4完成這個連接(不選)

無線提示連接上, 產生穩定的SSID,連接不上,hostapd沒有反應。

        需要IPV4完成這個連接(選)

手機能連接上網,容易斷線。

 

        2.已禁用

無線提示連接不上,產生不了穩定的SSID。

----------------------------------------------------------------------------------------------------------------------------------------------

 

##更多關於hostapd的操作

xdj@xdj-MS-7519:~$ sudo hostapd /etc/hostapd/hostapd.conf -D
hostapd: invalid option -- 'D'
hostapd v0.8.x
User space daemon for IEEE 802.11 AP management,
IEEE 802.1X/WPA/WPA2/EAP/RADIUS Authenticator
Copyright (c) 2002-2011, Jouni Malinen <j@w1.fi> and contributors

usage: hostapd [-hdBKtv] [-P <PID file>] <configuration file(s)>

options:
   -h   show this usage
   -d   show more debug messages (-dd for even more)
   -B   run daemon in the background
   -P   PID file
   -K   include key data in debug messages
   -t   include timestamps in some debug messages
   -v   show hostapd version

 ------------------------------------------------------------------------------------------------------------------------------------

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM