How to log a wifi connection

I'm tearing out my hair trying to establish a wifi connection between an OpenWrt laptop and broadband router. The LED light on my laptop is on, but I'm unable to establish an IP connection.

Is there any logging I can set on to see how far I may have got?

I do have a /var/run/wpa_supplicant_wlan0.conf which has been created automagically. Can I use the details there to force a connection?

According to

(not OpenWRT) it is possible to connect using wpa_supplicant, but I don't have such a program.

Which program do I need to install? There are 10 packages.
I tried to install wpa_supplicant but am told it cannot be installed.
I did install wpa-cli, but can't find such a program.

Anyone familiar with wpa_supplicant and whether it can be used the way I want?

You might try the travelmate package. (And luci-app-travelmate)
It is intended for connecting an OpenWrt router to upstream WiFi, like a hotel portal.

It should be unnecessary for a simple station connection to upstream WiFi, but you might still try it.

You should do. wpad is hostapd+wpasupplicant that is normally installed by default to OpenWrt.

But the connection to upstream WiFi should be made automatically if you have configured the UCI config right.

What is your WiFi config? Have you changed the laptop radio to station mode?

The wifi-iface contains

network wan
mode sta
ssid ****
encryption psk2
key ****

I didn't make any changes to wifi-device apart from enabling 'radio0'

/var/run/wpa-supplicant-wlan0.conf

seems to be based on wifi-iface, but has proto=RSN. Don't know where that comes from.

Any advice would be much appreciated.

Trying to find what proto=RSN led me to

but am none the wiser ...

Looking at:-

https://openwrt.org/docs/guide-user/network/wifi/ap_sta

there is some mention of modifying the firewall, which I don't fully understand and can't figure what this line means:-

uci add_list firewall.@zone[1].network="wwan"

What would be the result of this line in /etc/config/firewall?

Could it be blocking wifi access to my broadband router? Would such blockages be logged anywhere?

Result: Adding interface WWAN to WAN Zone.

Do you have another concern?

I couldn't find what '@' or '[1]' meant.

Is any logging available for the firewall?

You can always run uci show on any part of the dot delineated stanza. So to see what firewall zone[1] is, simply run:

uci show firewall.@zone[1]

Or just edit the firewall config file at /etc/config/firewall - that's personally easier for me.

2 Likes