[vc_row][vc_column width=”1/1″][vc_column_text]By the end of 2013, China released a 4G license. What is it 4G, 4G is the thing setting 3G and WLAN in one, and can transmit high quality video images, and its image transmission quality comparable to high-definition television. 4G systems capable of 100Mbps download speeds ,2000 times faster than the current dial-up internet, also its upload speeds can reach 20Mbps, can meet almost all the requirements of users for wireless services. Although I do not have such a 4G wifi,but I can use my pcDuino manually implement this device.[/vc_column_text][vc_tour][vc_tab title=”Configure the kernel to support nat” tab_id=”1389580139-1-0″][vc_column_text]# cd .. / kernel/build/sun4i_defconfig-linux /
# make CROSS_COMPILE = arm-linux-gnueabi-ARCH = armmenuconfig
Networking support ->
Networkingoptions ->
Network packetfiltering framework (Netfilter) ->
Core NetfilterConfiguration ->
<*> Netfilter LOG over NFNETLINK interface
<*> Netfilter connection tracking support
<*> Netfilter Xtables support (required for ip_tables)
IP: NetfilterConfiguration ->
As shown below:
Then re-make, burning core kernel configuration is complete.[/vc_column_text][/vc_tab][vc_tab title=”Configure AP” tab_id=”1389580139-2-9″][vc_column_text]( 1 ) download software tool
$ apt-get update
$ apt-get install isc-dhcp-server
( 2 ) download the driver source code on the official website
ftp://58.211.24.153/cn/wlan/RTL8188C_8192C_USB_linux_v4.0.2_9000.20130911.zip
( 3 ) download driver needs to compile the kernel headers
$ apt-get installpcduino-linux-headers-3.4.29 +
$ cd / usr/src/linux-headers-3.4.29 + / arch
$ cp arm armv7l-rf
$ reboot
( 4 ) delete the original 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 ) compile and install the driver
$ 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 ) End.
(7) hostapd
Hostapd driver which comes with the system service is not made , the need to find open source system services.
$ git clone https://github.com/jenssegers/RTL8188-hostapd
$ cd RTL8188-hostapd/hostapd
$ sudo make install
installation of 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
$ sudo make install
Configuration hostapd
$ vi / etc / hostapd / hostapd.conf
# Basic configuration
interface = wlan3 # according to your own contacts
ssid = MyWifi
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
Save
$ service hostapd restart
( 8 ) Configure AP fixed ip
$ vi / etc / network / interfaces
auto wlan3
iface wlan3 inet static
address192.168.3.1
netmask 255.255.255.0
Save
$ service networking restart
( 9 ) Configuration dhcp
$ vi / etc / dhcp / dhcpd.conf # plus the final surface
subnet 192.168.3.0 netmask 255.255.255.0 {
range 192.168.3.2 192.168.3.200;
optionrouters 192.168.3.1;
optiondomain-name-servers8.8.8.8;
}
Save
$ service isc-dhcp-server restart
( 10 ) set the boot
After hostapd start dhcpd to start , and dhcpd close hostapd close
$ update-rc.d hostapd defaults 80 20
$ update-rc.d isc-dhcp-server defaults 9010
As shown below:
[/vc_column_text][/vc_tab][vc_tab title=”Configure 3G” tab_id=”1389580515252-2-2″][vc_column_text](1) Installation mode switching tool
$ apt-get install usb-modeswitch
(2) dial-up software installation
$ apt-get install wvdial
(3) Configuration Software
$ leafpad / etc / wvdial.conf
[Dialer Defaults]
Init1 = ATZ
Init2 = ATQ0 V1 E1 S0 = 0 & C1 & D2
Modem Type = Analog Modem
Baud = 9600
New PPPD = yes
Modem = / dev/ttyUSB0
ISDN = 0
Phone = * 99 #
Password = uninet
Username = uninet
Save
Start dialing: $ wvdial
As shown below:
[/vc_column_text][/vc_tab][vc_tab title=”Kernel forwarding” tab_id=”1389580609158-3-8″][vc_column_text]$ echo 1> / proc/sys/net/ipv4/ip_forward
$ sudo iptables-t nat-A POSTROUTING-oppp0-j MASQUERADE
Computer is connected to the AP, can ping
As shown below:
Leave a Reply
You must be logged in to post a comment.