Original Image openwrt-22.03.3-ramips



  • @crispyoz said in Original Image openwrt-22.03.3-ramips:

    <snip - working wifi config>

    Hopefully related to this thread, I've been looking at applying the latest of what I can glean from Onion's 22.03 branch and applying it to a fresh 22.03 build, but I'm seeing that the WiFi hangs having typed the wifi command. It could be my specific build of the image, but I've taken the OpenWrt 22.03 branch and note that the WiFi works out of the box with the resultant image.

    Here's the Onion config; is there more to this than below (it doesn't appear to be fundamentally that different to the example provided)?

    	set network.lan.ipaddr='192.168.4.1'
    
    	del_list network.@device[0].ports='eth0'
    	set network.wan='interface'
    	set network.wan.proto='dhcp'
    	set network.wan.device='eth0'
    	set network.wan.hostname="${HOSTNAME}"
    
    	set network.wlan='interface'
    	set network.wlan.device='ra0'
    	set network.wlan.proto='static'
    	set network.wlan.ipaddr='192.168.3.1'
    	set network.wlan.netmask='255.255.255.0'
    	set network.wlan.ip6assign='60'
    
    	set network.wwan='interface'
    	set network.wwan.proto='dhcp'
    	set network.wwan.device='apcli0'
    	set network.wwan.hostname="${HOSTNAME}"
    
    	commit network
    
    	set wireless.@wifi-device[0].disabled='0'
    	set wireless.@wifi-device[0].channel='auto'
    	set wireless.@wifi-device[0].htmode='HT40'
    	set wireless.@wifi-iface[0].ifname='ra0'
    	set wireless.@wifi-iface[0].network='wlan'
    	set wireless.@wifi-iface[0].ssid="${HOSTNAME}"
    	set wireless.@wifi-iface[0].encryption='psk2'
    	set wireless.@wifi-iface[0].key='12345678'
    
    	set wireless.client=wifi-iface
    	set wireless.client.device='radio0'
    	set wireless.client.network='wwan'
    	set wireless.client.mode='sta'
    	set wireless.client.ssid=MySSID
     	set wireless.client.key=MyKey
    	set wireless.client.encryption=psk2
    	set wireless.client.ifname=apcli0
    	set wireless.client.disabled=1
    
    	commit wireless
    
    	add_list firewall.@zone[0].network='wlan'
    
    	del_list firewall.@zone[1].network='wan6'
    	add_list firewall.@zone[1].network='wwan'
    	set firewall.@zone[1].mtu_fix='1'
    	set firewall.@zone[1].input='ACCEPT'
    	set firewall.@zone[1].forward='ACCEPT'
    
    	commit firewall
    
    	set dhcp.wlan='dhcp'
    	set dhcp.wlan.interface='wlan'
    	set dhcp.wlan.start='100'
    	set dhcp.wlan.limit='150'
    	set dhcp.wlan.leasetime='12h'
    	set dhcp.wlan.dhcpv4='server'
    	set dhcp.wlan.dhcpv6='server'
    	set dhcp.wlan.ra='server'
    	set dhcp.wlan.ra_slaac='1'
    	add_list dhcp.wlan.ra_flags='managed-config'
    	add_list dhcp.wlan.ra_flags='other-config'
    	commit dhcp
    


  • @huntc if you use "wifi status" does it hang?
    What are the results of running the command "uci -s show network; uci -s show wireless"



  • @crispyoz Thanks for replying. If I use wifi to apply the settings then it hangs.

    Having then rebooted and disabled wifi before it tries to bring the interface up lets me get back in i.e.:

    uci set wireless.@wifi-device[0].disabled="1"
    uci commit wireless
    wifi
    

    So now with the network disabled, here are your commands and their output:

    root@OpenWrt:/# wifi status
    {
            "radio0": {
                    "up": false,
                    "pending": false,
                    "autostart": true,
                    "disabled": true,
                    "retry_setup_failed": false,
                    "config": {
                            "path": "platform/10300000.wmac",
                            "channel": "auto",
                            "band": "2g",
                            "htmode": "HT40",
                            "disabled": true
                    },
                    "interfaces": [
                            {
                                    "section": "default_radio0",
                                    "config": {
                                            "mode": "ap",
                                            "ssid": "Cuprous-dc82",
                                            "encryption": "psk2",
                                            "ifname": "ra0",
                                            "key": "12345678",
                                            "network": [
                                                    "wlan"
                                            ],
                                            "mode": "ap"
                                    },
                                    "vlans": [
    
                                    ],
                                    "stations": [
    
                                    ]
                            }
                    ]
            }
    }
    root@OpenWrt:/# uci show network
    network.loopback=interface
    network.loopback.device='lo'
    network.loopback.proto='static'
    network.loopback.ipaddr='127.0.0.1'
    network.loopback.netmask='255.0.0.0'
    network.globals=globals
    network.globals.ula_prefix='fda1:7d87:bc2f::/48'
    network.@device[0]=device
    network.@device[0].name='br-lan'
    network.@device[0].type='bridge'
    network.lan=interface
    network.lan.device='br-lan'
    network.lan.proto='static'
    network.lan.ipaddr='192.168.4.1'
    network.lan.netmask='255.255.255.0'
    network.lan.ip6assign='60'
    network.@switch[0]=switch
    network.@switch[0].name='switch0'
    network.@switch[0].reset='1'
    network.@switch[0].enable_vlan='0'
    network.wan=interface
    network.wan.proto='dhcp'
    network.wan.device='eth0'
    network.wan.hostname='Cuprous-dc82'
    network.wlan=interface
    network.wlan.device='ra0'
    network.wlan.proto='static'
    network.wlan.ipaddr='192.168.3.1'
    network.wlan.netmask='255.255.255.0'
    network.wlan.ip6assign='60'
    network.wwan=interface
    network.wwan.proto='dhcp'
    network.wwan.device='apcli0'
    network.wwan.hostname='Cuprous-dc82'
    root@OpenWrt:/# uci -s show wireless
    wireless.radio0=wifi-device
    wireless.radio0.type='mac80211'
    wireless.radio0.path='platform/10300000.wmac'
    wireless.radio0.channel='auto'
    wireless.radio0.band='2g'
    wireless.radio0.htmode='HT40'
    wireless.radio0.disabled='1'
    wireless.default_radio0=wifi-iface
    wireless.default_radio0.device='radio0'
    wireless.default_radio0.network='wlan'
    wireless.default_radio0.mode='ap'
    wireless.default_radio0.ssid='Cuprous-dc82'
    wireless.default_radio0.encryption='psk2'
    wireless.default_radio0.ifname='ra0'
    wireless.default_radio0.key='12345678'
    wireless.client=wifi-iface
    wireless.client.device='radio0'
    wireless.client.network='wwan'
    wireless.client.mode='sta'
    wireless.client.ssid='MySSID'
    wireless.client.key='MyKey'
    wireless.client.encryption='psk2'
    wireless.client.ifname='apcli0'
    wireless.client.disabled='1'
    


  • Another input: If I use the image provided by the image builder for 22.03 then I get the same result i.e. the wifi command causes the system to hang. I thought this'd be an interesting angle just in case I'd something awry when building the image from scratch. I also did a sysupgrade -n to blast away any spurious config.

    I'll try the beta image of 22.03 from Onion now and report back...



  • @huntc Mine hangs for a few seconds then returns. Using the Onion Beta



  • @crispyoz Using the Onion beta now too... Hangs entirely... i.e. same outcome. Hmm.



  • @huntc the wifi command is just a scrip that calls other functions, these are in /lib/wifi/mac80211.sh take a look at thet and see which function is causing the hang, then we can troubleshoot that.



  • @crispyoz I've installed the Omega 22.03 distro again and the WiFi appears to be ok. Perhaps there's something in the kernel or other config that is missing/different from the 22.03 branch...? I'll re-install my distro and try and debug the wifi script as you suggest.



  • OK, I've managed to restore my custom image. TBH I was still having difficulty with the Onion distro also...

    So, back to my custom image, which is pretty close to the 22.03 distro. If I set -x within the /sbin/wifi script then after enabling WiFi and a bit of execution, we get:

    + '[' '!' -f /lib/netifd/wireless/mac80211.sh ]
    root@OpenWrt:/# [  260.011156] br-lan: port 2(phy0-ap0) entered blocking state
    [  260.016854] br-lan: port 2(phy0-ap0) entered disabled state
    [  260.022992] device phy0-ap0 entered promiscuous mode
    [  260.050570] IPv6: ADDRCONF(NETDEV_CHANGE): phy0-ap0: link becomes ready
    [  260.057548] br-lan: port 2(phy0-ap0) entered blocking state
    [  260.063294] br-lan: port 2(phy0-ap0) entered forwarding state
    

    ...and then it hangs.



  • I should also mention that the above occurs without applying the Onion config. I'm doing a basic wifi enabling on the 22.03 distro.

    I'm also assuming that it shouldn't matter whether there's an actual antenna connected... I don't have a spare at the mo. I can't see why that should affect things though.



  • I began suspecting that I may have a h/w failure somehow. So, I then tried another Omega2S+ and all appears well. I can apply the Onion config to my custom 22.03 image as per my first post here. Thanks for the engagement. I hope that my config here may help others too.



  • @huntc check your power supply is sufficient, starting wifi causes a significant power draw. I just saw your response re hardware, still might be worth checking power is not the issue, just for future reference,



  • @crispyoz Interesting. Thanks. Will do.


Log in to reply
 

Looks like your connection to Community was lost, please wait while we try to reconnect.