At 70+ years of age, I'm not frustrated by much but I'm trying my best to ask, explain and take in what is being shared with me but it never seems to come across in text.
This is the unaltered file;
config wifi-device 'radio0'
option type 'mac80211'
option path 'platform/10300000.wmac'
option channel '1'
option band '2g'
option htmode 'HT20'
option cell_density '0'
config wifi-iface 'default_radio0'
option device 'radio0'
option network 'lan'
option mode 'ap'
option ssid 'OpenWrt'
option encryption 'none'
config wifi-iface 'wifinet1'
option device 'radio0'
option mode 'sta'
option ssid 'OpenWrt'
option encryption 'psk2'
option key 'abc'
option disabled '1'
This is my file;
config wifi-device 'radio0'
option type 'mac80211'
option path 'platform/10300000.wmac'
option channel '1'
option band '2g'
option htmode 'HT20'
option cell_density '0'
config wifi-iface 'default_radio0'
option device 'radio0'
option network 'lan'
option mode 'ap'
option ssid '012'
option encryption 'psk2'
option key '014'
option disabled '0'
config wifi-iface 'wifinet1'
option device 'radio0'
option mode 'sta'
option ssid '123'
option encryption 'psk2'
option key '456'
option network 'wan'
option disabled '0'
I was using 'wan' because I don't connect anything to that.
However, I noticed this was omitted over time from my network file;
config interface 'wwan' option proto 'dhcp' option device 'radio0.network1'
But, this seems to be wrong for this network. I suppose it should be 'radio0' only now.
Then, this is how my files look now;
config interface 'loopback'
option device 'lo'
option proto 'static'
option ipaddr '127.0.0.1'
option netmask '255.0.0.0'
config globals 'globals'
option ula_prefix 'fd17:78ff:5e34::/48'
config device
option name 'br-lan'
option type 'bridge'
list ports 'eth0.1'
config interface 'lan'
option device 'br-lan'
option proto 'dhcp'
config interface 'wan'
option device 'eth0.2'
option proto 'dhcp'
config interface 'wan6'
option device 'eth0.2'
option proto 'dhcpv6'
config switch <-- I don't think I need this
option name 'switch0'
option reset '1'
option enable_vlan '1'
config switch_vlan <-- I don't think I need this
option device 'switch0'
option vlan '1'
option ports '1 6t'
config switch_vlan <-- I don't think I need this
option device 'switch0'
option vlan '2'
option ports '0 6t'
config interface 'wwan'
option proto 'dhcp'
option device 'radio0'
option metric '10'
Wireless;
config wifi-device 'radio0'
option type 'mac80211'
option path 'platform/10300000.wmac'
option channel '1'
option band '2g'
option htmode 'HT20'
option country 'US'
option cell_density '0'
config wifi-iface 'default_radio0'
option device 'radio0'
option network 'lan'
option mode 'ap'
option ssid '012'
option encryption 'psk2'
option key '014'
option disabled '0'
config wifi-iface 'wifinet1'
option device 'radio0'
option mode 'sta'
option ssid '123'
option encryption 'psk2'
option key '456'
option network 'wwan'
option disabled '0'
After editing the network file, I restart the network. I then run 'uci commit wireless && wifi' to reload the wireless as well if that's not done with the network restart.
On wireless reload, I see some errors;
Thu Jun 22 18:51:04 2023 daemon.notice netifd: radio0 (18164): sh: out of range
Thu Jun 22 18:51:06 2023 daemon.notice wpa_supplicant[1069]: wlan0: Unknown event 37
Thu Jun 22 18:51:06 2023 daemon.notice wpa_supplicant[1069]: wlan0: Unknown event 37
Using ifconfig shows wlan0 and wlan0-1 up. I leave both enabled but only use one at a time using a simple bash script to configure the interfaces this way;
If I want to use the client, I run;
'ifconfig wlan0-1 down' (If it's up)
'ifconfig wlan0 up'
Then;
'udhcpc -i wlan0' to get a dhcp IP.
Then to set the wifi gw;
'ip route replace default via wlan0'
If I want to use the AP, I run;
'ifconfig wlan0 down'
'ifconfig wlan0-1 up'
Then;
'udhcpc -i br-lan'
to set the br-lan as the gateway.
I"m not one hundred percent sure of the order of these commands but it's close.
The problems I'm seeing are something along these lines.
When wanting to use the client after the AP was up, I'll run similar commands to the above and what happens is that the br-lan gateway might not be set or there are errors like;
udhcpc: broadcasting discover
The only way to get past those is to manually set what ever gateway I want like;
'udhcpc -i br-lan' or 'udhcpc -i wlan0'.
It all works, it's just messy and I thought my network and wireless files were a huge mess but they were in fact a small mess.
Maybe I just need to look at that package being mentioned so long as it can be used from the command line.