Wireless enabled but not up [solved]

ok, bear with me on this, I have a manually compiled openwrt v17.01.4 with gcc 6.x and musl running on a kvm as x86_64 with a TL-WDN3200 passed as passthough usb.
currently I have only uci to work with, I'm trying to setup the wireless, the device is detected, the config is this:

root@LEDE:/# cat /etc/config/wireless

config wifi-device 'radio0'
        option type 'mac80211'
        option channel '11'
        option path 'pci0000:00/0000:00:1d.7/usb1/1-1/1-1:1.0'
        option country 'US'
        option disabled '0'
        option hwmode '11n'
        option htmode 'HT40+'

config wifi-iface 'default_radio0'
        option device 'radio0'
        option network 'lan'
        option mode 'ap'
        option ssid 'network'
        option encryption 'wpa2+tkip+aes'
        option key 'passcode'

wifi status is this:

root@LEDE:/# wifi status
{
        "radio0": {
                "up": false,
                "pending": false,
                "autostart": true,
                "disabled": false,
                "retry_setup_failed": true,
                "config": {
                        "channel": "11",
                        "path": "pci0000:00\/0000:00:1d.7\/usb1\/1-1\/1-1:1.0",
                        "country": "US",
                        "hwmode": "11n",
                        "htmode": "HT40+",
                        "disabled": false
                },
                "interfaces": [
                        {
                                "section": "default_radio0",
                                "config": {
                                        "mode": "ap",
                                        "ssid": "network",
                                        "encryption": "wpa2+tkip+aes",
                                        "key": "passcode",
                                        "network": [
                                                "lan"
                                        ],
                                        "mode": "ap"
                                }
                        }
                ]
        }
}

but for some reason the wireless isn't up. scans on my laptop doesn't find the network.
how can I get it to work? did I misconfigured it somehow?

First guess: you have selected channel 11 and HT40+, but if you can't use channel 12, then trying to use 11+12 (with HT40+) fails.

You might try 11+10 (with HT40-)

See https://wiki.openwrt.org/doc/uci/wireless#mac80211_device_options
wiki article also links to https://wiki.openwrt.org/doc/faq/faq.wireless#why_can_t_i_use_ht40_with_channel_11
leading to https://forum.openwrt.org/viewtopic.php?pid=156165#p156165

Are there no errors in the system log when you do "wifi up"?

got system log using logread, here is what I get:

Wed Apr 25 19:31:21 2018 daemon.notice netifd: radio0 (1578): command failed: Not supported (-95)
Wed Apr 25 19:31:21 2018 daemon.notice netifd: radio0 (1578): ./mac80211.sh: eval: line 1: /usr/sbin/hostapd: not found
Wed Apr 25 19:31:21 2018 daemon.notice netifd: radio0 (1578): cat: can't open '/var/run/wifi-phy0.pid': No such file or directory
Wed Apr 25 19:31:21 2018 daemon.notice netifd: radio0 (1578): Command failed: Invalid argument
Wed Apr 25 19:31:21 2018 daemon.notice netifd: radio0 (1578): Device setup failed: HOSTAPD_START_FAILED

do I need hostapd?

Typically wpad-mini or one of the other variants supply both hostapd and wpa_supplicant

I've rebuilt it with hostapd, I get this:

Wed Apr 25 19:47:47 2018 daemon.notice netifd: radio0 (1609): command failed: Not supported (-95)
Wed Apr 25 19:47:47 2018 daemon.err hostapd: Configuration file: /var/run/hostapd-phy0.conf
Wed Apr 25 19:47:47 2018 daemon.err hostapd: Line 25: invalid IP address ''
Wed Apr 25 19:47:47 2018 daemon.err hostapd: 1 errors found in configuration file '/var/run/hostapd-phy0.conf'
Wed Apr 25 19:47:47 2018 daemon.err hostapd: Failed to set up interface with /var/run/hostapd-phy0.conf
Wed Apr 25 19:47:47 2018 daemon.err hostapd: Failed to initialize interface
Wed Apr 25 19:47:47 2018 daemon.notice netifd: radio0 (1609): cat: can't open '/var/run/wifi-phy0.pid': No such file or directory
Wed Apr 25 19:47:47 2018 daemon.notice netifd: radio0 (1609): Command failed: Invalid argument
Wed Apr 25 19:47:47 2018 daemon.notice netifd: radio0 (1609): Device setup failed: HOSTAPD_START_FAILED

line 25 is auth_server_addr and it is empty, what should it hold?

Out of curiosity -- Is that a valid encryption option?

I read the code earlier this year and it's pretty lax in that it looks for a right-side or a left-side match and it doesn't much care what's in the middle.

(Was trying to see if wpa2+aes was any different than wpa2/aes and I don't think it is)

The wpa2 substring in option encryption enables WPA-EAP mode, in this case you need to provide further parameters like username, password, certificiates, authentication server address etc. Did you really mean to use wpa2 or did you want psk2 for WPA Personal (WPA-PSK) ?

1 Like

yes it is, for wpa 2 enterprise

thanks! that + using wpad-mini solved it, now my wifi is up.

1 Like

This topic was automatically closed 6 days after the last reply. New replies are no longer allowed.