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
In this tutorial, we are going to learn how to connect to Wi-fi network from the command line on Ubuntu 16.04 server and desktop using wpa_supplicant.
Est. reading time: 9 minutes
(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?
hnyman
July 30, 2023, 7:41am
2
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?
hnyman:
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.
opkg list-installed shows hostapd-common but no wpasupplicant.
Apart from the initial imstallation I have only installed
kmod-iwlwifi
kmod-iwl4965
iwl4965-firmware
iw
iwinfo
wpa-cli
Not sure how to use wpa-cli... although I've just noticed that is installed as wpa_cli, so will investigate
I thought I had done, but obviously there is something missing.
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.
You can add option log '1' in the /etc/config/firewall definition of a rule, redirect or nat.
You can already add the log option to a rule, redirect, or nat section.
option log 'my log prefix:'
2 Likes