We have upgraded the community system as part of the upgrade a password reset is required for all users before login in.

Omega 2S+: No WiFi Support with OpenWRT 21.02


  • administrators

    @IBH Maybe try using the 21.02 firmware released by OpenWRT: onion_omega2p-squashfs-sysupgrade.bin at https://downloads.openwrt.org/releases/21.02.5/targets/ramips/mt76x8/

    If the wifi works using that firmware, then it points to an issue with the customized firmware you've built.



  • @IBH I put my firmware binary on my github, you just need to add the wifi configuration I posted earlier. If that works for you I can share my build config. If the Onin version works for you as provided by @Lazar-Demin go with that one as mine is based up on the standard OpenWrt build.



  • @crispyoz Thank you , we are using same as you an Openwrt build and we don't use onion-openwrt . Will check with your firmware binary and @Lazar-Demin's firmware too. In fact, it is strange that we have the wlan interface and everything looks good but we couldn't see the SSID and have the connection.



  • @IBH I wonder if you tried treating the AP WiFi SSID as hidden and connect manually. Your WiFi command shows he SSID is not configured as hidden but it's just a thought. Anyway we know my config works on my build so the answer is there somewhere.

    Looking at the bigger picture, you probably should be using OpenWrt 22 anyway.



  • @crispyoz Do you know how we can verify if the AP WiFi SSID was treating as hidden ?
    For OpenWrt 22, which tag you used for the upgrade from 21 to 22? does it openwrt-22.03 ?



  • @IBH Looking at the output of your "wifi status" command I can see the SSID is not configured to be hidden, I was just pondering if the issue was related to something on your build that caused it to be hidden.

    For OpenWrt 22 I used "openwrt-22.03"



  • Hi @crispyoz, wifi works fine with your build image :MicrosoftTeams-image (17).png
    Could you please tell me if you have rebased the branch openwrt-22.03 into your branch ? Could you please share the steps you have done for upgrading your openwrt build ?

    THank you so much for your time and help.



  • @IBH I don't rebase. Just a git clone, then make menuconfig make kernel_menuconfig add my changes to uci defaults and files directories then make.



  • @crispyoz Do you have a GitHub repo where you've pushed your OpenWrt 22.03 clone with your config changes?
    In fact, If I'm not wrong you git clone the base OpenWrt 22.03 (https://git.openwrt.org/openwrt/openwrt.git)then you've added your feeds and configs right?



  • @IBH My repo is currently private as I am working on something however here as the simple instructions to set up your build system:

    Setup OpenWrt 22.03

    cd
    git clone https://git.openwrt.org/openwrt/openwrt.git openwrt22
    cd openwrt22
    scripts/feeds update -a
    scripts/feeds install -a
    git checkout openwrt-22.03
    make menuconfig
    Target System (MediaTek Ralink MIPS)
    Subtarget (MT76x8 based boards)
    Target Profile (Onion Omega2+)

    Then remove the /etc/config/network and /etc/config/wireless with the settings I gave you earlier in this thread.


  • administrators

    @crispyoz one suggestion:
    do git checkout openwrt-22.03 before scripts/feeds update -a and scripts/feeds install -a

    If you update and install the feeds before changing the branch, you might be using packages meant for the default branch of the openwrt/openwrt repo.
    The feeds.conf.default file points to different branches of the package repositories depending on the branch of openwrt/openwrt.

    See feeds.conf.default in the master branch vs feeds.conf.default in the openwrt-22.03 branch:
    79e2ac85-7e6f-4343-90a6-b8e5ab34313e-image.png



  • @Lazar-Demin @crispyoz thanks both. I got this after doings your steps:
    scripts/config/conf: /lib/x86_64-linux-gnu/libc.so.6: version GLIBC_2.33' not found (required by scripts/config/conf) scripts/config/conf: /lib/x86_64-linux-gnu/libc.so.6: version GLIBC_2.34' not found (required by scripts/config/conf)
    /home/ibh/projects/onion-22-03/sources/openwrt-22/include/toplevel.mk:118: recipe for target 'defconfig' failed
    make: *** [defconfig] Error 1
    FYI: I'm using docker for building.


  • administrators

    @IBH Which docker image are you using?

    If it's the onion/omega2-source docker image mentioned in https://github.com/OnionIoT/source#options-for-using-the-build-system, I would recommend against compiling OpenWRT 21 and 22 with this image since it's based on Ubuntu 18.

    I suggest spinning up a new ubuntu 22.04 container and following OpenWRT's build system setup instructions: https://openwrt.org/docs/guide-developer/toolchain/install-buildsystem



  • @IBH use the command ldd --version to determine which verison of glibc you have installed, you may have to install a newer version. Which OS are you building on? Windows/Linux ? As @Lazar-Demin mentioned you can create your own docker container and follow the OpenWrt instructions, personally I install on my Ubuntu system directly without using docker.



  • @crispyoz @Lazar-Demin Hi both , I'm really disappointed, it doesn't work:
    network file:

    root@OpenWrt:/# cat /etc/init.d/network
    #!/bin/sh /etc/rc.common
    
    START=20
    STOP=90
    
    USE_PROCD=1
    
    init_switch() {
            setup_switch() { return 0; }
    
            include /lib/network
            setup_switch
    }
    
    start_service() {
            init_switch
    
            procd_open_instance
            procd_set_param command /sbin/netifd
            procd_set_param respawn
            procd_set_param watch network.interface
            [ -e /proc/sys/kernel/core_pattern ] && {
                    procd_set_param limits core="unlimited"
            }
            procd_close_instance
    }
    
    reload_service() {
            local rv=0
    
            init_switch
            ubus call network reload || rv=1
            /sbin/wifi reload_legacy
            return $rv
    }
    
    stop_service() {
            /sbin/wifi down
            ifdown -a
            sleep 1
    }
    
    validate_atm_bridge_section()
    {
            uci_validate_section network "atm-bridge" "${1}" \
                    'unit:uinteger:0' \
                    'vci:range(32, 65535):35' \
                    'vpi:range(0, 255):8' \
                    'atmdev:uinteger:0' \
                    'encaps:or("llc", "vc"):llc' \
                    'payload:or("bridged", "routed"):bridged'
    }
    
    validate_route_section()
    {
            uci_validate_section network route "${1}" \
                    'interface:string' \
                    'target:cidr4' \
                    'netmask:netmask4' \
                    'gateway:ip4addr' \
                    'metric:uinteger' \
                    'mtu:uinteger' \
                    'table:or(range(0,65535),string)'
    }
    
    validate_route6_section()
    {
            uci_validate_section network route6 "${1}" \
                    'interface:string' \
                    'target:cidr6' \
                    'gateway:ip6addr' \
                    'metric:uinteger' \
                    'mtu:uinteger' \
                    'table:or(range(0,65535),string)'
    }
    
    validate_rule_section()
    {
            uci_validate_section network rule "${1}" \
                    'in:string' \
                    'out:string' \
                    'src:cidr4' \
                    'dest:cidr4' \
                    'tos:range(0,31)' \
                    'mark:string' \
                    'invert:bool' \
                    'lookup:or(range(0,65535),string)' \
                    'goto:range(0,65535)' \
                    'action:or("prohibit", "unreachable", "blackhole", "throw")'
    }
    
    validate_rule6_section()
    {
            uci_validate_section network rule6 "${1}" \
                    'in:string' \
                    'out:string' \
                    'src:cidr6' \
                    'dest:cidr6' \
                    'tos:range(0,31)' \
                    'mark:string' \
                    'invert:bool' \
                    'lookup:or(range(0,65535),string)' \
                    'goto:range(0,65535)' \
                    'action:or("prohibit", "unreachable", "blackhole", "throw")'
    }
    
    validate_switch_section()
    {
            uci_validate_section network switch "${1}" \
                    'name:string' \
                    'enable:bool' \
                    'enable_vlan:bool' \
                    'reset:bool' \
                    'ar8xxx_mib_poll_interval:uinteger' \
                    'ar8xxx_mib_type:range(0,1)'
    }
    
    validate_switch_vlan()
    {
            uci_validate_section network switch_vlan "${1}" \
                    'device:string' \
                    'vlan:uinteger' \
                    'ports:list(ports)'
    }
    
    service_triggers()
    {
            procd_add_reload_trigger network wireless
    
            procd_open_validate
            validate_atm_bridge_section
            validate_route_section
            [ -e /proc/sys/net/ipv6 ] && validate_route6_section
            validate_rule_section
            [ -e /proc/sys/net/ipv6 ] && validate_rule6_section
            validate_switch_section
            validate_switch_vlan
            procd_close_validate
    }
    
    shutdown() {
            ifdown -a
            sleep 1
    }
    

    Could you please share the config file you've used for your openwrt 22.03 ?
    Could you please this network file maybe I've missed something here?


  • administrators

    @IBH Here are the config files from the Onion-customized 22.03.3 firmware.

    Note that this is the default configuration setup for client mode on ethernet and hosting a WiFi AP.
    To connect to a wifi network, you can follow the WiFi STA section in our technical doc for this firmware.

    Also, keep in mind /etc/init.d/network defines the network service, not the network configuration.


    /etc/config/network:

    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 'fd16:9810:ecb2::/48'
    
    config device
            option name 'br-lan'
            option type 'bridge'
    
    config interface 'lan'
            option device 'br-lan'
            option proto 'static'
            option netmask '255.255.255.0'
            option ip6assign '60'
            option ipaddr '192.168.4.1'
    
    config switch
            option name 'switch0'
            option reset '1'
            option enable_vlan '0'
    
    config interface 'wan'
            option proto 'dhcp'
            option device 'eth0'
            option hostname 'Omega-f19f'
    
    config interface 'wlan'
            option device 'ra0'
            option proto 'static'
            option ipaddr '192.168.3.1'
            option netmask '255.255.255.0'
            option ip6assign '60'
    
    config interface 'wwan'
            option proto 'dhcp'
            option device 'apcli0'
            option hostname 'Omega-f19f'
    
    

    /etc/config/wireless:

    config wifi-device 'radio0'
            option type 'mac80211'
            option path 'platform/10300000.wmac'
            option band '2g'
            option disabled '0'
            option channel 'auto'
            option htmode 'HT40'
    
    config wifi-iface 'default_radio0'
            option device 'radio0'
            option mode 'ap'
            option ifname 'ra0'
            option network 'wlan'
            option ssid 'Omega-f19f'
            option encryption 'psk2'
            option key '12345678'
    
    config wifi-iface 'client'
            option device 'radio0'
            option network 'wwan'
            option mode 'sta'
            option ssid 'MySSID'
            option key 'MyKey'
            option encryption 'psk2'
            option ifname 'apcli0'
            option disabled '1'
    

    /etc/config/firewall:

    config defaults
            option syn_flood '1'
            option input 'ACCEPT'
            option output 'ACCEPT'
            option forward 'REJECT'
    
    config zone
            option name 'lan'
            list network 'lan'
            list network 'wlan'
            option input 'ACCEPT'
            option output 'ACCEPT'
            option forward 'ACCEPT'
    
    config zone
            option name 'wan'
            list network 'wan'
            list network 'wwan'
            option output 'ACCEPT'
            option masq '1'
            option mtu_fix '1'
            option input 'ACCEPT'
            option forward 'ACCEPT'
    
    config forwarding
            option src 'lan'
            option dest 'wan'
    
    config rule
            option name 'Allow-DHCP-Renew'
            option src 'wan'
            option proto 'udp'
            option dest_port '68'
            option target 'ACCEPT'
            option family 'ipv4'
    
    config rule
            option name 'Allow-Ping'
            option src 'wan'
            option proto 'icmp'
            option icmp_type 'echo-request'
            option family 'ipv4'
            option target 'ACCEPT'
    
    config rule
            option name 'Allow-IGMP'
            option src 'wan'
            option proto 'igmp'
            option family 'ipv4'
            option target 'ACCEPT'
    
    config rule
            option name 'Allow-DHCPv6'
            option src 'wan'
            option proto 'udp'
            option dest_port '546'
            option family 'ipv6'
            option target 'ACCEPT'
    
    config rule
            option name 'Allow-MLD'
            option src 'wan'
            option proto 'icmp'
            option src_ip 'fe80::/10'
            list icmp_type '130/0'
            list icmp_type '131/0'
            list icmp_type '132/0'
            list icmp_type '143/0'
            option family 'ipv6'
            option target 'ACCEPT'
    
    config rule
            option name 'Allow-ICMPv6-Input'
            option src 'wan'
            option proto 'icmp'
            list icmp_type 'echo-request'
            list icmp_type 'echo-reply'
            list icmp_type 'destination-unreachable'
            list icmp_type 'packet-too-big'
            list icmp_type 'time-exceeded'
            list icmp_type 'bad-header'
            list icmp_type 'unknown-header-type'
            list icmp_type 'router-solicitation'
            list icmp_type 'neighbour-solicitation'
            list icmp_type 'router-advertisement'
            list icmp_type 'neighbour-advertisement'
            option limit '1000/sec'
            option family 'ipv6'
            option target 'ACCEPT'
    
    config rule
            option name 'Allow-ICMPv6-Forward'
            option src 'wan'
            option dest '*'
            option proto 'icmp'
            list icmp_type 'echo-request'
            list icmp_type 'echo-reply'
            list icmp_type 'destination-unreachable'
            list icmp_type 'packet-too-big'
            list icmp_type 'time-exceeded'
            list icmp_type 'bad-header'
            list icmp_type 'unknown-header-type'
            option limit '1000/sec'
            option family 'ipv6'
            option target 'ACCEPT'
    
    config rule
            option name 'Allow-IPSec-ESP'
            option src 'wan'
            option dest 'lan'
            option proto 'esp'
            option target 'ACCEPT'
    
    config rule
            option name 'Allow-ISAKMP'
            option src 'wan'
            option dest 'lan'
            option dest_port '500'
            option proto 'udp'
            option target 'ACCEPT'
    


  • @Lazar-Demin I'm not using onion openwrt , I prefer keep using openwrt base and I need to have the .config file I don't know why @crispyoz 's build image worked fine and not mine .


  • administrators

    @IBH These config files should still be helpful. Onion's (beta) Openwrt 22.03 firmware is based on the openwrt base, including the mt76 wifi driver.
    The only customizations so far are different default configurations for better usability out of the box.

    Assuming your firmware has been built properly, the config files from my previous post should setup:

    1. the ethernet port to act as a DHCP client
    2. the WiFi AP to broadcast

    And will allow you to use a few uci commands to connect to an existing Wifi network.



  • @Lazar-Demin Hi, my need is to connect my phone/my laptop etc to my onion wifi and not to connect my onion to wifi .



  • @IBH please add the to the top of your PROCD_DEBUG=1 /etc/init.d/network (after the shebang) and then run service network restart, then run logread and check for errors



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