Please enable javascript, or click here to visit my ecommerce web site powered by Shopify.
Jump to: navigation, search

Difference between revisions of "Rock2/wireless"

Line 1: Line 1:
 
{{rock2_header}}
 
{{rock2_header}}
1 change ap6335 mode and install driver
+
1 change user to root
   echo 2 > /sys/module/bcmdhd/parameters/op_mode
+
   sudo su
  install ap6335 driver
+
  insmod wlan.ko  or echo 1 > /sys/class/rkwifi/driver
+
  
 
2 install and config hostapd
 
2 install and config hostapd
   apt-get install hostapd
+
   #apt-get install hostapd
   edit /etc/hostapd/hostapd.conf
+
   #vim.tiny /etc/hostapd/hostapd.conf
 
   interface=wlan0
 
   interface=wlan0
 
   ctrl_interface=/var/run/hostapd
 
   ctrl_interface=/var/run/hostapd
Line 17: Line 15:
  
 
3 install and config dnsmasq
 
3 install and config dnsmasq
   apt-get install dnsmasq
+
   #apt-get install dnsmasq
   edit /etc/dnsmasq.conf  
+
   #vim.tiny /etc/dnsmasq.conf  
 
   interface=wlan0  
 
   interface=wlan0  
 
   bind-interfaces  
 
   bind-interfaces  
Line 25: Line 23:
 
   dhcp-option=3,192.168.2.1 #configure the server
 
   dhcp-option=3,192.168.2.1 #configure the server
  
4 edit /etc/network/interfaces  
+
4 edit /etc/network/interfaces
 +
  #vim.tiny /etc/network/interfaces
 
   # interfaces(5) file used by ifup(8) and ifdown(8)
 
   # interfaces(5) file used by ifup(8) and ifdown(8)
 
   auto wlan0
 
   auto wlan0
Line 33: Line 32:
 
   
 
   
 
5 install haveged
 
5 install haveged
   apt-get install haveged
+
   #apt-get install haveged
  
 
6 start ap   
 
6 start ap   
   hostapd -B /etc/hostapd/hostapd.conf  
+
   #echo 2 > /sys/module/bcmdhd/parameters/op_mode
   ip addr add 192.168.2.1/24 dev wlan0
+
  #hostapd -B /etc/hostapd/hostapd.conf  
   service dnsmasq start  
+
   #ip addr add 192.168.2.1/24 dev wlan0
   echo 1 > /proc/sys/net/ipv4/ip_forward  
+
   #service dnsmasq start  
   iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
+
   #echo 1 > /proc/sys/net/ipv4/ip_forward  
   /etc/init.d/haveged start
+
   #iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
 +
   #/etc/init.d/haveged start

Revision as of 10:04, 9 July 2015

1 change user to root

 sudo su

2 install and config hostapd

 #apt-get install hostapd
 #vim.tiny /etc/hostapd/hostapd.conf
 interface=wlan0
 ctrl_interface=/var/run/hostapd
 ssid=squareAP
 channel=6
 wpa=2
 wpa_passphrase=12345678
 #bridge=br0

3 install and config dnsmasq

 #apt-get install dnsmasq
 #vim.tiny /etc/dnsmasq.conf 
 interface=wlan0 
 bind-interfaces 
 except-interface=lo 
 dhcp-range=192.168.2.150,192.168.2.254,12h #configure the range of available ip
 dhcp-option=3,192.168.2.1 #configure the server

4 edit /etc/network/interfaces

 #vim.tiny /etc/network/interfaces
 # interfaces(5) file used by ifup(8) and ifdown(8)
 auto wlan0
 iface wlan0 inet static
 address 192.168.2.1
 netmask 255.255.255.0

5 install haveged

 #apt-get install haveged

6 start ap

 #echo 2 > /sys/module/bcmdhd/parameters/op_mode
 #hostapd -B /etc/hostapd/hostapd.conf 
 #ip addr add 192.168.2.1/24 dev wlan0
 #service dnsmasq start 
 #echo 1 > /proc/sys/net/ipv4/ip_forward 
 #iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
 #/etc/init.d/haveged start