BCM4313 上的接入点模式热点

BCM4313 上的接入点模式热点

我一直尝试使用 创建接入点热点hostapd,但收到一条错误消息,提示我的卡不支持 AP 模式。我尝试了一下sudo iwconfig eth1 mode master,但收到以下错误:

Error for wireless request "Set Mode" (8B06) :
    SET failed on device eth1 ; Invalid argument.

如何让 Ubuntu 识别卡的 AP 模式功能?因为它显然支持接入点模式,因为它与 Windows 上的 Connectify 完美配合。

根据的输出lspci | grep Wireless,我的卡是:

03:00.0 Network controller: Broadcom Corporation BCM4313 802.11bgn Wireless Network Adapter (rev 01)

答案1

BCM4313 上的接入点模式热点

BCM4313brcmsmac从 3.10 Linux 内核开始,可以使用驱动程序在 AP 模式下运行。很长一段时间以来,BCM4313任何 Linux 驱动程序都不支持 AP 模式。但现在,您很幸运,因为 AdHoc(IBSS) 和 AP 模式都已实现brcmsmac。因此,要使 AP 模式适用于 BCM4313,您需要一个比 3.10 更新的 Linux 内核。使用Ubuntu 12.04.5LTSUbuntu 14.04LTS或更新版本。如果您使用的是Ubuntu 12.04LTS版本早于 12.04.5,安装包 Linux 通用 lts 可信 有关升级 12.04LTS 内核的更多详细信息,访问此链接
一旦您拥有合适的内核,请确保您没有运行其他 Broadcom 驱动程序,如bcmwl-kernel-sourceb43等。如果是,请卸载它们。无需明确安装brcmsmac,因为它已经是 Linux 内核中预安装的模块。现在,根据创建接入点热点这个答案。这是hostapd我使用的自定义配置BCM4313无线网卡:

#####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
#Replace it with ssid=<YourHotspotName>
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
#Replace it with wpa_passphrase=<Password you wish to use>
wpa_passphrase=anything
#sets wpa key management
wpa_key_mgmt=WPA-PSK
#sets encryption used by WPA2
rsn_pairwise=CCMP

此配置允许hostapd启动802.11nBCM4313 的模式接入点。您可以使用它来代替描述的通用 g 模式配置这里

相关内容