下載下傳安裝相應的軟體
1, 下載下傳工具軟體
sudo apt-get update
sudo apt-get install git vim
sudo apt-get install isc-dhcp-server
2, 下載下傳官網驅動源碼
wgetftp://WebUser:[email protected]/cn/wlan/RTL8188C_8192C_USB_linux_v4.0.2_9000.20130911.zip
#http://www.realtek.com.tw/downloads/downloadsView.aspx?Langid=1&PNid=21&PFid=48&Level=5&Conn=4&DownTypeID=3&GetDown=false&Downloa
3, 下載下傳編譯驅動需要核心頭檔案
sudo apt-get install pcduino-linux-headers-3.4.29+
cd /usr/src/ linux-headers-3.4.29+/arch
cp arm armv7l -rf
如果你用的是pcDuino lite wifi,這行這個之後需要重新開機,然後在u-boot的3秒位置停下,輸入,要不然啟動不起來
setenv loglevel 8 ramfs
boot
mount /deV/nandd /mnt
cd /mn lib/modules/3.4.29+/kernel/drivers
rm gpu –rf
reboot
4, 删除原有的8188cu.ko
rm /lib/modules/3.4.29+/kernel/drivers/net/wireless/rtl8192cu/8192cu.ko
rm /lib/modules/3.4.29+/kernel/drivers/net/wireless/8192cu.ko
5, 編譯安裝驅動
unzip RTL8188C_8192C_USB_linux_v4.0.2_9000.20130911.zip
cd RTL8188C_8192C_USB_linux_v4.0.2_9000.20130911
chmod +x install.sh
sudo ./install.sh
6,安裝結束
ubuntu@ubuntu :~/RTL8188C_8192C_USB_linux_v4.0.2_9000.20130911$ lsmod
Module Size Used by
8192cu 624916 0
sw_interrupt 2424 0
gpio 4509 0
pwm 5050 0
adc 1671 0
hardwarelib 1551 4 sw_interrupt,gpio,pwm,adc
rt5370sta 616973 0
hostapd
驅動裡面自帶的hostapd是沒有做成系統服務的,這裡感謝開源,有個玩家做成了系統服務。
git clone https://github.com/jenssegers/RTL8188-hostapd
cd RTL8188-hostapd/hostapd
sudo make install
安裝8188的hostapd
cd RTL8188C_8192C_USB_linux_v4.0.2_9000.20130911/wpa_supplicant_hostapd
tar xvf wpa_supplicant_hostapd-0.8_rtw_r7475.20130812.tar.gz
cd hostapd
sudo make install
配置hostapd
vim /etc/hostapd/hostapd.conf
# Basic configuration
interface=wlan3 #根據你自己的接點
ssid=wifi
channel=1
#bridge=br0
# WPA and WPA2 configuration
macaddr_acl=0
auth_algs=1
ignore_broadcast_ssid=0
wpa=3
wpa_passphrase=12345678
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
service hostapd restart
設定wifi熱點名字為wifi ,密碼為12345678
你現在清除一下你設定的wifi的密碼,就可以通過你的手機搜尋到wifi這個熱點,但是還連不上
要配置一下網絡
vim /etc/network/interfaces
auto wlan3
iface wlan3 inet static
address 192.168.100.1
netmask 255.255.255.0
service networking restart
配置dhcp
vim /etc/dhcp/dhcpd.conf #在最後面加
subnet 192.168.100.0 netmask 255.255.255.0 {
range 192.168.100.10 192.168.100.100;
option routers 192.168.100.1;
option domain-name-servers 8.8.8.8;
}
service isc-dhcp-server restart
設定開機啟動
hostapd啟動後dhcpd才能啟動,dhcpd關閉hostapd才關閉
update-rc.d hostapd defaults 80 20
update-rc.d isc-dhcp-server defaults 90 10