How To: Create an 802.11n AP (Access Point) w/ Debian on a Dockstar/Pogoplug/kirkwood device November 27, 2011 09:08PM |
Registered: 12 years ago Posts: 501 |
uname -aand you should see that you are running a 3.3.2 kernel.
apt-get install wpasupplicant hostapd bridge-utils wireless-regdb iw wireless-tools usbutils nano psmisc crda apt-utils dialog syslog-ng
wget http://ftp.us.debian.org/debian/pool/non-free/f/firmware-nonfree/firmware-atheros_0.36_all.deb dpkg -i firmware-atheros_0.36_all.deb(Note: this package is updated frequently, so the version number of it may have changed.)
lsusbYou should see a line similar to this:
Bus 001 Device 003: ID 0cf3:7015 Atheros Communications, Inc. TP-Link TL-WN821N v3 802.11n [Atheros AR7010+AR9287]
lsmod | grep ath
ath9k_htc 49588 0 mac80211 194086 1 ath9k_htc ath9k_common 1552 1 ath9k_htc ath9k_hw 299341 2 ath9k_htc,ath9k_common ath 13478 2 ath9k_htc,ath9k_hw cfg80211 140867 3 ath9k_htc,mac80211,ath usbcore 118711 5 ath9k_htc,usb_storage,uas,ehci_hcd
nano /etc/hostapd/hostapd.confthen copy the contents below into the file. Make sure you chose a wpa_passphrase. You can change the ssid to your liking.
# /etc/hostapd/hostapd.conf # authoritative information and specifics are available here: # http://hostap.epitest.fi/gitweb/gitweb.cgi?p=hostap.git;a=blob_plain;f=hostapd/hostapd.conf # if you want to bridge the onboard eth0 and the wireless USB adapter's wlan0, this should work interface=wlan0 bridge=br0 # this is the driver that must be used for ath9k and other similar chipset devices driver=nl80211 # yes, it says 802.11g, but the n-speeds get layered on top of it hw_mode=g # this enables the 802.11n speeds and capabilities ... You will also need to enable WMM for full HT functionality. ieee80211n=1 wmm_enabled=1 # self-explanatory, but not all channels may be enabled for you - check /var/log/messages for details channel=2 # also, make sure you survey your 2.4GHz environment, and find some uncluttered/uncrowded channels # adjust to fit your location country_code=US # Here is the authoritative list of countries: # http://www.iso.org/iso/country_codes/iso_3166_code_lists/country_names_and_code_elements.htm # let your AP broadcast the settings that agree with the above-mentioned regulatory requirements per country ieee80211d=1 # adjust to fit your preference ssid=AirDebian # this is how I set mine up - works perfectly for iPhone, Mac OS X (SnowLeopard) & Linux auth_algs=3 wpa=3 wpa_passphrase=************************* wpa_key_mgmt=WPA-PSK wpa_pairwise=TKIP rsn_pairwise=CCMP macaddr_acl=0 # these have to be set in agreement w/ channel and some other values... read hostapd.conf docs ht_capab=[HT20][SHORT-GI-20] # ... these can be tuned to specific capabilities per device/chipset # IIUC, this enables reauthentication for clients, so the passphrase doesn't have to be re-entered eap_reauth_period=360000000 # ... my understanding... 3600 seconds = 1 hr, so your device would have to reauthenticate if it rejoined after 1 hr # I have mine set quite a bit higher than 3600 seconds... so that my iPhone doesn't ask me to type in the password # frequently... # makes the SSID visible and broadcasted ignore_broadcast_ssid=0 # debugging output - uncomment them to activate; issue hostapd -d /etc/hostapd/hostapd.conf # to get debugging info in visible/real-time form #logger_syslog=-1 #logger_syslog_level=2 #logger_stdout=-1 #logger_stdout_level=2
cd /etc/init.d/ mv hostapd ../../
cd /etc/network mv interfaces interfaces.stock-backup nano interfaces
# /etc/network/interfaces ### NOTE: This setup works for my network. All of these interfaces have IPs set statically. You ### may decided to try to change that and have one or more of them set dynamically. YMMV. ### ### The IP ranges show are generic : change them to fit your network. ### In this setup, the network's router is @ 192.168.1.1 ### eth0 is @ 192.168.1.14 ### br0 is @ 192.168.1.13 # bring up both br0 and eth0 when booting auto lo br0 eth0 # Loopback Interface iface lo inet loopback # Internet Interface iface eth0 inet static address 192.168.1.14 gateway 192.168.1.1 network 192.168.1.0 netmask 255.255.255.0 broadcast 192.168.1.255 # Wireless Interface iface wlan0 inet static address 192.168.1.15 network 192.168.1.0 gateway 192.168.1.1 netmask 255.255.255.0 broadcast 192.168.1.255 # Bridge interface: use eth0 and wlan0 # bring br0 up, then add a route to reach the router/gateway, # then start hostapd after a 10 second pause (let devices settle) iface br0 inet static bridge_ports eth0 wlan0 address 192.168.1.13 network 192.168.1.0 gateway 192.168.1.1 netmask 255.255.255.0 broadcast 192.168.1.255 up /sbin/ifconfig br0 up post-up /bin/sleep 10 ; /usr/sbin/hostapd -B /etc/hostapd/hostapd.conf pre-down /usr/bin/killall hostapd down /sbin/ifconfig br0 down
iw listand note the capabilities it lists. My TP-Link WN821N V3 lists the following:
root@AirDebian:~# iw list Wiphy phy0 Band 1: Capabilities: 0x116e HT20/HT40 SM Power Save disabled RX HT20 SGI RX HT40 SGI RX STBC 1-stream Max AMSDU length: 3839 bytes DSSS/CCK HT40
ht_capab=[HT20][SHORT-GI-20][RX-STBC1]
# Bridge interface: use eth0 and wlan0 # bring br0 up, then add a route to reach the router/gateway, # then start hostapd after a 10 second pause (let devices settle) iface br0 inet static bridge_ports eth0 wlan0 address 192.168.1.13 network 192.168.1.0 gateway 192.168.1.1 netmask 255.255.255.0 broadcast 192.168.1.255 up /sbin/ifconfig br0 up post-up /bin/sleep 10 ; /usr/sbin/hostapd -B /etc/hostapd/hostapd.conf ; iwconfig wlan0 txpower 12 pre-down /usr/bin/killall hostapd down /sbin/ifconfig br0 down # #
iwconfig lo no wireless extensions. eth0 no wireless extensions. wlan0 IEEE 802.11bgn Mode:Master Frequency:2.417 GHz Tx-Power=20 dBm Retry long limit:7 RTS thr:off Fragment thr:off Power Management:off mon.wlan0 IEEE 802.11bgn Mode:Monitor Tx-Power=20 dBm Retry long limit:7 RTS thr:off Fragment thr:off Power Management:off
route default 192.168.11.xx 0.0.0.0 UG 0 0 0 eth0 192.168.11.0 * 255.255.255.0 U 0 0 0 eth0 192.168.11.0 * 255.255.255.0 U 0 0 0 wlan0
Re: Creating an AP (Access Point) w/ Debian on a Dockstar/Pogoplug/otherkirkwood device November 28, 2011 02:40AM |
Registered: 13 years ago Posts: 78 |
Re: Creating an AP (Access Point) w/ Debian on a Dockstar/Pogoplug/otherkirkwood device November 28, 2011 06:51AM |
Registered: 12 years ago Posts: 501 |
Routing tables Internet: Destination Gateway Flags Refs Use Netif Expire 127 localhost UCS 0 0 lo0 localhost localhost UH 7 816 lo0 169.254 link#4 UCS 0 0 en1 192.168.11 link#4 UC 3 0 en1 192.168.11.5 link#4 UHLWI 1 4 en1 192.168.11.16 localhost UHS 0 0 lo0 192.168.11.255 link#4 UHLWbI 1 1 en1 224.0.0/4 lo0 UmCS 2 0 lo0 224.0.0.251 lo0 UHmW3I 0 0 lo0 3549 Internet6: Destination Gateway Flags Netif Expire localhost localhost UH lo0 fe80::%lo0 localhost Uc lo0 localhost link#1 UHL lo0 fe80::%en1 link#4 UC en1 fe80::210:75ff:fe1 blahblahc UHLW en1 airmini10v.local 0:blahblah UHL lo0 fe80::5e59:48ff:fe 5cblahgblah UHLW en1 fe80::%en0 link#5 UC en0 ff01:: localhost Um lo0 ff02:: localhost UmC lo0 ff02:: link#5 UmC en0
Re: Creating an AP (Access Point) w/ Debian on a Dockstar/Pogoplug/otherkirkwood device November 28, 2011 05:05PM |
Registered: 12 years ago Posts: 501 |
Destination Gateway Netmask Interface 192.168.11.0 0.0.0.0 255.255.255.0 eth3 169.254.0.0 0.0.0.0 255.255.0.0 eth3 0.0.0.0 192.168.11.5 0.0.0.0 eth3 fe80:: :: 64 eth3 :: :: 0 lo ::1 :: 128 lo fe80::2blahblahblah :: 128 lo ff00:: :: 8 eth3 :: :: 0 lo
Destination Gateway Netmask Interface 169.254.0.0 0.0.0.0 255.255.0.0 eth3 192.168.0.0 0.0.0.0 255.255.0.0 eth3 0.0.0.0 192.168.11.5 0.0.0.0 eth3 fe80:: :: 64 eth3 :: :: 0 lo ::1 :: 128 lo fe80::223:4eblahblahblah :: 128 lo ff00:: :: 8 eth3 :: :: 0 lo
Re: Creating an AP (Access Point) w/ Debian on a Dockstar/Pogoplug/otherkirkwood device November 28, 2011 07:27PM |
Registered: 12 years ago Posts: 501 |
Re: Creating an AP (Access Point) w/ Debian on a Dockstar/Pogoplug/otherkirkwood device November 29, 2011 08:14AM |
Registered: 13 years ago Posts: 78 |
Re: Creating an AP (Access Point) w/ Debian on a Dockstar/Pogoplug/otherkirkwood device November 29, 2011 04:09PM |
Registered: 12 years ago Posts: 501 |
cat /proc/sys/net/ipv4/ip_forward 1 root@AirDebian:~# iptables -vnL --line-numbers Chain INPUT (policy ACCEPT 38 packets, 3381 bytes) num pkts bytes target prot opt in out source destination Chain FORWARD (policy ACCEPT 0 packets, 0 bytes) num pkts bytes target prot opt in out source destination Chain OUTPUT (policy ACCEPT 17 packets, 1796 bytes) num pkts bytes target prot opt in out source destination root@AirDebian:~# iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE root@AirDebian:~# ping yahoo.com PING yahoo.com (72.30.2.43) 56(84) bytes of data. 64 bytes from ir1.fp.vip.sk1.yahoo.com (72.30.2.43): icmp_req=1 ttl=57 time=95.0 ms 64 bytes from ir1.fp.vip.sk1.yahoo.com (72.30.2.43): icmp_req=2 ttl=57 time=96.1 ms 64 bytes from ir1.fp.vip.sk1.yahoo.com (72.30.2.43): icmp_req=3 ttl=57 time=94.3 ms ^C --- yahoo.com ping statistics --- 3 packets transmitted, 3 received, 0% packet loss, time 2000ms rtt min/avg/max/mdev = 94.388/95.209/96.167/0.814 ms root@AirDebian:~# ping 192.168.11.5 PING 192.168.11.5 (192.168.11.5) 56(84) bytes of data. From 192.168.11.15 icmp_seq=1 Destination Host Unreachable From 192.168.11.15 icmp_seq=2 Destination Host Unreachable From 192.168.11.15 icmp_seq=3 Destination Host Unreachable From 192.168.11.15 icmp_seq=5 Destination Host Unreachable From 192.168.11.15 icmp_seq=6 Destination Host Unreachable From 192.168.11.15 icmp_seq=7 Destination Host Unreachable From 192.168.11.15 icmp_seq=8 Destination Host Unreachable From 192.168.11.15 icmp_seq=9 Destination Host Unreachable From 192.168.11.15 icmp_seq=10 Destination Host Unreachable ^C --- 192.168.11.5 ping statistics --- 12 packets transmitted, 0 received, +9 errors, 100% packet loss, time 11017ms pipe 4 root@AirDebian:~#
root@AirDebian:~# route Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface 192.168.0.0 * 255.255.0.0 U 0 0 0 eth0
Created an AP (Access Point) w/ Debian on a Dockstar/Pogoplug/otherkirkwood device December 01, 2011 08:29PM |
Registered: 12 years ago Posts: 501 |
Re: Creating an AP (Access Point) w/ Debian on a Dockstar/Pogoplug/otherkirkwood device December 02, 2011 06:12AM |
Registered: 13 years ago Posts: 78 |
Re: Creating an AP (Access Point) w/ Debian on a Dockstar/Pogoplug/otherkirkwood device December 02, 2011 06:13AM |
Registered: 13 years ago Posts: 78 |
Re: Creating an AP (Access Point) w/ Debian on a Dockstar/Pogoplug/otherkirkwood device December 02, 2011 06:31AM |
Registered: 12 years ago Posts: 501 |
Re: Creating an AP (Access Point) w/ Debian on a Dockstar/Pogoplug/otherkirkwood device December 03, 2011 12:06AM |
Registered: 12 years ago Posts: 501 |
Re: Create an 802.11n AP (Access Point) w/ Debian on a Dockstar/Pogoplug/kirkwood device December 03, 2011 06:44PM |
Registered: 13 years ago Posts: 78 |
Re: How To: Create an 802.11n AP (Access Point) w/ Debian on a Dockstar/Pogoplug/kirkwood device December 14, 2011 07:50PM |
Registered: 12 years ago Posts: 501 |
Re: Create an 802.11n AP (Access Point) w/ Debian on a Dockstar/Pogoplug/kirkwood device December 14, 2011 08:56PM |
Admin Registered: 13 years ago Posts: 18,821 |
Re: How To: Create an 802.11n AP (Access Point) w/ Debian on a Dockstar/Pogoplug/kirkwood device December 15, 2011 08:37AM |
Registered: 13 years ago Posts: 78 |
Re: How To: Create an 802.11n AP (Access Point) w/ Debian on a Dockstar/Pogoplug/kirkwood device December 15, 2011 02:16PM |
Admin Registered: 13 years ago Posts: 18,821 |
Re: How To: Create an 802.11n AP (Access Point) w/ Debian on a Dockstar/Pogoplug/kirkwood device December 15, 2011 04:31PM |
Registered: 12 years ago Posts: 501 |
Re: How To: Create an 802.11n AP (Access Point) w/ Debian on a Dockstar/Pogoplug/kirkwood device December 15, 2011 07:05PM |
Registered: 13 years ago Posts: 78 |
Kalli Pidgeon
Re: How To: Create an 802.11n AP (Access Point) w/ Debian on a Dockstar/Pogoplug/kirkwood device December 19, 2011 07:29PM |
Re: How To: Create an 802.11n AP (Access Point) w/ Debian on a Dockstar/Pogoplug/kirkwood device December 19, 2011 08:49PM |
Registered: 12 years ago Posts: 501 |
Kalli Pidgeon
Re: How To: Create an 802.11n AP (Access Point) w/ Debian on a Dockstar/Pogoplug/kirkwood device December 20, 2011 04:38AM |
Re: How To: Create an 802.11n AP (Access Point) w/ Debian on a Dockstar/Pogoplug/kirkwood device December 20, 2011 03:14PM |
Registered: 12 years ago Posts: 501 |
iwconfig wlan0 txpower 14for instance, to set it to 70% or 14/20 dBm. I currently have mine set at 50%, but this covers my house well, and gives me a decent signal outside on the porch, on the patio or at the picnic table in the back yard.
Re: How To: Create an 802.11n AP (Access Point) w/ Debian on a Dockstar/Pogoplug/kirkwood device December 22, 2011 11:53PM |
Registered: 12 years ago Posts: 501 |
root@AirDebian:~# iw dev wlan0 station dump Station 00:23:xx:xx:xx:xx (on wlan0) inactive time: 10 ms rx bytes: 834586 rx packets: 6603 tx bytes: 7086858 tx packets: 6828 tx retries: 0 tx failed: 0 signal: -55 dBm signal avg: -55 dBm tx bitrate: 130.0 MBit/s MCS 15 Station 00:16:cf:xx:xx:xx (on wlan0) inactive time: 10150 ms rx bytes: 16775237 rx packets: 192204 tx bytes: 1223896351 tx packets: 812640 tx retries: 0 tx failed: 0 signal: -56 dBm signal avg: -64 dBm tx bitrate: 39.0 MBit/s MCS 4The first rate of 130MBits/sec is from my MacBook Air... and the second is from a g-device, my iPhone. While it is nice to see these rates, it is better to actually experience them, by doing transfers of large files. Such transfers give me about 85MBits/sec, typically, on the Airbook.
Re: How To: Create an 802.11n AP (Access Point) w/ Debian on a Dockstar/Pogoplug/kirkwood device December 23, 2011 09:14AM |
Registered: 13 years ago Posts: 11 |
Re: How To: Create an 802.11n AP (Access Point) w/ Debian on a Dockstar/Pogoplug/kirkwood device December 23, 2011 12:25PM |
Registered: 12 years ago Posts: 501 |
Re: How To: Create an 802.11n AP (Access Point) w/ Debian on a Dockstar/Pogoplug/kirkwood device December 27, 2011 10:42PM |
Registered: 12 years ago Posts: 501 |
Re: How To: Create an 802.11n AP (Access Point) w/ Debian on a Dockstar/Pogoplug/kirkwood device February 12, 2012 12:51PM |
Registered: 12 years ago Posts: 3 |
Re: How To: Create an 802.11n AP (Access Point) w/ Debian on a Dockstar/Pogoplug/kirkwood device February 12, 2012 02:24PM |
Registered: 12 years ago Posts: 501 |
Re: How To: Create an 802.11n AP (Access Point) w/ Debian on a Dockstar/Pogoplug/kirkwood device February 12, 2012 02:40PM |
Registered: 12 years ago Posts: 3 |