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"

 
(5 intermediate revisions by 2 users not shown)
Line 1: Line 1:
1 change ap6335 mode and install driver
+
{{rock2_header}}
   echo 2 > /sys/module/bcmdhd/parameters/op_mode
+
1 change user to root
  install ap6335 driver
+
   sudo su
  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 16: 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 24: 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 32: 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  
+
   #sudo su
   ip addr add 192.168.2.1/24 dev wlan0
+
  #echo 2 > /sys/module/bcmdhd/parameters/op_mode
   service dnsmasq start  
+
  #hostapd -B /etc/hostapd/hostapd.conf  
   echo 1 > /proc/sys/net/ipv4/ip_forward  
+
   #ip addr add 192.168.2.1/24 dev wlan0
   iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
+
   #service dnsmasq start  
   /etc/init.d/haveged start
+
   #echo 1 > /proc/sys/net/ipv4/ip_forward  
 +
   #iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
 +
   #/etc/init.d/haveged start
 +
 
 +
7 change from AP mode to normal mode
 +
  #echo 0 > /sys/module/bcmdhd/parameters/op_mode
 +
  #reboot

Latest revision as of 12:43, 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

 #sudo su
 #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

7 change from AP mode to normal mode

 #echo 0 > /sys/module/bcmdhd/parameters/op_mode
 #reboot