ref: http://www.cyberciti.biz/faq/debian-ubuntu-linux-setting-wireless-access-point/
ref: http://linuxwireless.org/en/users/Documentation/hostapd
hostapd is a user space daemon for access point and authentication servers. It implements IEEE 802.11 access point management, IEEE 802.1X/WPA/WPA2/EAP Authenticators, RADIUS client, EAP server, and RADIUS authentication server. The current version supports Linux (Host AP, madwifi, mac80211-based drivers) and FreeBSD (net80211).
hostapd is designed to be a "daemon" program that runs in the background and acts as the backend component controlling authentication. hostapd supports separate frontend programs and an example text-based frontend, hostapd_cli, is included with hostapd.
interface=wlan1
driver=nl80211
ssid=TheNameOfTheWirelessNetwork
auth_algs=1
channel=1
hw_mode=g
wpa=1
wpa_passphrase=ThePassphraseOfTheWirelessNetwork
wpa_key_mgmt=WPA-PSK
wpa_pairewise=CCMP
ignore_broadcast_ssid=0
Study: two hostapd instances => hostap 2.4G + hostap 5G
Ref: http://en.wikipedia.org/wiki/Comparison_of_open-source_wireless_drivers
From https://wikidevi.com/wiki/ASUS_USB-N53
Update rt2870.bin from MediaTek's RT5572 driver
From https://wikidevi.com/wiki/TP-LINK_TL-WDN3200
From https://wikidevi.com/wiki/Rt2800usb & https://wikidevi.com/wiki/Ralink_RT5572
Ralink RT5572 support 5G Wifi & AP mode
From MediaTek, download driver source http://www.mediatek.com/zh-TW/downloads/
Extract the source tar ball
make
rm -f /tftpboot
and following command to install the driver rt5572sta
make install
I installed wireless-tool but iw is the better one for configuring Linux wireless devices.
aptitude install iw
Same as http://unix.stackexchange.com/questions/105905/modules-for-usb-wireless-adapter-missing
# iw ra0 info command failed: No such device (-19)
From http://blog.csdn.net/sumang_87/article/details/38168877 && https://github.com/eywalink/mt7601u
Does not support RT55XX devices
root@swagate:~# grep RT2800 /boot/config-*
/boot/config-2.6.39-2-amd64:CONFIG_RT2800PCI=m
/boot/config-2.6.39-2-amd64:CONFIG_RT2800PCI_RT33XX=y
/boot/config-2.6.39-2-amd64:CONFIG_RT2800PCI_RT35XX=y
/boot/config-2.6.39-2-amd64:# CONFIG_RT2800PCI_RT53XX is not set
/boot/config-2.6.39-2-amd64:CONFIG_RT2800USB=m
/boot/config-2.6.39-2-amd64:CONFIG_RT2800USB_RT33XX=y
/boot/config-2.6.39-2-amd64:CONFIG_RT2800USB_RT35XX=y
/boot/config-2.6.39-2-amd64:# CONFIG_RT2800USB_UNKNOWN is not set
/boot/config-2.6.39-2-amd64:CONFIG_RT2800_LIB=m
/boot/config-3.2.0-4-amd64:CONFIG_RT2800PCI=m
/boot/config-3.2.0-4-amd64:CONFIG_RT2800PCI_RT33XX=y
/boot/config-3.2.0-4-amd64:CONFIG_RT2800PCI_RT35XX=y
/boot/config-3.2.0-4-amd64:CONFIG_RT2800PCI_RT53XX=y
/boot/config-3.2.0-4-amd64:CONFIG_RT2800USB=m
/boot/config-3.2.0-4-amd64:CONFIG_RT2800USB_RT33XX=y
/boot/config-3.2.0-4-amd64:CONFIG_RT2800USB_RT35XX=y
/boot/config-3.2.0-4-amd64:CONFIG_RT2800USB_RT53XX=y
/boot/config-3.2.0-4-amd64:# CONFIG_RT2800USB_UNKNOWN is not set
/boot/config-3.2.0-4-amd64:CONFIG_RT2800_LIB=m
From https://backports.wiki.kernel.org/index.php/Main_Page
Backports provide drivers released on newer kernels backported for usage on older kernels. Always use the latest stable release! The project started since 2007 and was originally known as compat-wireless, evolved to compat-drivers and was recently renamed simply to backports. Both daily snapshots based on linux-next, and stable releases basedLinux's stable releases are provided. As of the v3.10 based release over 830 device drivers are backported.
Current versions of backports support all mainline kernels starting with version 3.0, for kernel versions older than 3.0 please use backports-3.14, which supports all kernel versions back to 2.6.26.
A backports-3.x release means device drivers from the Linux v3.x release have been taken, backported and made available for you to use on any kernel version prior to the release version.
/opt/backports-3.12.8-1/backport-include/linux/pci.h:103:19: error: redefinition of ‘pcie_capability_set_word’
/usr/src/linux-headers-3.2.0-4-common/include/linux/pci.h:809:19: note: previous definition of ‘pcie_capability_set_word’ was here
/opt/backports-3.12.8-1/backport-include/linux/pci.h:109:19: error: redefinition of ‘pcie_capability_set_dword’
/usr/src/linux-headers-3.2.0-4-common/include/linux/pci.h:815:19: note: previous definition of ‘pcie_capability_set_dword’ was here
/opt/backports-3.12.8-1/backport-include/linux/pci.h:115:19: error: redefinition of ‘pcie_capability_clear_word’
/usr/src/linux-headers-3.2.0-4-common/include/linux/pci.h:821:19: note: previous definition of ‘pcie_capability_clear_word’ was here
/opt/backports-3.12.8-1/backport-include/linux/pci.h:121:19: error: redefinition of ‘pcie_capability_clear_dword’
/usr/src/linux-headers-3.2.0-4-common/include/linux/pci.h:827:19: note: previous definition of ‘pcie_capability_clear_dword’ was here
make[8]: *** [/opt/backports-3.12.8-1/drivers/bcma/main.o] Error 1
make[7]: *** [/opt/backports-3.12.8-1/drivers/bcma] Error 2
From http://backports.debian.org/Instructions/ & http://forums.debian.net/viewtopic.php?f=10&t=107794
apt-get -s install linux-image-3.10-0.bpo.2-amd64 -t wheezy-backports
It works !!!
# dmesg |grep 80211
[ 8.754379] cfg80211: Calling CRDA to update world regulatory domain
[ 9.118733] cfg80211: World regulatory domain updated:
[ 9.118845] cfg80211: DFS Master region: unset
[ 9.118927] cfg80211: (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp), (dfs_cac_time)
[ 9.119099] cfg80211: (2402000 KHz - 2472000 KHz @ 40000 KHz), (N/A, 2000 mBm), (N/A)
[ 9.119238] cfg80211: (2457000 KHz - 2482000 KHz @ 40000 KHz), (N/A, 2000 mBm), (N/A)
[ 9.119376] cfg80211: (2474000 KHz - 2494000 KHz @ 20000 KHz), (N/A, 2000 mBm), (N/A)
[ 9.119514] cfg80211: (5170000 KHz - 5250000 KHz @ 160000 KHz), (N/A, 2000 mBm), (N/A)
[ 9.119654] cfg80211: (5250000 KHz - 5330000 KHz @ 160000 KHz), (N/A, 2000 mBm), (0 s)
[ 9.119794] cfg80211: (5490000 KHz - 5730000 KHz @ 160000 KHz), (N/A, 2000 mBm), (0 s)
[ 9.119933] cfg80211: (5735000 KHz - 5835000 KHz @ 80000 KHz), (N/A, 2000 mBm), (N/A)
[ 9.120120] cfg80211: (57240000 KHz - 63720000 KHz @ 2160000 KHz), (N/A, 0 mBm), (N/A)
[ 9.413679] ieee80211 phy0: rt2x00_set_rt: Info - RT chipset 5390, rev 0503 detected
[ 9.448811] ieee80211 phy0: rt2x00_set_rf: Info - RF chipset 5370 detected
[ 9.599532] ieee80211 phy0: Selected rate control algorithm 'minstrel_ht'
[ 9.865194] ieee80211 phy1: rt2x00_set_rt: Info - RT chipset 5592, rev 0222 detected
[ 9.897691] ieee80211 phy1: rt2x00_set_rf: Info - RF chipset 000f detected
[ 9.902943] ieee80211 phy1: Selected rate control algorithm 'minstrel_ht'
[ 24.861281] ieee80211 phy0: rt2x00lib_request_firmware: Info - Loading firmware file 'rt2870.bin'
[ 24.912076] ieee80211 phy0: rt2x00lib_request_firmware: Info - Firmware detected - version: 0.29
[ 25.218351] cfg80211: Calling CRDA for country: US
[ 25.997924] cfg80211: Regulatory domain changed to country: US
[ 26.001838] cfg80211: DFS Master region: unset
[ 26.001922] cfg80211: (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp), (dfs_cac_time)
[ 26.009691] cfg80211: (2402000 KHz - 2472000 KHz @ 40000 KHz), (N/A, 3000 mBm), (N/A)
[ 26.013728] cfg80211: (5170000 KHz - 5250000 KHz @ 80000 KHz), (N/A, 1700 mBm), (N/A)
[ 26.017751] cfg80211: (5250000 KHz - 5330000 KHz @ 80000 KHz), (N/A, 2300 mBm), (0 s)
[ 26.021704] cfg80211: (5735000 KHz - 5835000 KHz @ 80000 KHz), (N/A, 3000 mBm), (N/A)
[ 26.025581] cfg80211: (57240000 KHz - 63720000 KHz @ 2160000 KHz), (N/A, 4000 mBm), (N/A)
[ 37.911284] ieee80211 phy1: rt2x00lib_request_firmware: Info - Loading firmware file 'rt2870.bin'
[ 37.911295] ieee80211 phy1: rt2x00lib_request_firmware: Info - Firmware detected - version: 0.29
hostapd.conf
# from http://agentoss.wordpress.com/2011/10/31/creating-a-wireless-access-point-with-debian-linux/
interface=wlan1
driver=nl80211
# YOUR BRIDGE NAME
bridge=br_lan
# YOUR COUNTRY HERE
country_code=US
#ieee80211d=1
# MODIFY YOUR SSID HERE
ssid=SWAGATE-5G
# CHANGE MODE HERE IF NEEDED
hw_mode=a
# CHANGE CHANNEL EVENTUALLY
channel=161
wme_enabled=0
macaddr_acl=0
auth_algs=1
# WE USE WPA2
wpa=2
# MODIFY YOUR PASSPHRASE HERE
wpa_passphrase=(passphrase)
wpa_key_mgmt=WPA-PSK
wpa_pairwise=TKIP
rsn_pairwise=CCMP
hostapd command
/usr/sbin/hostapd -B -P /var/run/hostapd.wlan1.pid -t -K -dd /root/hostapd.wlan1.conf
From http://www.raspberrypi.org/forums/viewtopic.php?t=22623
phy0 -> rt2x00usb_vendor_request: Error - Vendor request 0x07 failed for offset 0x101c with error -110.
and some solution
Replace /lib/firmware/rt2870.bin (after backing it up)
add a line to /etc/network/interfaces
iface wlan inet manual
post-up iwconfig wlan0 power off
wpa-roam /etc/wpa_supplicant/wpa_supplicant.conf
Rebooting was successful immediately and the WiFi has been stable for 48 hours running most of that time with network traffic and working during the day with 4 remote terminal windows via ssh.
From How to Find The Best Wi-Fi Channel
Linux – The iwlist Command
You could use a graphical app like Wifi Radar for this on Linux, but you’d have to install it first. Instead, you might as well just use the terminal. The command here is installed by default on Ubuntu and other popular Linux distributions, so it’s the fastest method. Don’t fear the terminal!
Open a Terminal and run the following command:
sudo iwlist wlan0 scan | grep \(Channel
Read the output of the command to see which channels are the most congested and make your decision. In the screenshot below, channel 1 looks the least congested.