Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
en:xu4_wlan_ap [2017/06/13 14:43] moon.linux [Hostapd Configuration file for Access Point] |
en:xu4_wlan_ap [2017/07/10 04:45] (current) moon.linux [Hostapd Configuration file for Access Point] |
||
---|---|---|---|
Line 294: | Line 294: | ||
https://forum.odroid.com/viewtopic.php?f=146&t=27287#p192844 | https://forum.odroid.com/viewtopic.php?f=146&t=27287#p192844 | ||
- | ======Configuration for Wifi Module 4====== | + | ======Configuration for Wifi Module 4 and Wifi Module 5====== |
<WRAP center round important 100%> | <WRAP center round important 100%> | ||
- | HostAP demon configuration for Ralink Technology, Corp. RT5572 Wireless Adapter. | + | Wifi Module 4: HostAP demon configuration for Ralink Technology, Corp. RT5572 Wireless Adapter. |
+ | |||
+ | Wifi Module 5: HostAP demon configuration for Realtek RTL8812AU chipset. | ||
</WRAP> | </WRAP> | ||
Line 303: | Line 305: | ||
<code> | <code> | ||
- | sudo apt-get install libnl-3-dev libnl-genl-3-dev libssl-dev hostapd iptables | + | sudo apt-get install libnl-3-dev libnl-genl-3-dev libssl-dev hostapd iptables pkg-config |
</code> | </code> | ||
**Download the latest hostapd source code** | **Download the latest hostapd source code** | ||
Line 352: | Line 354: | ||
</code> | </code> | ||
+ | ** Hostapd configuration for 2.4Ghz configuration ** | ||
<code> | <code> | ||
# HostAPD | # HostAPD | ||
Line 402: | Line 405: | ||
# N-WLAN | # N-WLAN | ||
ieee80211n=1 | ieee80211n=1 | ||
- | ht_capab=[HT20+][SHORT-GI-20][DSSS_CCK-20][TX-STBC] | + | ht_capab=[HT20+][SHORT-GI-20][DSSS_CCK-20] |
require_ht=0 | require_ht=0 | ||
obss_interval=0 | obss_interval=0 | ||
</code> | </code> | ||
+ | ** Hostapd configuration for 5Ghz configuration ** | ||
+ | |||
+ | <code> | ||
+ | ### hostapd configuration file | ||
+ | ctrl_interface=/var/run/hostapd | ||
+ | ctrl_interface_group=0 | ||
+ | interface=wlan0 | ||
+ | driver=nl80211 | ||
+ | |||
+ | ### IEEE 802.11 | ||
+ | ssid=Odroid5Ghz | ||
+ | hw_mode=a | ||
+ | channel=36 | ||
+ | max_num_sta=128 | ||
+ | auth_algs=1 | ||
+ | |||
+ | ### DFS | ||
+ | country_code=KR | ||
+ | ieee80211d=1 | ||
+ | ieee80211h=1 | ||
+ | #ieee80211ac=1 | ||
+ | |||
+ | ### IEEE 802.11n | ||
+ | ieee80211n=1 | ||
+ | ht_capab=[HT40+][SHORT-GI-20][SHORT-GI-40][DSSS_CCK-20] | ||
+ | |||
+ | ### IEEE 802.11ac | ||
+ | #ieee80211ac=1 | ||
+ | #vht_oper_chwidth=1 | ||
+ | #vht_capab=[SHORT-GI-40][RXLDPC][TX-STBC-2BY1] | ||
+ | #vht_oper_centr_freq_seg0_idx=0 | ||
+ | |||
+ | ### IEEE 802.11i | ||
+ | wpa=2 | ||
+ | wpa_key_mgmt=WPA-PSK | ||
+ | wpa_passphrase=hardkernel | ||
+ | rsn_pairwise=CCMP | ||
+ | |||
+ | ### hostapd event logger | ||
+ | logger_syslog=-1 | ||
+ | logger_syslog_level=2 | ||
+ | logger_stdout=-1 | ||
+ | logger_stdout_level=2 | ||
+ | ### WMM | ||
+ | wmm_enabled=1 | ||
+ | uapsd_advertisement_enabled=1 | ||
+ | wmm_ac_bk_cwmin=4 | ||
+ | wmm_ac_bk_cwmax=10 | ||
+ | wmm_ac_bk_aifs=7 | ||
+ | wmm_ac_bk_txop_limit=0 | ||
+ | wmm_ac_bk_acm=0 | ||
+ | wmm_ac_be_aifs=3 | ||
+ | wmm_ac_be_cwmin=4 | ||
+ | wmm_ac_be_cwmax=10 | ||
+ | wmm_ac_be_txop_limit=0 | ||
+ | wmm_ac_be_acm=0 | ||
+ | wmm_ac_vi_aifs=2 | ||
+ | wmm_ac_vi_cwmin=3 | ||
+ | wmm_ac_vi_cwmax=4 | ||
+ | wmm_ac_vi_txop_limit=94 | ||
+ | wmm_ac_vi_acm=0 | ||
+ | wmm_ac_vo_aifs=2 | ||
+ | wmm_ac_vo_cwmin=2 | ||
+ | wmm_ac_vo_cwmax=3 | ||
+ | wmm_ac_vo_txop_limit=47 | ||
+ | wmm_ac_vo_acm=0 | ||
+ | |||
+ | ### TX queue parameters | ||
+ | tx_queue_data3_aifs=7 | ||
+ | tx_queue_data3_cwmin=15 | ||
+ | tx_queue_data3_cwmax=1023 | ||
+ | tx_queue_data3_burst=0 | ||
+ | tx_queue_data2_aifs=3 | ||
+ | tx_queue_data2_cwmin=15 | ||
+ | tx_queue_data2_cwmax=63 | ||
+ | tx_queue_data2_burst=0 | ||
+ | tx_queue_data1_aifs=1 | ||
+ | tx_queue_data1_cwmin=7 | ||
+ | tx_queue_data1_cwmax=15 | ||
+ | tx_queue_data1_burst=3.0 | ||
+ | tx_queue_data0_aifs=1 | ||
+ | tx_queue_data0_cwmin=3 | ||
+ | tx_queue_data0_cwmax=7 | ||
+ | tx_queue_data0_burst=1.5 | ||
+ | |||
+ | </code> | ||
**Note:** Depending on the ht_capab with the Wifi module4 and Wifi moudule5 we need to tune these setting. | **Note:** Depending on the ht_capab with the Wifi module4 and Wifi moudule5 we need to tune these setting. | ||
Line 414: | Line 503: | ||
**Note:** N-WLAN is optional can be dropped out. | **Note:** N-WLAN is optional can be dropped out. | ||
- | |||
====== Setting for forwarding Internet over WIFI from eth0====== | ====== Setting for forwarding Internet over WIFI from eth0====== | ||
Line 424: | Line 512: | ||
<code> | <code> | ||
- | net.ipv4.ip_forward=1 | + | net.ipv4.ip_forward = 1 |
- | net.ipv6.conf.all.forwarding=1 | + | net.ipv6.conf.all.forwarding = 1 |
</code> | </code> | ||
Line 446: | Line 534: | ||
**Confirmatioon of Hostapd service is running** | **Confirmatioon of Hostapd service is running** | ||
+ | |||
+ | **On ubuntu 14.04.x check the service status as follows** | ||
<code> | <code> | ||
$ service hostapd restart | $ service hostapd restart | ||
Line 453: | Line 543: | ||
$ service hostapd status | $ service hostapd status | ||
* hostapd is running | * hostapd is running | ||
+ | </code> | ||
+ | |||
+ | **on Ubuntu 16.04.x check the service status as follows** | ||
+ | <code> | ||
+ | $ sudo systemctl status hostapd.service | ||
+ | ● hostapd.service - LSB: Advanced IEEE 802.11 management daemon | ||
+ | Loaded: loaded (/etc/init.d/hostapd; bad; vendor preset: enabled) | ||
+ | Active: active (running) since Sun 2017-07-09 19:48:41 UTC; 31s ago | ||
+ | Docs: man:systemd-sysv-generator(8) | ||
+ | Process: 789 ExecStart=/etc/init.d/hostapd start (code=exited, status=0/SUCCESS) | ||
+ | CGroup: /system.slice/hostapd.service | ||
+ | └─798 /usr/sbin/hostapd -B -P /run/hostapd.pid -B /etc/hostapd/hostapd-2.6.conf | ||
+ | |||
+ | Jul 09 19:48:41 odroid systemd[1]: Starting LSB: Advanced IEEE 802.11 management daemon... | ||
+ | Jul 09 19:48:41 odroid hostapd[789]: * Starting advanced IEEE 802.11 management hostapd | ||
+ | Jul 09 19:48:41 odroid hostapd[789]: ...done. | ||
+ | Jul 09 19:48:41 odroid systemd[1]: Started LSB: Advanced IEEE 802.11 management daemon. | ||
+ | $ | ||
+ | $ | ||
+ | $ sudo systemctl status dnsmasq.service | ||
+ | ● dnsmasq.service - dnsmasq - A lightweight DHCP and caching DNS server | ||
+ | Loaded: loaded (/lib/systemd/system/dnsmasq.service; enabled; vendor preset: enabled) | ||
+ | Drop-In: /run/systemd/generator/dnsmasq.service.d | ||
+ | └─50-dnsmasq-$named.conf, 50-insserv.conf-$named.conf | ||
+ | Active: active (running) since Sun 2017-07-09 19:48:31 UTC; 4min 36s ago | ||
+ | Process: 592 ExecStartPost=/etc/init.d/dnsmasq systemd-start-resolvconf (code=exited, status=0/SUCCESS) | ||
+ | Process: 575 ExecStart=/etc/init.d/dnsmasq systemd-exec (code=exited, status=0/SUCCESS) | ||
+ | Process: 554 ExecStartPre=/usr/sbin/dnsmasq --test (code=exited, status=0/SUCCESS) | ||
+ | Main PID: 591 (dnsmasq) | ||
+ | CGroup: /system.slice/dnsmasq.service | ||
+ | └─591 /usr/sbin/dnsmasq -x /var/run/dnsmasq/dnsmasq.pid -u dnsmasq -r /var/run/dnsmasq/resolv.conf -7 /etc/dnsmasq.d,.dpkg-dist,.dpkg-old, | ||
+ | |||
+ | Jul 09 19:48:30 odroid dnsmasq[591]: DNS service limited to local subnets | ||
+ | Jul 09 19:48:30 odroid dnsmasq[591]: warning: ignoring resolv-file flag because no-resolv is set | ||
+ | Jul 09 19:48:30 odroid dnsmasq-dhcp[591]: DHCP, IP range 192.168.1.250 -- 192.168.1.254, lease time 1h | ||
+ | Jul 09 19:48:30 odroid dnsmasq-dhcp[591]: DHCP, IP range 192.168.1.20 -- 192.168.1.50, lease time 3d | ||
+ | Jul 09 19:48:30 odroid dnsmasq[591]: using local addresses only for domain example.com | ||
+ | Jul 09 19:48:30 odroid dnsmasq[591]: using nameserver 4.4.4.4#53 | ||
+ | Jul 09 19:48:30 odroid dnsmasq[591]: using nameserver 8.8.8.8#53 | ||
+ | Jul 09 19:48:30 odroid dnsmasq[591]: using nameserver 192.168.1.5#53 for domain example.com | ||
+ | Jul 09 19:48:30 odroid dnsmasq[591]: cleared cache | ||
+ | Jul 09 19:48:31 odroid systemd[1]: Started dnsmasq - A lightweight DHCP and caching DNS server. | ||
+ | lines 1-22/22 (END) | ||
</code> | </code> | ||