hostapd
因此,我使用、isc-dhcp-server
和设置了热点MASQUERADING
。热点可用,我可以访问互联网。
问题
连接速度太慢。
当我连接到我的热点时(通过android 4.1,骁龙 S3),我看到连接速度为65mbps
,几秒钟后就下降到1mbps
。
我知道这不是硬件问题,因为我可以轻松地通过(通过)从我的以太网连接中获取24mbps
(链接) 。54mbps
Windows
connectify
信息
iwconfig
:
mon.wlan0 IEEE 802.11bgn Mode:Monitor Tx-Power=19 dBm
Retry long limit:7 RTS thr:off Fragment thr:off
Power Management:on
eth0 no wireless extensions.
lo no wireless extensions.
wlan0 IEEE 802.11bgn Mode:Master Tx-Power=19 dBm
Retry long limit:7 RTS thr:off Fragment thr:off
Power Management:off
iw list
:
Wiphy phy0
Band 1:
Capabilities: 0x70
HT20
Static SM Power Save
RX Greenfield
RX HT20 SGI
RX HT40 SGI
No RX STBC
Max AMSDU length: 3839 bytes
No DSSS/CCK HT40
Maximum RX AMPDU length 65535 bytes (exponent: 0x003)
Minimum RX AMPDU time spacing: 8 usec (0x06)
HT TX/RX MCS rate indexes supported: 0-7
Frequencies:
* 2412 MHz [1] (19.0 dBm)
* 2417 MHz [2] (19.0 dBm)
* 2422 MHz [3] (19.0 dBm)
* 2427 MHz [4] (19.0 dBm)
* 2432 MHz [5] (19.0 dBm)
* 2437 MHz [6] (19.0 dBm)
* 2442 MHz [7] (19.0 dBm)
* 2447 MHz [8] (19.0 dBm)
* 2452 MHz [9] (19.0 dBm)
* 2457 MHz [10] (19.0 dBm)
* 2462 MHz [11] (19.0 dBm)
* 2467 MHz [12] (19.0 dBm) (passive scanning, no IBSS)
* 2472 MHz [13] (19.0 dBm) (passive scanning, no IBSS)
* 2484 MHz [14] (disabled)
Bitrates (non-HT):
* 1.0 Mbps
* 2.0 Mbps (short preamble supported)
* 5.5 Mbps (short preamble supported)
* 11.0 Mbps (short preamble supported)
* 6.0 Mbps
* 9.0 Mbps
* 12.0 Mbps
* 18.0 Mbps
* 24.0 Mbps
* 36.0 Mbps
* 48.0 Mbps
* 54.0 Mbps
lspci-v:
0a:00.0 Network controller: Broadcom Corporation BCM4313 802.11bgn Wireless Network Adapter (rev 01)
Subsystem: Hewlett-Packard Company Device 1795
Flags: bus master, fast devsel, latency 0, IRQ 19
Memory at d4500000 (64-bit, non-prefetchable) [size=16K]
Capabilities: [40] Power Management version 3
Capabilities: [58] Vendor Specific Information: Len=78 <?>
Capabilities: [48] MSI: Enable- Count=1/1 Maskable- 64bit+
Capabilities: [d0] Express Endpoint, MSI 00
Capabilities: [100] Advanced Error Reporting
Capabilities: [13c] Virtual Channel
Capabilities: [160] Device Serial Number <removed>
Capabilities: [16c] Power Budgeting <?>
Kernel driver in use: bcma-pci-bridge
0b:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 07)
Subsystem: Hewlett-Packard Company Device 1818
Flags: bus master, fast devsel, latency 0, IRQ 43
I/O ports at 2000 [size=256]
Memory at d4404000 (64-bit, prefetchable) [size=4K]
Memory at d4400000 (64-bit, prefetchable) [size=16K]
Capabilities: [40] Power Management version 3
Capabilities: [50] MSI: Enable+ Count=1/1 Maskable- 64bit+
Capabilities: [70] Express Endpoint, MSI 01
Capabilities: [b0] MSI-X: Enable- Count=4 Masked-
Capabilities: [d0] Vital Product Data
Capabilities: [100] Advanced Error Reporting
Capabilities: [140] Virtual Channel
Capabilities: [160] Device Serial Number <removed>
Kernel driver in use: r8169
Ubuntu Release
:
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=13.10
DISTRIB_CODENAME=saucy
DISTRIB_DESCRIPTION="Ubuntu 13.10"
Linux pr3d4tOr 3.11.0-17-generic #31-Ubuntu SMP Mon Feb 3 21:52:43 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
我已尝试过:
传输功率:
prakhar@pr3d4tOr:~$ sudo iwconfig mon.wlan0 txpower 24
比特率:
prakhar@pr3d4tOr:~$ sudo iwconfig mon.wlan0 rate auto
禁用电源管理:
prakhar@pr3d4tOr:~$ sudo iwconfig mon.wlan0 power off Error for wireless request "Set Power Management" (8B2C) : SET failed on device mon.wlan0 ; Invalid argument.
我也尝试了上述方法wlan0
。没有结果。有人能指导一下问题可能出在哪里吗?
答案1
好的,我明白了这个问题。
看来当前使用的驱动程序 ( bcma-pci-bridge
) 不完全支持我的无线网卡 ( Broadcom Corporation BCM4313 802.11bgn Wireless Network Adapter
)。如果我让计算机进入睡眠状态并再次将其唤醒,Wi-Fi 卡将保持低功耗模式,因此速度会降低1mbps
。
在启动时,速度正确地从 变化1mbps
到54mbps
。
另一种选择,虽然提供了最佳的无线性能,但根本bcmwl-kernel-source
不支持模式。AP
我还没能找到任何其他驱动程序。
希望这对某人有帮助。
编辑:切换到brcmsmac
添加AP
模式。
prakhar@aS4v4g3wOrld:~$ iw list
Supported interface modes:
* IBSS
* managed
* AP
* AP/VLAN
* monitor
software interface modes (can always be added):
* AP/VLAN
* monitor
(部分输出)。
前往本文安装。
答案2
BCM4313 上的 802.11n 速度
我创建接入点热点使用以下hostapd
配置:
#####Basic Settings########################
#sets the wifi interface to use, is wlan0 in most cases
interface=wlan0
#driver to use, nl80211 works in most cases
driver=nl80211
#Access Point name
ssid=HEXspot
#####Channel and Mode Settings#############
# Operation mode (a = IEEE 802.11a, b = IEEE 802.11b, g = IEEE 802.11g,
# ad = IEEE 802.11ad (60 GHz); a/g options are used with IEEE 802.11n, too, to
# specify band)
# Default: IEEE 802.11b
hw_mode=g
# WiFi Channel:
channel=11
##### IEEE 802.11n related configuration ##
#WMM needs to be enabled for full HT functionality
wmm_enabled=1
# ieee80211n: Whether IEEE 802.11n (HT) is enabled
# 0 = disabled (default)
# 1 = enabled
# Note: You will also need to enable WMM for full HT functionality.
ieee80211n=1
# ht_capab: HT capabilities (list of flags)
# LDPC coding capability: [LDPC] = supported
# Supported channel width set: [HT40-] = both 20 MHz and 40 MHz with secondary
# channel below the primary channel; [HT40+] = both 20 MHz and 40 MHz
# with secondary channel below the primary channel
# (20 MHz only if neither is set)
# Note: There are limits on which channels can be used with HT40- and
# HT40+. Following table shows the channels that may be available for
# HT40- and HT40+ use per IEEE 802.11n Annex J:
# freq HT40- HT40+
# 2.4 GHz 5-13 1-7 (1-9 in Europe/Japan)
# 5 GHz 40,48,56,64 36,44,52,60
# (depending on the location, not all of these channels may be available
# for use)
# Please note that 40 MHz channels may switch their primary and secondary
# channels if needed or creation of 40 MHz channel maybe rejected based
# on overlapping BSSes. These changes are done automatically when hostapd
# is setting up the 40 MHz channel.
# Spatial Multiplexing (SM) Power Save: [SMPS-STATIC] or [SMPS-DYNAMIC]
# (SMPS disabled if neither is set)
# HT-greenfield: [GF] (disabled if not set)
# Short GI for 20 MHz: [SHORT-GI-20] (disabled if not set)
# Short GI for 40 MHz: [SHORT-GI-40] (disabled if not set)
# Tx STBC: [TX-STBC] (disabled if not set)
# Rx STBC: [RX-STBC1] (one spatial stream), [RX-STBC12] (one or two spatial
# streams), or [RX-STBC123] (one, two, or three spatial streams); Rx STBC
# disabled if none of these set
# HT-delayed Block Ack: [DELAYED-BA] (disabled if not set)
# Maximum A-MSDU length: [MAX-AMSDU-7935] for 7935 octets (3839 octets if not
# set)
# DSSS/CCK Mode in 40 MHz: [DSSS_CCK-40] = allowed (not allowed if not set)
# PSMP support: [PSMP] (disabled if not set)
# L-SIG TXOP protection support: [LSIG-TXOP-PROT] (disabled if not set)
ht_capab=[HT40][GF][SHORT-GI-40][SHORT-GI-20]
# Require stations to support HT PHY (reject association if they do not)
require_ht=1
#####Security and Authentication###########
#macaddr_acl sets options for mac address filtering. 0 means "accept unless in deny list"
macaddr_acl=0
#Sets authentication algorithm
#1 - only open system authentication
#2 - both open system authentication and shared key authentication
auth_algs=1
#setting ignore_broadcast_ssid to 1 will disable the broadcasting of ssid
ignore_broadcast_ssid=0
#####Sets WPA and WPA2 authentication######
#wpa option sets which wpa implementation to use
#1 - wpa only
#2 - wpa2 only
#3 - both
wpa=2
#sets WPA Password required by the clients to authenticate themselves on the network
wpa_passphrase=anything
#sets wpa key management
wpa_key_mgmt=WPA-PSK
#sets encryption used by WPA2
rsn_pairwise=CCMP
我的系统是Ubuntu 12.04.4使用 linux-generic-lts-saucy 内核(Saucy 的 3.11 内核反向移植到Ubuntu 12.04LTS)。我使用了brcmsmac
无线驱动程序,该驱动程序从 3.10 内核开始支持 AP 模式。我设法在 2.4GHz 频段和 20MHz 通道宽度上获得了 72Mbps 802.11n 链接速度。但是,就像您的情况一样,实际传输速度低于 1MBps,即使是 FTP 传输也是如此。
由于 BCM4313 无法在 5GHz 上运行,因此无论如何我们都无法获得通道绑定 n 模式速度。我们最好的选择是在 2.4GHz 频段获得 40MHz 通道宽度(HT40 模式)。问题是它brcmsmac
不能正确支持 2.4GHz 频段的 40MHz 模式,至少对于 BCM4313 来说是这样。也没有 DSSS/CCK 模式支持。我希望驱动程序在较新的内核中有所改进。当Ubuntu 14.04 可信塔尔羊发布了,我将使用其 3.13 内核再次尝试。