Wireless is not working with different errors (SOLVED)

Hi,

I recently installed OpenWrt 18.06 on Sagem F@st 2804 v7.

From the very beginning, wireless is not working with several strange errors (see syslog below).

I've tried to install wpad instead of wpad-mini as it was suggested in the topics below:
https://forum.openwrt.org/t/solved-lede-17-01-4-wi-fi-not-starting-hostapd-unknown-configuration-wpa-disable-eapol-key-retries/8065/4
https://forum.openwrt.org/t/wireless-enabled-but-not-up-solved/13862

But it didn't help, so I rolled it back to wpad-mini.

What am I doing wrong?

syslog

Fri Oct 19 10:26:41 2018 daemon.notice netifd: radio0 (11580): command failed: Not supported (-122)
Fri Oct 19 10:26:42 2018 daemon.err hostapd: Configuration file: /var/run/hostapd-phy0.conf
Fri Oct 19 10:26:42 2018 daemon.err hostapd: Could not set interface wlan0 flags (UP): Address not available
Fri Oct 19 10:26:42 2018 daemon.err hostapd: nl80211: Could not set interface 'wlan0' UP
Fri Oct 19 10:26:42 2018 daemon.notice hostapd: nl80211: deinit ifname=wlan0 disabled_11b_rates=0
Fri Oct 19 10:26:42 2018 daemon.err hostapd: nl80211 driver initialization failed.
Fri Oct 19 10:26:42 2018 daemon.notice hostapd: wlan0: interface state UNINITIALIZED->DISABLED
Fri Oct 19 10:26:42 2018 daemon.notice hostapd: wlan0: AP-DISABLED
Fri Oct 19 10:26:42 2018 daemon.notice hostapd: wlan0: CTRL-EVENT-TERMINATING
Fri Oct 19 10:26:42 2018 daemon.err hostapd: hostapd_free_hapd_data: Interface wlan0 wasn't started
Fri Oct 19 10:26:42 2018 daemon.notice netifd: radio0 (11580): cat: can't open '/var/run/wifi-phy0.pid': No such file or directory
Fri Oct 19 10:26:42 2018 daemon.notice netifd: radio0 (11580): WARNING (wireless_add_process): executable path /usr/sbin/wpad does not match process  path ()
Fri Oct 19 10:26:42 2018 daemon.notice netifd: radio0 (11580): Command failed: Invalid argument
Fri Oct 19 10:26:42 2018 daemon.notice netifd: radio0 (11580): Device setup failed: HOSTAPD_START_FAILED

wifi status

{ /var/run/hostapd-phy0.conf 29/29 100%
        "radio0": {
                "up": false,
                "pending": false,
                "autostart": true,
                "disabled": false,
                "retry_setup_failed": true,
                "config": {
                        "channel": "11",
                        "hwmode": "11g",
                        "path": "pci0000:00\/0000:00:00.0\/0000:01:00.0\/bcma0:1"
                },
                "interfaces": [
                        {
                                "section": "default_radio0",
                                "config": {
                                        "mode": "ap",
                                        "ssid": "OpenWrt",
                                        "encryption": "none",
                                        "network": [
                                                "lan"
                                        ],
                                        "mode": "ap"
                                }
                        }
                ]
        }
}

/etc/config/wireless

config wifi-device 'radio0'
        option type 'mac80211'
        option channel '11'
        option hwmode '11g'
        option path 'pci0000:00/0000:00:00.0/0000:01:00.0/bcma0:1'

config wifi-iface 'default_radio0'
        option device 'radio0'
        option network 'lan'
        option mode 'ap'
        option ssid 'OpenWrt'
        option encryption 'none'

/var/run/hostapd-phy0.conf

driver=nl80211
logger_syslog=127
logger_syslog_level=2
logger_stdout=127
logger_stdout_level=2
hw_mode=g
beacon_int=100
channel=11

interface=wlan0
ctrl_interface=/var/run/hostapd
ap_isolate=1
bss_load_update_period=60
chan_util_avg_period=600
disassoc_low_ack=1
preamble=1
wmm_enabled=1
ignore_broadcast_ssid=0
uapsd_advertisement_enabled=1
auth_algs=1
wpa=0
ssid=OpenWrt
bridge=br-lan
bssid=00:00:00:00:00:00

/etc/config/network

config interface 'loopback'
        option ifname 'lo'
        option proto 'static'
        option ipaddr '127.0.0.1'
        option netmask '255.0.0.0'

config globals 'globals'
        option ula_prefix 'fdf9:f6af:6753::/48'

config interface 'lan'
        option type 'bridge'
        option ifname 'eth0.1'
        option proto 'static'
        option ipaddr '192.168.1.1'
        option netmask '255.255.255.0'
        option ip6assign '60'

config switch
        option name 'switch0'
        option reset '1'
        option enable_vlan '1'

config switch_vlan
        option device 'switch0'
        option vlan '1'
        option ports '0 1 2 8t'

config switch_vlan
        option device 'switch0'
        option vlan '2'
        option ports '3 8t'

config interface 'WAN'
        option proto 'dhcp'
        option ifname 'eth0.2'
        option type 'bridge'

config interface 'wwan'
        option proto 'dhcp'
        option auto '0'

config interface '4G'
        option proto '3g'
        option device '/dev/ttyACM0'
        option ipv6 'auto'
        option service 'umts'
        option dialnumber '*99#'
        option apn 'internet'
        option username 'gdata'
        option password 'gdata'
        option maxwait '0'

config interface 'TetheringUSB'
        option proto 'dhcp'
        option ifname 'usb0'
        option auto '0'

config interface 'WiFi'
        option proto 'dhcp'

If anyone is interested, I found the solution here.

For some reason, MAC address was empty, so I had to change it by myself in three different places:

  1. /sys/class/ieee80211/phy0/macaddress
  2. /var/run/hostapd-phy0.conf
  3. /etc/config/wireless

After that, the wireless started working.

1 Like

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