我正在尝试使用主题设备配置 wifi AP。根据网上的文档,它需要master mode
硬件支持和hostapd
软件。
看来我有主模式:
# iwconfig
...
wlp0s29u1u2 unassociated Nickname:"rtl_wifi"
Mode:Master Access Point: Not-Associated Sensitivity:0/0
Retry:off RTS thr:off Fragment thr:off
Encryption key:off
Power Management:off
Link Quality:0 Signal level:0 Noise level:0
Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
Tx excessive retries:0 Invalid misc:0 Missed beacon:0
但是,当我尝试启动 hostapd 时hostapd -dd /etc/hostapd/hostapd.conf
,它会默默退出并显示$? = 1
.当我在笔记本电脑上尝试它时,它开箱即用,但是,可能值得注意的是我必须从源代码构建 N10 驱动程序(8712u)。
Linux Dungeon 3.7.10-gentoo-gnu #11 SMP Sun Mar 31 23:12:28 MSK 2013 i686 Intel(R) Core(TM) i3-2100 CPU @ 3.10GHz GenuineIntel GNU/Linux
以下是内容/etc/hostapd/hostapd.conf
:
ssid=YourWifiName
interface=wlan0
bridge=br0
auth_algs=3
channel=7
hw_mode=g
logger_stdout=-1
logger_stdout_level=2
max_num_sta=5
rsn_pairwise=CCMP
另外,我发现了可能有趣的事情$(dmesg)
:
[193240.231986] WARNING: at kernel/timer.c:1056 del_timer_sync+0x2b/0x50()
[193240.231988] Hardware name: System Product Name
[193240.231990] Modules linked in: 8712u(O)
[193240.231995] Pid: 0, comm: swapper/0 Tainted: G W O 3.7.10-gentoo-gnu #11
[193240.231998] Call Trace:
[193240.232005] [<c103170d>] warn_slowpath_common+0x6d/0xa0
[193240.232008] [<c104001b>] ? del_timer_sync+0x2b/0x50
[193240.232011] [<c104001b>] ? del_timer_sync+0x2b/0x50
[193240.232015] [<c103175d>] warn_slowpath_null+0x1d/0x20
[193240.232018] [<c104001b>] del_timer_sync+0x2b/0x50
[193240.232032] [<f880f460>] surveydone_event_callback+0x2e/0x130 [8712u]
[193240.232041] [<f87ffc52>] ? fwdbg_event_callback+0x2d/0x33 [8712u]
[193240.232048] [<f8800373>] event_handle+0xf3/0x107 [8712u]
[193240.232063] [<f88198e5>] rxcmd_event_hdl+0x21/0x31 [8712u]
[193240.232068] [<f88047d4>] usb_read_port_complete+0x84/0x182 [8712u]
[193240.232071] [<c147d626>] usb_hcd_giveback_urb+0x36/0x90
[193240.232073] [<c148cb14>] ehci_urb_done+0x64/0xa0
[193240.232076] [<c148ef7a>] qh_completions+0x26a/0x500
[193240.232078] [<c1054b31>] ? hrtimer_start_range_ns+0x21/0x30
[193240.232081] [<c14901b1>] ehci_work+0x641/0x850
[193240.232083] [<c13da5bb>] ? ata_qc_complete+0x7b/0x1d0
[193240.232086] [<c13eae50>] ? ata_sff_error_handler+0xf0/0xf0
[193240.232088] [<c148e7fb>] ? qh_link_async+0x2b/0xb0
[193240.232090] [<c109ca00>] ? unmask_irq+0x20/0x20
[193240.232092] [<c14911c7>] ehci_irq+0x1c7/0x3a0
[193240.232095] [<c105b220>] ? __wake_up+0x40/0x50
[193240.232098] [<c12ed068>] ? __mix_pool_bytes+0x38/0x70
[193240.232100] [<c12ee53d>] ? add_interrupt_randomness+0x13d/0x160
[193240.232102] [<c12ee53d>] ? add_interrupt_randomness+0x13d/0x160
[193240.232104] [<c109ca00>] ? unmask_irq+0x20/0x20
有什么建议吗?
答案1
您的弃用iwconfig
(改用iw
!)输出显示您的界面为wlp0s29u1u2
,但您的 hostapd 配置提到interface=wlan0
。