Wifi connection is in "pending" state. What does it mean?



  • Hello, guys!
    I have Omega2+, last firmware
    I am setting up Wifi connection using command

    /usr/bin/wifisetup add -ssid xxx -encr psk2 -password yyy
    

    AP name and password are valid.
    Very often after send connection command I have situation:

    1. Omega does not receive IP address, so connection absent.
    # /usr/bin/wifisetup list
    { "results": [ { "enabled": true, "ssid": "xxx", "encryption": "psk2", "password": "yyy" } ], "success": true }
    
    # /bin/ubus call network.interface.wwan status
    {
            "up": false,
            "pending": true,
            "available": true,
            "autostart": true,
            "dynamic": false,
            "proto": "dhcp",
            "device": "apcli0",
            "data": {
    
            }
    }
    
    # cat /etc/config/wireless
    
    config wifi-device 'radio0'
            option type 'ralink'
            option variant 'mt7628'
            option country 'US'
            option hwmode '11g'
            option htmode 'HT40'
            option channel 'auto'
            option disabled '0'
            option device_mode 'apsta'
            option op_mode 'preference'
    
    config wifi-iface 'ap'
            option device 'radio0'
            option mode 'ap'
            option network 'wlan'
            option ifname 'ra0'
            option encryption 'psk2'
            option key '12345678'
            option disabled '0'
            option ssid 'Omega-3079'
    
    config wifi-iface 'sta'
            option device 'radio0'
            option mode 'sta'
            option ifname 'apcli0'
            option encryption 'psk2'
            option network 'wwan'
            option led 'omega2p:blue:wifi'
            option disabled '0'
            option ssid 'xxx'
            option key 'yyy'
    
    config wifi-config
            option key 'xxx'
            option ssid 'yyy'
            option encryption 'psk2'
    

    If I am rebooting Omega in this state, it succesfully connects to xxx, receives IP and all work good.

    Command for disconnect:

    /usr/bin/wifisetup remove -ssid xxx
    

    removes section "config wifi-config", "config wifi-iface 'sta'" stays. Is this correct?

    Main questions:
    Why connection in pending state? What does it mean? How to avoid this? Or force connection?

    In documentation https://docs.onion.io/omega2-docs/adjusting-ap-network-through-command-line.html I found command for restart WiFi driver "/etc/init.d/wireless restart". But it is invalid:

    /# /etc/init.d/wireless restart
    /bin/ash: /etc/init.d/wireless: not found
    

    What is valid command?

    Thanks



  • @Pavel-Negrobov Try running ubus call network.wireless up



  • @crispyoz I will try this command when "pending" happens again.
    Thank you


Log in to reply
 

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