[Solved] Wifi up, cannot connect with any device (even with cable)

Could you please clarify a couple of points?

  • Does it work again when you plug in the cable or when you plug it out?
  • Does it work for wired computers?

Sure. When I plug in the cable, it doesn't work. If I leave the cable in and reboot it, as soon as it is up again then it starts working again. (it is so weird)
Both Wifi and ethernet work fine when the cable is in after a reboot.

You can try to increase the log buffer and save it somewhere you can access even if you cant access the router itself. I think there's an option to log remotely into another system but I don't know because never tested myself. This way you can see what is the problem with the router and where exactly it's occurring.

I can try, but I'm not really sure whether it even connects to a network. Maybe to a usb? Increasing the log buffer won't do much: it doesn't log anything at all during the period in which it doesn't work. A higher log level probably can be better.

I think there is an option to log on the remote server but I am not sure if it will work when the network is not quite working. You already said you cannot connect to the device from Ethernet or WiFi when it's acting out and you end up restarting it. So how would you know if it produces any error logs? Furthermore USB is a better choice because even when the device is acting out it may still provide something to the USB. AFAIK logging in default saves to ram, so having a default level of verbosity maybe is also okay as long as you have a log to read even after the reboot. Plus increasing the buffer will be helpful because you maybe reading the log after the router boots up and by then most of the log would be replaced by new one.

I honestly don't know how to work out a solution for this :confused: I have to find out which logs can provide more insight and enable their more verbose logging...

In LuCI go to System -> System and then Logging tab. There you will find a bunch of options that you can choose for logging. You should increase the system log buffer size to a value say 512 Kb then write the file location to save the log file. e.g. /mnt/system.log (or wherever your USB is mounted). Choose log output level to Debug if you want detailed info. Hit save and apply and you should be done and then you can look for your problem in log.

That's great, thanks for the suggestion; both the settings are set to "Debug" now.
The log is being outputted to the pendrive. Here it is:

Fri Feb  1 23:12:02 2019 daemon.notice netifd: Interface 'wwan' is now up
Fri Feb  1 23:12:02 2019 user.notice firewall: Reloading firewall due to ifup of wwan (wlan0)
Fri Feb  1 23:18:55 2019 daemon.info dnsmasq-dhcp[1527]: DHCPDISCOVER(br-lan) d0:4e:71:44:af:e0
Fri Feb  1 23:18:55 2019 daemon.info dnsmasq-dhcp[1527]: DHCPOFFER(br-lan) 192.168.8.201 d0:4e:71:44:af:e0
Fri Feb  1 23:18:55 2019 daemon.info dnsmasq-dhcp[1527]: DHCPREQUEST(br-lan) 192.168.8.201 d0:4e:71:44:af:e0
Fri Feb  1 23:18:55 2019 daemon.info dnsmasq-dhcp[1527]: DHCPACK(br-lan) 192.168.8.201 d0:4e:71:44:af:e0
Fri Feb  1 23:19:05 2019 authpriv.info dropbear[1612]: Child connection from 192.168.8.201:32948
Fri Feb  1 23:19:25 2019 authpriv.notice dropbear[1612]: Password auth succeeded for 'root' from 192.168.8.201:32948
Fri Feb  1 23:19:28 2019 daemon.info dnsmasq[1527]: now checking DNSSEC signature timestamps
Fri Feb  1 23:19:28 2019 daemon.info dnsmasq[1527]: read /etc/hosts - 4 addresses
Fri Feb  1 23:19:28 2019 daemon.info dnsmasq[1527]: read /tmp/hosts/dhcp.cfg01411c - 1 addresses
Fri Feb  1 23:19:28 2019 daemon.info dnsmasq-dhcp[1527]: read /etc/ethers - 0 addresses
root@OpenWrt:/mnt/sda1# packet_write_wait: Connection to 192.168.8.1 port 22: Broken pipe

It was the same output by logread.
At 23:20 I unplug the gl inet, plug it again without the ethernet cable, see the wifi connection, but as usual I cannot connect.
I unplug the gl inet, plug the ethernet cable and at 23:22 power it on.
I wait till 23:24; I can see the wifi connection, connect and here's the log now.

Fri Feb  1 23:12:00 2019 kern.info kernel: [   31.193592] IPv6: ADDRCONF(NETDEV_CHANGE): wlan0-1: link becomes ready
Fri Feb  1 23:12:00 2019 kern.info kernel: [   31.200584] br-lan: port 2(wlan0-1) entered blocking state
Fri Feb  1 23:12:00 2019 kern.info kernel: [   31.206292] br-lan: port 2(wlan0-1) entered forwarding state
Fri Feb  1 23:12:00 2019 daemon.notice netifd: Network device 'wlan0-1' link is up
Fri Feb  1 23:12:00 2019 user.notice firewall: Reloading firewall due to ifup of wwan (wlan0)
Fri Feb  1 23:24:22 2019 daemon.info dnsmasq-dhcp[1538]: DHCPDISCOVER(br-lan) 192.168.8.201 d0:4e:71:44:af:e0
Fri Feb  1 23:24:22 2019 daemon.info dnsmasq-dhcp[1538]: DHCPOFFER(br-lan) 192.168.8.201 d0:4e:71:44:af:e0
Fri Feb  1 23:24:22 2019 daemon.info dnsmasq-dhcp[1538]: DHCPREQUEST(br-lan) 192.168.8.201 d0:4e:71:44:af:e0
Fri Feb  1 23:24:22 2019 daemon.info dnsmasq-dhcp[1538]: DHCPACK(br-lan) 192.168.8.201 d0:4e:71:44:af:e0
Fri Feb  1 23:24:28 2019 authpriv.info dropbear[1611]: Child connection from 192.168.8.201:32952
Fri Feb  1 23:24:30 2019 authpriv.notice dropbear[1611]: Password auth succeeded for 'root' from 192.168.8.201:32952

Some of the entries are gone??? How is this possible??? I'm reading the same file...
(waiting for longer before connecting to the wifi doesn't change anything, it still doesn't let any device connect to it)

I'm looking for a solution to this instead of reflashing (a new) firmware, in case it's a bug and the openwrt team wants to fix it

The log you provided above doesn't say anything that seems to be wrong/broken. So you need to provide more log which states what's actually going on.

Currently the log says that a device is requesting ip address and it is being handled properly. I don't see anything that is wrong in the log. You should use your device as you do and when the router starts to behave abnormally just turn it off completely. Then take out the USB and copy the log to your computer and link the full log here.

Good advice! This is the full log. At 15:03 I turn off the device and reboot it without the ethernet cable in.
Then I try to connect to it, but I cannot connect.

Sat Feb  2 15:03:53 2019 daemon.info dnsmasq[851]: now checking DNSSEC signature timestamps
Sat Feb  2 15:03:53 2019 daemon.info dnsmasq[851]: read /etc/hosts - 4 addresses
Sat Feb  2 15:03:53 2019 daemon.info dnsmasq[851]: read /tmp/hosts/dhcp.cfg01411c - 0 addresses
Sat Feb  2 15:03:58 2019 daemon.info hostapd: wlan0-1: STA d0:4e:71:44:af:e0 IEEE 802.11: authenticated
Sat Feb  2 15:03:58 2019 daemon.info hostapd: wlan0-1: STA d0:4e:71:44:af:e0 IEEE 802.11: associated (aid 1)
Sat Feb  2 15:03:58 2019 daemon.notice hostapd: wlan0-1: AP-STA-CONNECTED d0:4e:71:44:af:e0
Sat Feb  2 15:03:58 2019 daemon.info hostapd: wlan0-1: STA d0:4e:71:44:af:e0 WPA: pairwise key handshake completed (RSN)
Sat Feb  2 15:04:30 2019 daemon.notice hostapd: wlan0-1: AP-STA-DISCONNECTED d0:4e:71:44:af:e0
Sat Feb  2 15:04:31 2019 daemon.info hostapd: wlan0-1: STA d0:4e:71:44:af:e0 IEEE 802.11: authenticated
Sat Feb  2 15:04:31 2019 daemon.info hostapd: wlan0-1: STA d0:4e:71:44:af:e0 IEEE 802.11: associated (aid 1)
Sat Feb  2 15:04:31 2019 daemon.notice hostapd: wlan0-1: AP-STA-CONNECTED d0:4e:71:44:af:e0
Sat Feb  2 15:04:31 2019 daemon.info hostapd: wlan0-1: STA d0:4e:71:44:af:e0 WPA: pairwise key handshake completed (RSN)
Sat Feb  2 15:04:36 2019 daemon.info hostapd: wlan0-1: STA 48:69:03:10:6f:01 IEEE 802.11: authenticated
Sat Feb  2 15:04:36 2019 daemon.info hostapd: wlan0-1: STA 48:69:03:10:6f:01 IEEE 802.11: associated (aid 2)
Sat Feb  2 15:04:36 2019 daemon.notice hostapd: wlan0-1: AP-STA-CONNECTED 48:69:03:10:6f:01
Sat Feb  2 15:04:36 2019 daemon.info hostapd: wlan0-1: STA 48:69:03:10:6f:01 WPA: pairwise key handshake completed (RSN)
Sat Feb  2 15:05:12 2019 daemon.notice hostapd: wlan0-1: AP-STA-DISCONNECTED d0:4e:71:44:af:e0
Sat Feb  2 15:05:13 2019 daemon.info hostapd: wlan0-1: STA d0:4e:71:44:af:e0 IEEE 802.11: authenticated
Sat Feb  2 15:05:13 2019 daemon.info hostapd: wlan0-1: STA d0:4e:71:44:af:e0 IEEE 802.11: associated (aid 1)
Sat Feb  2 15:05:13 2019 daemon.notice hostapd: wlan0-1: AP-STA-CONNECTED d0:4e:71:44:af:e0
Sat Feb  2 15:05:13 2019 daemon.info hostapd: wlan0-1: STA d0:4e:71:44:af:e0 WPA: pairwise key handshake completed (RSN)
Sat Feb  2 15:05:21 2019 daemon.notice hostapd: wlan0-1: AP-STA-DISCONNECTED 48:69:03:10:6f:01
Sat Feb  2 15:05:25 2019 daemon.info hostapd: wlan0-1: STA 48:69:03:10:6f:01 IEEE 802.11: authenticated
Sat Feb  2 15:05:25 2019 daemon.info hostapd: wlan0-1: STA 48:69:03:10:6f:01 IEEE 802.11: associated (aid 2)
Sat Feb  2 15:05:25 2019 daemon.notice hostapd: wlan0-1: AP-STA-CONNECTED 48:69:03:10:6f:01
Sat Feb  2 15:05:25 2019 daemon.info hostapd: wlan0-1: STA 48:69:03:10:6f:01 WPA: pairwise key handshake completed (RSN)
Sat Feb  2 15:05:32 2019 daemon.notice hostapd: wlan0-1: AP-STA-DISCONNECTED d0:4e:71:44:af:e0
Sat Feb  2 15:05:49 2019 daemon.info hostapd: wlan0-1: STA d0:4e:71:44:af:e0 IEEE 802.11: authenticated
Sat Feb  2 15:05:49 2019 daemon.info hostapd: wlan0-1: STA d0:4e:71:44:af:e0 IEEE 802.11: associated (aid 1)
Sat Feb  2 15:05:49 2019 daemon.notice hostapd: wlan0-1: AP-STA-CONNECTED d0:4e:71:44:af:e0
Sat Feb  2 15:05:49 2019 daemon.info hostapd: wlan0-1: STA d0:4e:71:44:af:e0 WPA: pairwise key handshake completed (RSN)

At the end I turn it off and get the full log above from the pendrive.

Well now it makes sense to look at the log, it repeatedly shows device getting connected and then getting disconnected in just a few seconds. That means something is not working right. It can actually be a bug in wifi driver or the hostapd itself maybe.

It is also possible that there's some kind of interference maybe which doesn't let the wifi run properly. Have you tried changing channels? Maybe try different channels to see if the problem is still there. Btw now that v18.06.2 is available, I'd suggest to give it a try because it's possible that this problem may have been fixed in this update but I can't say for sure.

Thanks for the info. I have updated the firmware to the latest version and I still experience the same issue. Here's the log again:

Sat Feb  2 22:01:21 2019 daemon.info hostapd: wlan0-1: STA d0:4e:71:44:af:e0 IEEE 802.11: authenticated
Sat Feb  2 22:01:21 2019 daemon.info hostapd: wlan0-1: STA d0:4e:71:44:af:e0 IEEE 802.11: associated (aid 1)
Sat Feb  2 22:01:21 2019 daemon.info dnsmasq[853]: now checking DNSSEC signature timestamps
Sat Feb  2 22:01:21 2019 daemon.info dnsmasq[853]: read /etc/hosts - 4 addresses
Sat Feb  2 22:01:21 2019 daemon.info dnsmasq[853]: read /tmp/hosts/dhcp.cfg01411c - 0 addresses
Sat Feb  2 22:01:21 2019 daemon.notice hostapd: wlan0-1: AP-STA-CONNECTED d0:4e:71:44:af:e0
Sat Feb  2 22:01:21 2019 daemon.info hostapd: wlan0-1: STA d0:4e:71:44:af:e0 WPA: pairwise key handshake completed (RSN)
Sat Feb  2 22:01:52 2019 daemon.notice hostapd: wlan0-1: AP-STA-DISCONNECTED d0:4e:71:44:af:e0
Sat Feb  2 22:01:53 2019 daemon.info hostapd: wlan0-1: STA d0:4e:71:44:af:e0 IEEE 802.11: authenticated
Sat Feb  2 22:01:53 2019 daemon.info hostapd: wlan0-1: STA d0:4e:71:44:af:e0 IEEE 802.11: associated (aid 1)
Sat Feb  2 22:01:53 2019 daemon.notice hostapd: wlan0-1: AP-STA-CONNECTED d0:4e:71:44:af:e0
Sat Feb  2 22:01:53 2019 daemon.info hostapd: wlan0-1: STA d0:4e:71:44:af:e0 WPA: pairwise key handshake completed (RSN)
Sat Feb  2 22:02:23 2019 daemon.notice hostapd: wlan0-1: AP-STA-DISCONNECTED d0:4e:71:44:af:e0
Sat Feb  2 22:02:24 2019 daemon.info hostapd: wlan0-1: STA d0:4e:71:44:af:e0 IEEE 802.11: authenticated
Sat Feb  2 22:02:24 2019 daemon.info hostapd: wlan0-1: STA d0:4e:71:44:af:e0 IEEE 802.11: associated (aid 1)
Sat Feb  2 22:02:24 2019 daemon.notice hostapd: wlan0-1: AP-STA-CONNECTED d0:4e:71:44:af:e0
Sat Feb  2 22:02:24 2019 daemon.info hostapd: wlan0-1: STA d0:4e:71:44:af:e0 WPA: pairwise key handshake completed (RSN)

Log when it works:

Sat Feb  2 22:06:24 2019 daemon.info dnsmasq-dhcp[1508]: DHCPREQUEST(br-lan) 192.168.8.201 60:f7:f7:92:ae:5f
Sat Feb  2 22:06:24 2019 daemon.info dnsmasq-dhcp[1508]: DHCPACK(br-lan) 192.168.8.201 60:f7:f7:92:ae:5f
Sat Feb  2 22:06:35 2019 daemon.info hostapd: wlan0-1: STA d0:4e:71:44:af:e0 IEEE 802.11: authenticated
Sat Feb  2 22:06:35 2019 daemon.info hostapd: wlan0-1: STA d0:4e:71:44:af:e0 IEEE 802.11: associated (aid 1)
Sat Feb  2 22:06:36 2019 daemon.notice hostapd: wlan0-1: AP-STA-CONNECTED d0:4e:71:44:af:e0
Sat Feb  2 22:06:36 2019 daemon.info hostapd: wlan0-1: STA d0:4e:71:44:af:e0 WPA: pairwise key handshake completed (RSN)
Sat Feb  2 22:06:37 2019 daemon.info dnsmasq-dhcp[1508]: DHCPREQUEST(br-lan) 192.168.8.128 d0:4e:71:44:af:e0
Sat Feb  2 22:06:37 2019 daemon.info dnsmasq-dhcp[1508]: DHCPACK(br-lan) 192.168.8.128 d0:4e:71:44:af:e0 android
Sat Feb  2 22:06:52 2019 daemon.info dnsmasq[1508]: now checking DNSSEC signature timestamps
Sat Feb  2 22:06:52 2019 daemon.info dnsmasq[1508]: read /etc/hosts - 4 addresses
Sat Feb  2 22:06:52 2019 daemon.info dnsmasq[1508]: read /tmp/hosts/dhcp.cfg01411c - 2 addresses
Sat Feb  2 22:06:52 2019 daemon.info dnsmasq-dhcp[1508]: read /etc/ethers - 0 addresses

Still:

  • The log is cut (some parts disappears, but with your suggestion I can get the most recent one)
  • It works only when it boots up with the cable in

It's indifferent to other channels. It's so weird it works only when it boots up with an ethernet cable in :frowning: if the cable is later disconnected it keeps working.
I'd be happy to continue debugging if you have any other ideas or other people help us in finding out what's going on!

I have increased the logging of hostapd to 0 (max verbose) and here it is:

Sat Feb  2 22:23:02 2019 daemon.debug hostapd: wlan0-1: STA d0:4e:71:44:af:e0 IEEE 802.11: authentication OK (open system)
Sat Feb  2 22:23:02 2019 daemon.debug hostapd: wlan0-1: STA d0:4e:71:44:af:e0 MLME: MLME-AUTHENTICATE.indication(d0:4e:71:44:af:e0, OPEN_SYSTEM)
Sat Feb  2 22:23:02 2019 daemon.debug hostapd: wlan0-1: STA d0:4e:71:44:af:e0 MLME: MLME-DELETEKEYS.request(d0:4e:71:44:af:e0)
Sat Feb  2 22:23:02 2019 daemon.info hostapd: wlan0-1: STA d0:4e:71:44:af:e0 IEEE 802.11: authenticated
Sat Feb  2 22:23:02 2019 daemon.debug hostapd: wlan0-1: STA d0:4e:71:44:af:e0 IEEE 802.11: association OK (aid 1)
Sat Feb  2 22:23:02 2019 daemon.info hostapd: wlan0-1: STA d0:4e:71:44:af:e0 IEEE 802.11: associated (aid 1)
Sat Feb  2 22:23:02 2019 daemon.debug hostapd: wlan0-1: STA d0:4e:71:44:af:e0 MLME: MLME-ASSOCIATE.indication(d0:4e:71:44:af:e0)
Sat Feb  2 22:23:02 2019 daemon.debug hostapd: wlan0-1: STA d0:4e:71:44:af:e0 MLME: MLME-DELETEKEYS.request(d0:4e:71:44:af:e0)
Sat Feb  2 22:23:02 2019 daemon.debug hostapd: wlan0-1: STA d0:4e:71:44:af:e0 IEEE 802.11: binding station to interface 'wlan0-1'
Sat Feb  2 22:23:02 2019 daemon.debug hostapd: wlan0-1: STA d0:4e:71:44:af:e0 WPA: event 1 notification
Sat Feb  2 22:23:02 2019 daemon.debug hostapd: wlan0-1: STA d0:4e:71:44:af:e0 WPA: start authentication
Sat Feb  2 22:23:02 2019 daemon.debug hostapd: wlan0-1: STA d0:4e:71:44:af:e0 IEEE 802.1X: unauthorizing port
Sat Feb  2 22:23:02 2019 daemon.debug hostapd: wlan0-1: STA d0:4e:71:44:af:e0 WPA: sending 1/4 msg of 4-Way Handshake
Sat Feb  2 22:23:02 2019 daemon.debug hostapd: wlan0-1: STA d0:4e:71:44:af:e0 WPA: received EAPOL-Key frame (2/4 Pairwise)
Sat Feb  2 22:23:02 2019 daemon.debug hostapd: wlan0-1: STA d0:4e:71:44:af:e0 WPA: sending 3/4 msg of 4-Way Handshake
Sat Feb  2 22:23:02 2019 daemon.debug hostapd: wlan0-1: STA d0:4e:71:44:af:e0 WPA: received EAPOL-Key frame (4/4 Pairwise)
Sat Feb  2 22:23:02 2019 daemon.notice hostapd: wlan0-1: AP-STA-CONNECTED d0:4e:71:44:af:e0
Sat Feb  2 22:23:02 2019 daemon.debug hostapd: wlan0-1: STA d0:4e:71:44:af:e0 IEEE 802.1X: authorizing port
Sat Feb  2 22:23:02 2019 daemon.info hostapd: wlan0-1: STA d0:4e:71:44:af:e0 WPA: pairwise key handshake completed (RSN)
Sat Feb  2 22:23:33 2019 daemon.notice hostapd: wlan0-1: AP-STA-DISCONNECTED d0:4e:71:44:af:e0
Sat Feb  2 22:23:33 2019 daemon.debug hostapd: wlan0-1: STA d0:4e:71:44:af:e0 WPA: event 3 notification
Sat Feb  2 22:23:33 2019 daemon.debug hostapd: wlan0-1: STA d0:4e:71:44:af:e0 IEEE 802.1X: unauthorizing port
Sat Feb  2 22:23:33 2019 daemon.debug hostapd: wlan0-1: STA d0:4e:71:44:af:e0 IEEE 802.11: deauthenticated
Sat Feb  2 22:23:33 2019 daemon.debug hostapd: wlan0-1: STA d0:4e:71:44:af:e0 MLME: MLME-DEAUTHENTICATE.indication(d0:4e:71:44:af:e0, 3)
Sat Feb  2 22:23:33 2019 daemon.debug hostapd: wlan0-1: STA d0:4e:71:44:af:e0 MLME: MLME-DELETEKEYS.request(d0:4e:71:44:af:e0)
Sat Feb  2 22:23:43 2019 daemon.debug hostapd: wlan0-1: STA d0:4e:71:44:af:e0 IEEE 802.11: authentication OK (open system)
Sat Feb  2 22:23:43 2019 daemon.debug hostapd: wlan0-1: STA d0:4e:71:44:af:e0 MLME: MLME-AUTHENTICATE.indication(d0:4e:71:44:af:e0, OPEN_SYSTEM)
Sat Feb  2 22:23:43 2019 daemon.debug hostapd: wlan0-1: STA d0:4e:71:44:af:e0 MLME: MLME-DELETEKEYS.request(d0:4e:71:44:af:e0)
Sat Feb  2 22:23:43 2019 daemon.info hostapd: wlan0-1: STA d0:4e:71:44:af:e0 IEEE 802.11: authenticated
Sat Feb  2 22:23:43 2019 daemon.debug hostapd: wlan0-1: STA d0:4e:71:44:af:e0 IEEE 802.11: association OK (aid 1)
Sat Feb  2 22:23:43 2019 daemon.info hostapd: wlan0-1: STA d0:4e:71:44:af:e0 IEEE 802.11: associated (aid 1)
Sat Feb  2 22:23:43 2019 daemon.debug hostapd: wlan0-1: STA d0:4e:71:44:af:e0 MLME: MLME-ASSOCIATE.indication(d0:4e:71:44:af:e0)
Sat Feb  2 22:23:43 2019 daemon.debug hostapd: wlan0-1: STA d0:4e:71:44:af:e0 MLME: MLME-DELETEKEYS.request(d0:4e:71:44:af:e0)
Sat Feb  2 22:23:43 2019 daemon.debug hostapd: wlan0-1: STA d0:4e:71:44:af:e0 IEEE 802.11: binding station to interface 'wlan0-1'
Sat Feb  2 22:23:43 2019 daemon.debug hostapd: wlan0-1: STA d0:4e:71:44:af:e0 WPA: event 1 notification
Sat Feb  2 22:23:43 2019 daemon.debug hostapd: wlan0-1: STA d0:4e:71:44:af:e0 WPA: start authentication
Sat Feb  2 22:23:43 2019 daemon.debug hostapd: wlan0-1: STA d0:4e:71:44:af:e0 IEEE 802.1X: unauthorizing port
Sat Feb  2 22:23:43 2019 daemon.debug hostapd: wlan0-1: STA d0:4e:71:44:af:e0 WPA: sending 1/4 msg of 4-Way Handshake
Sat Feb  2 22:23:43 2019 daemon.debug hostapd: wlan0-1: STA d0:4e:71:44:af:e0 WPA: received EAPOL-Key frame (2/4 Pairwise)
Sat Feb  2 22:23:43 2019 daemon.debug hostapd: wlan0-1: STA d0:4e:71:44:af:e0 WPA: sending 3/4 msg of 4-Way Handshake
Sat Feb  2 22:23:43 2019 daemon.debug hostapd: wlan0-1: STA d0:4e:71:44:af:e0 WPA: received EAPOL-Key frame (4/4 Pairwise)
Sat Feb  2 22:23:43 2019 daemon.notice hostapd: wlan0-1: AP-STA-CONNECTED d0:4e:71:44:af:e0
Sat Feb  2 22:23:43 2019 daemon.debug hostapd: wlan0-1: STA d0:4e:71:44:af:e0 IEEE 802.1X: authorizing port
Sat Feb  2 22:23:43 2019 daemon.info hostapd: wlan0-1: STA d0:4e:71:44:af:e0 WPA: pairwise key handshake completed (RSN)

It seems the problem is in DHCP server, it seems to be working when there is a LAN connection already working. This is why you cant get it connected through wifi.

One suggestion here is to use static ip on your phone/pc wifi and then try to connect to wifi when it's not working. I think if it's a problem with DHCP it will work properly and you’ll be able to connect. If it works this way then please post your network and dhcp config here.

You're a genious! It works! I tried to set a static IP address on one laptop and left my phone and another laptop with a dynamic IP address.
I turn on the gl inet (without ethernet) and only the laptop with static IP address connects successfully! The other two are stuck connecting.
This is my /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 'fddc:960a:8c2d::/48'

config interface 'lan'
	option custom_dns '1'
	option peerdns '0'
	option dns '8.8.8.8 8.8.4.4'
	option hostname 'openwrthost'
	option type 'bridge'
	option ifname 'eth1'
	option proto 'static'
	option netmask '255.255.255.0'
	option ip6assign '60'
	option ipaddr '192.168.8.1'

config interface 'wan'
	option custom_dns '1'
	option peerdns '0'
	option dns '8.8.8.8 8.8.4.4'
	option hostname 'openwrthost'
	option ifname 'eth0'
	option proto 'dhcp'

config interface 'wan6'
	option ifname 'eth0'
	option proto 'dhcpv6'

config interface 'wwan'
	option custom_dns '1'
	option peerdns '0'
	option dns '8.8.8.8 8.8.4.4'
	option proto 'dhcp'

/etc/config/dhcp:

config dnsmasq
	list server '8.8.4.4'
	list server '8.8.8.8'
	option noresolv '1'
	option dnssec '1'
	option dnsseccheckunsigned '1'
	option domainneeded '1'
	option boguspriv '1'
	option filterwin2k '0'
	option localise_queries '1'
	option rebind_protection '1'
	option rebind_localhost '1'
	option local '/lan/'
	option domain 'lan'
	option expandhosts '1'
	option nonegcache '0'
	option authoritative '1'
	option readethers '1'
	option leasefile '/tmp/dhcp.leases'
	option resolvfile '/tmp/resolv.conf.auto'
	option nonwildcard '1'
	option localservice '1'
	option proxydnssec '1'

config dhcp 'lan'
	option interface 'lan'
	option start '100'
	option limit '150'
	option leasetime '12h'
	option dhcpv6 'server'
	option ra 'server'
	option ra_management '1'

config dhcp 'wan'
	option interface 'wan'
	option ignore '1'

config odhcpd 'odhcpd'
	option maindhcp '0'
	option leasefile '/tmp/hosts/odhcpd'
	option leasetrigger '/usr/sbin/odhcpd-update'
	option loglevel '4'

If I remember correctly, I don't think you need those two options in your Lan config. Also you are adding DNS servers everywhere you find a DNS option. That may be an over-kill in my opinion. If you are using a DHCP server on your router then just configure your DNS addresses in Network -> DHCP and DNS in LuCI or list server option in dnsmasq and leave all other DNS options to default or empty.

Maybe something like this would help you. Network:

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

config atm-bridge 'atm'
   option vpi '0'
   option vci '103'
   option encaps 'llc'
   option payload 'bridged'
   option nameprefix 'dsl'

config dsl 'dsl'
   option xfer_mode 'atm'
   option line_mode 'adsl'
   option annex 'a2p'
   option ds_snr_offset '-10'

config interface 'ptcl'
   option ifname 'eth0.2'
   option proto 'dhcp'
   option delegate '0'
   option defaultroute '0'

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

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 4 6t'

config switch_vlan
   option device 'switch0'
   option vlan '2'
   option ports '5 6t'

config interface 'vpnclient'
   option ifname 'tun0'
   option proto 'none'

I don't use ipv6 so you may need to adapt it to your needs. But I would suggest to remove the above 2 options from all the interfaces that have them. Your dhcp config seems okay so far but add option force '1' in Lan section in DHCP config. Apply the changes or reboot the router and then see how it goes.

1 Like

It's working! Thank you so so much! I'll dig into why those settings are not to be used now that I have a working connection :blush: thanks!

Those 2 options only get used in a pppoe sort-of connection or maybe WAN in case you use ADSL/VDSL or a Bridged Modem. Lan section does not need them because you can just specify the DNS with option dns 'x.x.x.x'. If you look in LuCI, Network -> Interfaces, you may find it helpful to configure the network from there and then look at the config files in code.

It is always advisable not to use DNS addresses everywhere, if you have a central DHCP server. Because that DHCP server will be handling everything relating to DNSs and IPs. It may be noted that some ISPs do not allow the use of custom DNS addresses with their connections and internet might not work if you change them in the source connection. So it will be a lot of help if you change them in DHCP rather than in the WAN config.

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