在Ubuntu 14.04下以AP模式运行Intel 7260

问题描述 投票:0回答:1

我想使用我刚刚购买的技嘉 mini-ITX 系统上的内置 WiFi 作为接入点。出于某种原因,我一直在兜圈子。

lspci | grep -i wireless
揭示:

04:00.0 Network controller: Intel Corporation Wireless 7260 (rev 73)

lsmod | grep 80211
给出:

mac80211              630669  1 iwlmvm
cfg80211              484040  3 iwlwifi,mac80211,iwlmvm

我安装了hostapd。这是我创建的(超过)最小

hostapd.conf

interface=wlan0
driver=nl80211
logger_syslog=-1
logger_syslog_level=2
logger_stdout=-1
logger_stdout_level=2
ctrl_interface=/var/run/hostapd
ctrl_interface_group=0
ssid=test
hw_mode=g
channel=1
beacon_int=100
dtim_period=2
max_num_sta=255
rts_threshold=2347
fragm_threshold=2346
macaddr_acl=0
auth_algs=3
ignore_broadcast_ssid=0
wmm_enabled=1
wmm_ac_bk_cwmin=4
wmm_ac_bk_cwmax=10
wmm_ac_bk_aifs=7
wmm_ac_bk_txop_limit=0
wmm_ac_bk_acm=0
wmm_ac_be_aifs=3
wmm_ac_be_cwmin=4
wmm_ac_be_cwmax=10
wmm_ac_be_txop_limit=0
wmm_ac_be_acm=0
wmm_ac_vi_aifs=2
wmm_ac_vi_cwmin=3
wmm_ac_vi_cwmax=4
wmm_ac_vi_txop_limit=94
wmm_ac_vi_acm=0
wmm_ac_vo_aifs=2
wmm_ac_vo_cwmin=2
wmm_ac_vo_cwmax=3
wmm_ac_vo_txop_limit=47
own_ip_addr=127.0.0.1

当我尝试运行 hostapd 时,我得到以下信息:

$ sudo hostapd ./hostapd.conf

Configuration file: ./hostapd.conf
nl80211: Could not configure driver mode
nl80211 driver initialization failed.
hostapd_free_hapd_data: Interface wlan0 wasn't started

所以,我了解到 Ubuntu 14.04 存在问题以及如何解决它。

https://bugs.launchpad.net/ubuntu/+source/wpa/+bug/1289047

有趣的是,现在驱动程序(版本 2.1)执行了一些错误操作,而之前它忽略了它。

解决方案(在桌面情况下)是执行以下操作来释放资源..然后hostapd就没有错误....

sudo nmcli nm wifi off
sudo rfkill unblock wlan

此信息是从 https://bbs.archlinux.org/viewtopic.php?pid=1221799

收集的

nmcli 是网络管理器的一部分,需要安装。 接下来,

/etc/hostapd$ sudo nmcli nm wifi off
** (process:5724): WARNING **: Could not initialize NMClient /org/freedesktop/NetworkManager: The name org.freedesktop.NetworkManager was not provided by any .service files

所以我运行了这些命令,这应该是一种解决方法。

/etc/hostapd$ sudo service network-manager start
network-manager start/running, process 5763
/etc/hostapd$ sudo nmcli nm wifi off
/etc/hostapd$ sudo rfkill unblock wlan

但是尝试运行 hostapd 仍然存在同样的问题。

https://askubuntu.com/questions/472794/hostapd-error-nl80211-could-not-configure-driver-mode推荐这个:

sudo ifconfig wlan0 10.15.0.1/24 up 
sleep 1 
sudo service isc-dhcp-server restart 
sudo service hostapd restart

isc-dhcp-server 尚未安装。其他一切都运行,没有显示任何错误。

仍然有问题!

ifconfig wlan0
显示:

wlan0     Link encap:Ethernet  HWaddr 80:19:34:32:20:a3
          inet addr:10.15.0.1  Bcast:10.15.0.255  Mask:255.255.255.0
          inet6 addr: fd04:bd3:80e8:1:91e9:7f2e:f005:5af9/64 Scope:Global
          inet6 addr: fe80::8219:34ff:fe32:20a3/64 Scope:Link
          inet6 addr: fd04:bd3:80e8:1:8219:34ff:fe32:20a3/64 Scope:Global
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:43138 errors:0 dropped:0 overruns:0 frame:0
          TX packets:638 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:6824297 (6.8 MB)  TX bytes:121399 (121.3 KB)

iw list
显示:

Wiphy phy0
        Band 1:
                Capabilities: 0x1062
                        HT20/HT40
                        Static SM Power Save
                        RX HT20 SGI
                        RX HT40 SGI
                        No RX STBC
                        Max AMSDU length: 3839 bytes
                        DSSS/CCK HT40
                Maximum RX AMPDU length 65535 bytes (exponent: 0x003)
                Minimum RX AMPDU time spacing: 4 usec (0x05)
                HT TX/RX MCS rate indexes supported: 0-15, 32
                Frequencies:
                        * 2412 MHz [1] (22.0 dBm)
                        * 2417 MHz [2] (22.0 dBm)
                        * 2422 MHz [3] (22.0 dBm)
                        * 2427 MHz [4] (22.0 dBm)
                        * 2432 MHz [5] (22.0 dBm)
                        * 2437 MHz [6] (22.0 dBm)
                        * 2442 MHz [7] (22.0 dBm)
                        * 2447 MHz [8] (22.0 dBm)
                        * 2452 MHz [9] (22.0 dBm)
                        * 2457 MHz [10] (22.0 dBm)
                        * 2462 MHz [11] (22.0 dBm)
                        * 2467 MHz [12] (22.0 dBm) (passive scanning, no IBSS)
                        * 2472 MHz [13] (22.0 dBm) (passive scanning, no IBSS)
                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
        Band 2:
                Capabilities: 0x1062
                        HT20/HT40
                        Static SM Power Save
                        RX HT20 SGI
                        RX HT40 SGI
                        No RX STBC
                        Max AMSDU length: 3839 bytes
                        DSSS/CCK HT40
                Maximum RX AMPDU length 65535 bytes (exponent: 0x003)
                Minimum RX AMPDU time spacing: 4 usec (0x05)
                HT TX/RX MCS rate indexes supported: 0-15, 32
                Frequencies:
                        * 5180 MHz [36] (22.0 dBm) (passive scanning, no IBSS)
                        * 5200 MHz [40] (22.0 dBm) (passive scanning, no IBSS)
                        * 5220 MHz [44] (22.0 dBm) (passive scanning, no IBSS)
                        * 5240 MHz [48] (22.0 dBm) (passive scanning, no IBSS)
                        * 5260 MHz [52] (22.0 dBm) (passive scanning, no IBSS, radar detection)
                        * 5280 MHz [56] (22.0 dBm) (passive scanning, no IBSS, radar detection)
                        * 5300 MHz [60] (22.0 dBm) (passive scanning, no IBSS, radar detection)
                        * 5320 MHz [64] (22.0 dBm) (passive scanning, no IBSS, radar detection)
                        * 5500 MHz [100] (22.0 dBm) (passive scanning, no IBSS, radar detection)
                        * 5520 MHz [104] (22.0 dBm) (passive scanning, no IBSS, radar detection)
                        * 5540 MHz [108] (22.0 dBm) (passive scanning, no IBSS, radar detection)
                        * 5560 MHz [112] (22.0 dBm) (passive scanning, no IBSS, radar detection)
                        * 5580 MHz [116] (22.0 dBm) (passive scanning, no IBSS, radar detection)
                        * 5600 MHz [120] (22.0 dBm) (passive scanning, no IBSS, radar detection)
                        * 5620 MHz [124] (22.0 dBm) (passive scanning, no IBSS, radar detection)
                        * 5640 MHz [128] (22.0 dBm) (passive scanning, no IBSS, radar detection)
                        * 5660 MHz [132] (22.0 dBm) (passive scanning, no IBSS, radar detection)
                        * 5680 MHz [136] (22.0 dBm) (passive scanning, no IBSS, radar detection)
                        * 5700 MHz [140] (22.0 dBm) (passive scanning, no IBSS, radar detection)
                        * 5720 MHz [144] (22.0 dBm) (passive scanning, no IBSS, radar detection)
                        * 5745 MHz [149] (22.0 dBm) (passive scanning, no IBSS)
                        * 5765 MHz [153] (22.0 dBm) (passive scanning, no IBSS)
                        * 5785 MHz [157] (22.0 dBm) (passive scanning, no IBSS)
                        * 5805 MHz [161] (22.0 dBm) (passive scanning, no IBSS)
                        * 5825 MHz [165] (22.0 dBm) (passive scanning, no IBSS)
                Bitrates (non-HT):
                        * 6.0 Mbps
                        * 9.0 Mbps
                        * 12.0 Mbps
                        * 18.0 Mbps
                        * 24.0 Mbps
                        * 36.0 Mbps
                        * 48.0 Mbps
                        * 54.0 Mbps
        max # scan SSIDs: 20
        max scan IEs length: 393 bytes
        Coverage class: 0 (up to 0m)
        Supported Ciphers:
                * WEP40 (00-0f-ac:1)
                * WEP104 (00-0f-ac:5)
                * TKIP (00-0f-ac:2)
                * CCMP (00-0f-ac:4)
                * CMAC (00-0f-ac:6)
        Available Antennas: TX 0 RX 0
        Supported interface modes:
                 * IBSS
                 * managed
                 * AP
                 * AP/VLAN
                 * monitor
                 * P2P-client
                 * P2P-GO
                 * Unknown mode (10)
        software interface modes (can always be added):
                 * AP/VLAN
                 * monitor
        valid interface combinations:
                 * #{ managed } <= 1, #{ AP, P2P-client, P2P-GO } <= 1, #{ Unknown mode (10) } <= 1,
                   total <= 3, #channels <= 1
        Supported commands:
                 * new_interface
                 * set_interface
                 * new_key
                 * new_beacon
                 * new_station
                 * new_mpath
                 * set_mesh_params
                 * set_bss
                 * authenticate
                 * associate
                 * deauthenticate
                 * disassociate
                 * join_ibss
                 * join_mesh
                 * remain_on_channel
                 * set_tx_bitrate_mask
                 * action
                 * frame_wait_cancel
                 * set_wiphy_netns
                 * set_channel
                 * set_wds_peer
                 * Unknown command (84)
                 * Unknown command (87)
                 * Unknown command (85)
                 * Unknown command (89)
                 * Unknown command (92)
                 * connect
                 * disconnect
        Supported TX frame types:
                 * IBSS: 0x00 0x10 0x20 0x30 0x40 0x50 0x60 0x70 0x80 0x90 0xa0 0xb0 0xc0 0xd0 0xe0 0xf0
                 * managed: 0x00 0x10 0x20 0x30 0x40 0x50 0x60 0x70 0x80 0x90 0xa0 0xb0 0xc0 0xd0 0xe0 0xf0
                 * AP: 0x00 0x10 0x20 0x30 0x40 0x50 0x60 0x70 0x80 0x90 0xa0 0xb0 0xc0 0xd0 0xe0 0xf0
                 * AP/VLAN: 0x00 0x10 0x20 0x30 0x40 0x50 0x60 0x70 0x80 0x90 0xa0 0xb0 0xc0 0xd0 0xe0 0xf0
                 * mesh point: 0x00 0x10 0x20 0x30 0x40 0x50 0x60 0x70 0x80 0x90 0xa0 0xb0 0xc0 0xd0 0xe0 0xf0
                 * P2P-client: 0x00 0x10 0x20 0x30 0x40 0x50 0x60 0x70 0x80 0x90 0xa0 0xb0 0xc0 0xd0 0xe0 0xf0
                 * P2P-GO: 0x00 0x10 0x20 0x30 0x40 0x50 0x60 0x70 0x80 0x90 0xa0 0xb0 0xc0 0xd0 0xe0 0xf0
                 * Unknown mode (10): 0x00 0x10 0x20 0x30 0x40 0x50 0x60 0x70 0x80 0x90 0xa0 0xb0 0xc0 0xd0 0xe0 0xf0
        Supported RX frame types:
                 * IBSS: 0x40 0xb0 0xc0 0xd0
                 * managed: 0x40 0xd0
                 * AP: 0x00 0x20 0x40 0xa0 0xb0 0xc0 0xd0
                 * AP/VLAN: 0x00 0x20 0x40 0xa0 0xb0 0xc0 0xd0
                 * mesh point: 0xb0 0xc0 0xd0
                 * P2P-client: 0x40 0xd0
                 * P2P-GO: 0x00 0x20 0x40 0xa0 0xb0 0xc0 0xd0
                 * Unknown mode (10): 0x40 0xd0
        Device supports RSN-IBSS.
        WoWLAN support:
                 * wake up on disconnect
                 * wake up on magic packet
                 * wake up on pattern match, up to 20 patterns of 16-128 bytes
                 * can do GTK rekeying
                 * wake up on GTK rekey failure
                 * wake up on EAP identity request
                 * wake up on 4-way handshake
                 * wake up on rfkill release
        HT Capability overrides:
                 * MCS: ff ff ff ff ff ff ff ff ff ff
                 * maximum A-MSDU length
                 * supported channel width
                 * short GI for 40 MHz
                 * max A-MPDU length exponent
                 * min MPDU start spacing
        Device supports TX status socket option.
        Device supports HT-IBSS.

使用

iwconfig
将其设置为“Master”模式,我认为这意味着将其设置为AP模式,结果如下:

$ sudo iwconfig wlan0 mode Master
Error for wireless request "Set Mode" (8B06) :
    SET failed on device wlan0 ; Invalid argument.

所以,我猜7260驱动程序可能不想在AP模式下工作。但是,

iwlist
命令输出显示 AP 模式是其中一种可能性。

linux wifi
1个回答
0
投票

问题已通过编辑解决。转换为社区维基答案。

OP 写道:

好吧,看起来很开心,我只需要添加以下内容:

### Set your bridge name ###
bridge=br0

到 hostapd.conf 文件。现在我明白了:

$ sudo hostapd /etc/hostapd/hostapd.conf
Configuration file: /etc/hostapd/hostapd.conf
Using interface wlan0 with hwaddr 80:19:34:32:20:a3 and ssid "test"
wlan0: interface state UNINITIALIZED->ENABLED
wlan0: AP-ENABLED
© www.soinside.com 2019 - 2024. All rights reserved.