我想用我刚买的Gigabyte 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模式是一种可能性。
1条答案
按热度按时间wztqucjr1#
(Question solved by edit. Converted to community wiki answer.)
观察员写道:
好吧,看来是个快乐的日子,我只需要补充一下:
到hostapd.conf文件。现在我得到: