Gumstix Overo – Installing and Configuring Hostapd for PT-8811AU

Rev-1.2
Gumstix Overo – Installing and Configuring Hostapd for PT-8811AU

Running iw lists all of the wireless adapters abilities.

This was a part of the list:

Supported interface modes:
* IBSS
* managed
* AP
* AP/VLAN
* WDS
* monitor
* mesh point

1. Installed hostapd through the repositories:
$ sudo apt-get install hostapd

2. Compile and install the source hostapd from PremierTek.
Before you compile you will need to modify the Makefile:
$ cd ~/PT-8811AU/RTL8812AU_8821AU_linux_v4.2.3_8123.20130705/wpa_supplicant_hostapd/wpa_supplicant_hostapd-0.8_rtw_r7048.20130424/hostapd
$ nano Makefile

Change:
install: all

mkdir -p $(DESTDIR)/usr/local/bin

for i in $(ALL); do cp -f $$i $(DESTDIR)/usr/local/bin/$$i; done

To:
install: all
mkdir -p $(DESTDIR)/usr/sbin
for i in $(ALL); do cp -f $$i $(DESTDIR)/usr/sbin/$$i; done

$ cd ~/PT-8811AU/RTL8812AU_8821AU_linux_v4.2.3_8123.20130705/wpa_supplicant_hostapd/wpa_supplicant_hostapd-0.8_rtw_r7048.20130424/hostapd
$ make
$ make install

3. Give wlan0 a static IP:
$ sudo nano /etc/network/interfaces
auto wlan1
iface wlan1 inet static
address 10.0.0.1
netmask 255.255.255.0

Now, we need to edit some files.

4. Modify /etc/default/hostapd. The “DAEMON_CONF=” is configured by default.
$ sudo nano /etc/default/hostapd

# Defaults for hostapd initscript
#
# See /usr/share/doc/hostapd/README.Debian for information about alternative
# methods of managing hostapd.
#
# Uncomment and set DAEMON_CONF to the absolute path of a hostapd configuration
# file and hostapd will be started during system boot. An example configuration
# file can be found at /usr/share/doc/hostapd/examples/hostapd.conf.gz
#
DAEMON_CONF=”/etc/hostapd/hostapd.conf”
# Additional daemon options to be appended to hostapd command:-
# -d show more debug messages (-dd for even more)
# -K include key data in debug messages
# -t include timestamps in some debug messages
#
# Note that -B (daemon mode) and -P (pidfile) options are automatically
# configured by the init.d script and must not be added to DAEMON_OPTS.
#
#DAEMON_OPTS=””

5. Configure your hostapd.conf file:
$ sudo nano /etc/hostapd/hostapd.conf

##### hostapd configuration file ##############################################
interface=wlan1
ctrl_interface=/var/run/hostapd
ssid=GUMSTIX
channel=149
wpa=2
wpa_passphrase=12345678
#bridge=br0

##### Wi-Fi Protected Setup (WPS) #############################################
eap_server=1
# WPS state
# 0 = WPS disabled (default)
# 1 = WPS enabled, not configured
# 2 = WPS enabled, configured
wps_state=0
uuid=12345678-9abc-def0-1234-56789abcdef0

# Device Name
# User-friendly description of device; up to 32 octets encoded in UTF-8
# device_name=RTL8192CU

# Manufacturer
# The manufacturer of the device (up to 64 ASCII characters)
# manufacturer=Realtek

# Model Name
# Model of the device (up to 32 ASCII characters)
# model_name=RTW_SOFTAP

# Model Number
# Additional device description (up to 32 ASCII characters)
# model_number=WLAN_CU

# Serial Number
# Serial number of the device (up to 32 characters)
# serial_number=12345

# Primary Device Type
# Used format: —
# categ = Category as an integer value
# OUI = OUI and type octet as a 4-octet hex-encoded value; 0050F204 for
# default WPS OUI
# subcateg = OUI-specific Sub Category as an integer value
# Examples:
# 1-0050F204-1 (Computer / PC)
# 1-0050F204-2 (Computer / Server)
# 5-0050F204-1 (Storage / NAS)
# 6-0050F204-1 (Network Infrastructure / AP)

device_type=6-0050F204-1

# OS Version
# 4-octet operating system version number (hex string)
# os_version=01020300

# Config Methods
# List of the supported configuration methods
config_methods=label display push_button keypad

##### default configuration #######################################
driver=rtl871xdrv
#driver=nl80211
beacon_int=100
hw_mode=a
ieee80211n=1
wme_enabled=1
#ht_capab=[SHORT-GI-20][SHORT-GI-40][HT40+]
ht_capab=[HT40+][SHORT-GI-20][SHORT-GI-40][RS-STBC12]
wpa_key_mgmt=WPA-PSK
wpa_pairwise=CCMP
max_num_sta=8
wpa_group_rekey=86400

Note: Hostapd does not have consistent comment handling. Any comments or black spaces after any parameters will cause hostapd to fail.

6. Installing and Configuring a DHCH server:
$ sudo apt-get install dnsmasq
$ sudo nano /etc/dnsmasq.conf

interface=wlan1 # To get dnsmasq to listen only on wlan1.
dhcp-range=10.0.0.2,10.0.0.5,255.255.255.0,12h # This sets the available range from 10.0.0.2 to 10.0.0.5
# It also sets the subnet mask to 255.255.255.0 and specifies a lease time of 12 hours.

After you have completed configuration restart dnsmasq and hostapd:

$ sudo service dnsmasq restart
$ sudo service hostapd restart

To troubleshoot hostapd run the following:
$ hostapd -dd /etc/hostapd/hostapd.conf

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s