執行 wifi up 
root@OpenWrt:/etc/config# wifi up

wifi status 觀察是否啟用,但"up": false,
root@OpenWrt:/etc/config# wifi status
{
        "radio0": {
                "up": false,
                "pending": false,
                "autostart": true,
                "disabled": false,
                "retry_setup_failed": true,
                "config": {
                        "channel": "11",
                        "hwmode": "11g",
                        "path": "pci0000:00/0000:00:14.0/usb3/3-2/3-2:1.0",
                        "htmode": "HT20"
                },
                "interfaces": [
                        {
                                "section": "default_radio0",
                                "config": {
                                        "mode": "ap",
                                        "encryption": "psk-mixed",
                                        "ifname": "wlan0",
                                        "wds": true,
                                        "ssid": "aptest",
                                        "key": "password",
                                        "network": [
                                                "lan"
                                        ],
                                        "mode": "ap"
                                }
                        }
                ]
        }
}

查看log,發現少了一個工具 ./mac80211.sh: eval: line 793: /usr/sbin/hostapd: not found
root@OpenWrt:/etc/config# logread | grep radio
Tue Aug 24 07:11:13 2021 daemon.notice netifd: radio0 (10651): command failed: Not supported (-95)
Tue Aug 24 07:11:13 2021 daemon.notice netifd: radio0 (10651): ./mac80211.sh: eval: line 793: /usr/sbin/hostapd: not found
Tue Aug 24 07:11:13 2021 daemon.notice netifd: radio0 (10651): cat: can't open '/var/run/wifi-phy0.pid': No such file or directory
Tue Aug 24 07:11:13 2021 daemon.notice netifd: radio0 (10651): WARNING (wireless_add_process): executable path /usr/sbin/hostapd does not match process  path (/proc/exe)
Tue Aug 24 07:11:13 2021 daemon.notice netifd: radio0 (10651): Command failed: Invalid argument
Tue Aug 24 07:11:13 2021 daemon.notice netifd: radio0 (10651): Device setup failed: HOSTAPD_START_FAILED
Tue Aug 24 07:11:29 2021 daemon.notice netifd: radio0 (10834): command failed: Not supported (-95)
Tue Aug 24 07:11:29 2021 daemon.notice netifd: radio0 (10834): ./mac80211.sh: eval: line 793: /usr/sbin/hostapd: not found
Tue Aug 24 07:11:29 2021 daemon.notice netifd: radio0 (10834): cat: can't open '/var/run/wifi-phy0.pid': No such file or directory
Tue Aug 24 07:11:29 2021 daemon.notice netifd: radio0 (10834): WARNING (wireless_add_process): executable path /usr/sbin/hostapd does not match process  path (/proc/exe)
Tue Aug 24 07:11:29 2021 daemon.notice netifd: radio0 (10834): Command failed: Invalid argument
Tue Aug 24 07:11:29 2021 daemon.notice netifd: radio0 (10834): Device setup failed: HOSTAPD_START_FAILED

安裝 hostapd
root@OpenWrt:/etc/config# opkg install hostapd
Installing hostapd (2019-08-08-ca8c2bd2-7) to root...
Downloading http://downloads.openwrt.org/releases/19.07.8/packages/x86_64/base/hostapd_2019-08-08-ca8c2bd2-7_x86_64.ipk
Configuring hostapd.

重新啟用 wifi
root@OpenWrt:/etc/config# wifi up

確認是否正常啟用
root@OpenWrt:/etc/config# wifi status
{
        "radio0": {
                "up": true,
                "pending": false,
                "autostart": true,
                "disabled": false,
                "retry_setup_failed": false,
                "config": {
                        "channel": "11",
                        "hwmode": "11g",
                        "path": "pci0000:00/0000:00:14.0/usb3/3-2/3-2:1.0",
                        "htmode": "HT20"
                },
                "interfaces": [
                        {
                                "section": "default_radio0",
                                "config": {
                                        "mode": "ap",
                                        "encryption": "psk-mixed",
                                        "ifname": "wlan0",
                                        "wds": true,
                                        "ssid": "aptest",
                                        "key": "password",
                                        "network": [
                                                "lan"
                                        ],
                                        "mode": "ap"
                                }
                        }
                ]
        }
}
 

arrow
arrow
    文章標籤
    openwrt hostapd
    全站熱搜

    helloworld 發表在 痞客邦 留言(0) 人氣()