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

Some WiFi and ethernet connection questions (or bugs?)



  • Hi, guys!
    I faced a some problems with WiFi/ethernet connections on Omega2+, last firmware 0.3.3 b247.

    1. Bug (?) in wifisetup script:
    # /usr/bin/wifisetup add -ssid ZyXEL_GIGA_III -encr psk2 -passw
    ord xxx
    sh: ERROR:: unknown operand
    sh: ERROR:: unknown operand
    # echo $?
    0
    

    What does it mean??? Looks like a bug.
    2. WiFi driver/subsystem stops work after attempt to connect with invalid password:

    # /usr/bin/wifisetup add -ssid ZyXEL_GIGA_III -encr psk2 -password invalid_pass
    > Restarting wifimanager for changes to take effect
    ............
    [ 1987.620052] Interface apcli0 link up! (WPA2PSK AES)
    [ 1998.658235] Interface apcli0 link up! (WPA2PSK AES)
    [ 2010.239352] Interface apcli0 link up! (WPA2PSK AES)
    [ 2014.338038] Interface apcli0 link up! (WPA2PSK AES)
    [ 2025.378702] Interface apcli0 link up! (WPA2PSK AES)
    
    # /usr/bin/wifisetup remove -ssid ZyXEL_GIGA_III/usr/bin/wifisetup remove -ssid ZyXEL_GIGA_III
    > Removing 'ZyXEL_GIGA_III' network from database
    > Restarting wifimanager for changes to take effect
    ............
    [ 2046.224967] IPv6: ADDRCONF(NETDEV_CHANGE): br-wlan: link becomes ready
    
    # /usr/bin/wifisetup add -ssid ZyXEL_GIGA_III -encr psk2 -passw
    ord redhat5469
    > Restarting wifimanager for changes to take effect
    ............
    [ 2208.623498] IPv6: ADDRCONF(NETDEV_CHANGE): br-wlan: link becomes ready
    
    # /bin/ubus call network.interface.wwan status
    {
            "up": false,
            "pending": true,
            "available": true,
            "autostart": true,
            "dynamic": false,
            "proto": "dhcp",
            "device": "apcli0",
            "data": {
    
            }
    }
    

    After reboot Omega correctly connects to AP. How to force connection and avoid this reboot?
    I also tried

    # /bin/ubus call network.wireless up
    # wifi
    

    This does not helps.
    3. Ethernet cable is disconnected. ubus utility confirms this:

    # /bin/ubus call network.interface.wan status
    {
            "up": false,
            "pending": true,
            "available": true,
            "autostart": true,
            "dynamic": false,
            "proto": "dhcp",
            "device": "eth0",
            "data": {
    
            }
    }
    

    After ethernet cable connect:

    # [  763.914064] rt3050-esw 10110000.esw: link changed 0x01
    
    # /bin/ubus call network.interface.wan status
    {
            "up": true,
            "pending": false,
            "available": true,
            "autostart": true,
            "dynamic": false,
            "uptime": 7,
            "l3_device": "eth0",
            "proto": "dhcp",
            "device": "eth0",
            "updated": [
                    "addresses",
                    "routes",
                    "data"
            ],
            "metric": 0,
            "dns_metric": 0,
            "delegation": true,
            "ipv4-address": [
                    {
                            "address": "192.168.1.40",
                            "mask": 24
    ..........
    

    All good. Now I disconnect cable and call utility to check network state:

    # [  854.682436] rt3050-esw 10110000.esw: link changed 0x00
    
    # [  937.070589] rt3050-esw 10110000.esw: link changed 0x00
    # /bin/ubus call network.interface.wan status
    {
            "up": true,
            "pending": false,
            "available": true,
            "autostart": true,
            "dynamic": false,
            "uptime": 295,
            "l3_device": "eth0",
            "proto": "dhcp",
            "device": "eth0",
            "updated": [
                    "addresses",
                    "routes",
                    "data"
            ],
            "metric": 0,
            "dns_metric": 0,
            "delegation": true,
            "ipv4-address": [
                    {
                            "address": "192.168.1.40",
                            "mask": 24
                    }
            ],
    ...............
    
    # ifconfig eth0
    eth0      Link encap:Ethernet  HWaddr 40:A3:6B:C1:30:7B
              inet addr:192.168.1.40  Bcast:192.168.1.255  Mask:255.255.255.0
              inet6 addr: fe80::42a3:6bff:fec1:307b/64 Scope:Link
              UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
              RX packets:1101 errors:0 dropped:1 overruns:0 frame:0
              TX packets:306 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:1000
              RX bytes:166652 (162.7 KiB)  TX bytes:84785 (82.7 KiB)
              Interrupt:5
    

    Utility says that I have ethernet connection, but this is wrong!!!
    As I can see ethernet kernel driver works correctly, utility fails. After reboot all ok.
    How I can to monitor ethernet connection on-the-fly?

    Thanks.


  • administrators

    @Pavel-Negrobov Pls make a separate thread for each question - will be easier for people to help out that way



  • @Lazar-Demin

    I moved ethernet question to another topic, but I can't to edit my start post above šŸ˜ž



  • @Pavel-Negrobov Issue one will result if your password is too short for the requirement of psk2, you need at least 8 characters.

    If you screw up your network and then fix it but it still won't come up, use the command service network restart this restarts all your network related stuff and would usually sort out these types of things.



  • @crispyoz said in Some WiFi and ethernet connection questions (or bugs?):

    @Pavel-Negrobov Issue one will result if your password is too short for the requirement of psk2, you need at least 8 characters.

    If you screw up your network and then fix it but it still won't come up, use the command service network restart this restarts all your network related stuff and would usually sort out these types of things.

    1st question ok, I understood, thanks.
    2nd - 'service network restart' command does not helps šŸ˜ž
    I checked it many times.



  • @Pavel-Negrobov As @Lazar-Demin mentioned it is best to separate individual issues into separate threads since it makes it easier for us to follow each issue and also future users looking for support can more easily locate the solution.

    I'm not entirely clear about issue 2, so I'll describe my understanding here.

    When you use wifisetup command and pass an incorrect password, then the wifi cannot be resolved unless you reboot and fix the password. Correct?

    Assuming my understanding is correct, I think the solution is to:

    1. delete the wifi setup with the incorrrect password (wifisetup remove -ssid <ssid name>)
    2. add the wifi setup with the correct password

    I have previously had an issue with wifisetup edit command so I prefer the above approach.



  • @crispyoz said in Some WiFi and ethernet connection questions (or bugs?):

    When you use wifisetup command and pass an incorrect password, then the wifi cannot be resolved unless you reboot and fix the password. Correct?

    Assuming my understanding is correct, I think the solution is to:

    1. delete the wifi setup with the incorrrect password (wifisetup remove -ssid <ssid name>)
    2. add the wifi setup with the correct password

    Yes, you understood correctly. My Omega does not connect after error in password. Full log:

    root@Omega-3079:/# /usr/bin/wifisetup remove -ssid ZyXEL_GIGA_III
    > ERROR: specified ssid not in the database
    root@Omega-3079:/# /usr/bin/wifisetup add -ssid ZyXEL_GIGA_III -encr psk2 -passw
    ord invalid_pass
    > Restarting wifimanager for changes to take effect
    root@Omega-3079:/# [ 1247.493061] br-wlan: port 1(ra0) entered disabled state
    [ 1248.191816] device ra0 left promiscuous mode
    [ 1248.196286] br-wlan: port 1(ra0) entered disabled state
    [ 1248.340734] IPv6: ADDRCONF(NETDEV_UP): br-wlan: link is not ready
    [ 1248.841519]
    [ 1248.841519] _      _____   ___  ___    _________  ___  ____
    [ 1248.841519] | | /| / / _ | / _ \/ _ \  / ___/ __ \/ _ \/ __/ V1.1
    [ 1248.841519] | |/ |/ / __ |/ , _/ ___/ / /__/ /_/ / , _/ _/
    [ 1248.841519] |__/|__/_/ |_/_/|_/_/     \___/\____/_/|_/___/
    [ 1248.841519]             Onion Enhanced MT7688 WiFi Driver
    [ 1248.841519]
    [ 1249.068727] DMA Scheduler Mode=0(LMAC)
    [ 1249.072559] efuse_probe: efuse = 10000012
    [ 1249.076678] 1. Phy Mode = 14
    [ 1249.257467] 2. Phy Mode = 14
    [ 1249.260481] 3. Phy Mode = 14
    [ 1249.263731]  WTBL Segment 1 info:
    [ 1249.267095]          MemBaseAddr/FID:0x28000/0
    [ 1249.271034]          EntrySize/Cnt:32/128
    [ 1249.274481]  WTBL Segment 2 info:
    [ 1249.277838]          MemBaseAddr/FID:0x40000/0
    [ 1249.281739]          EntrySize/Cnt:64/128
    [ 1249.285184]  WTBL Segment 3 info:
    [ 1249.288542]          MemBaseAddr/FID:0x42000/64
    [ 1249.292529]          EntrySize/Cnt:64/128
    [ 1249.295973]  WTBL Segment 4 info:
    [ 1249.299372]          MemBaseAddr/FID:0x44000/128
    [ 1249.303433]          EntrySize/Cnt:32/128
    [ 1260.177537] IPv6: ADDRCONF(NETDEV_UP): ra0: link is not ready
    [ 1260.183483] IPv6: ADDRCONF(NETDEV_CHANGE): ra0: link becomes ready
    [ 1263.815527] br-wlan: port 1(ra0) entered blocking state
    [ 1263.821011] br-wlan: port 1(ra0) entered disabled state
    [ 1263.826667] device ra0 entered promiscuous mode
    [ 1263.831505] br-wlan: port 1(ra0) entered blocking state
    [ 1263.836807] br-wlan: port 1(ra0) entered forwarding state
    [ 1263.843278] IPv6: ADDRCONF(NETDEV_CHANGE): br-wlan: link becomes ready
    [ 1265.964111] Interface apcli0 link up! (WPA2PSK AES)
    [ 1277.004408] Interface apcli0 link up! (WPA2PSK AES)
    [ 1288.586478] Interface apcli0 link up! (WPA2PSK AES)
    [ 1292.844728] Interface apcli0 link up! (WPA2PSK AES)
    [ 1303.884935] Interface apcli0 link up! (WPA2PSK AES)
    [ 1315.170444] Interface apcli0 link up! (WPA2PSK AES)
    
    root@Omega-3079:/# [ 1319.565373] Interface apcli0 link up! (WPA2PSK AES)
    
    root@Omega-3079:/# /usr/bin/wifisetup remove -ssid ZyXEL_GIGA_III
    > Removing 'ZyXEL_GIGA_III' network from database
    > Restarting wifimanager for changes to take effect
    root@Omega-3079:/# [ 1326.895390] br-wlan: port 1(ra0) entered disabled state
    [ 1327.593785] device ra0 left promiscuous mode
    [ 1327.598253] br-wlan: port 1(ra0) entered disabled state
    [ 1327.653822] IPv6: ADDRCONF(NETDEV_UP): br-wlan: link is not ready
    [ 1328.084832]
    [ 1328.084832] _      _____   ___  ___    _________  ___  ____
    [ 1328.084832] | | /| / / _ | / _ \/ _ \  / ___/ __ \/ _ \/ __/ V1.1
    [ 1328.084832] | |/ |/ / __ |/ , _/ ___/ / /__/ /_/ / , _/ _/
    [ 1328.084832] |__/|__/_/ |_/_/|_/_/     \___/\____/_/|_/___/
    [ 1328.084832]             Onion Enhanced MT7688 WiFi Driver
    [ 1328.084832]
    [ 1328.250937] DMA Scheduler Mode=0(LMAC)
    [ 1328.254768] efuse_probe: efuse = 10000012
    [ 1328.258890] 1. Phy Mode = 14
    [ 1328.469874] 2. Phy Mode = 14
    [ 1328.472897] 3. Phy Mode = 14
    [ 1328.476178]  WTBL Segment 1 info:
    [ 1328.479544]          MemBaseAddr/FID:0x28000/0
    [ 1328.483474]          EntrySize/Cnt:32/128
    [ 1328.486920]  WTBL Segment 2 info:
    [ 1328.490277]          MemBaseAddr/FID:0x40000/0
    [ 1328.494177]          EntrySize/Cnt:64/128
    [ 1328.497622]  WTBL Segment 3 info:
    [ 1328.501030]          MemBaseAddr/FID:0x42000/64
    [ 1328.505003]          EntrySize/Cnt:64/128
    [ 1328.508447]  WTBL Segment 4 info:
    [ 1328.511823]          MemBaseAddr/FID:0x44000/128
    [ 1328.515883]          EntrySize/Cnt:32/128
    [ 1338.779613] IPv6: ADDRCONF(NETDEV_UP): ra0: link is not ready
    [ 1338.785563] IPv6: ADDRCONF(NETDEV_CHANGE): ra0: link becomes ready
    [ 1342.354505] br-wlan: port 1(ra0) entered blocking state
    [ 1342.359935] br-wlan: port 1(ra0) entered disabled state
    [ 1342.365747] device ra0 entered promiscuous mode
    [ 1342.370515] br-wlan: port 1(ra0) entered blocking state
    [ 1342.375880] br-wlan: port 1(ra0) entered forwarding state
    [ 1342.382738] IPv6: ADDRCONF(NETDEV_CHANGE): br-wlan: link becomes ready
    
    root@Omega-3079:/#
    root@Omega-3079:/# /usr/bin/wifisetup add -ssid ZyXEL_GIGA_III -encr psk2 -passw
    ord valid_pass
    > Restarting wifimanager for changes to take effect
    root@Omega-3079:/# [ 1384.014316] br-wlan: port 1(ra0) entered disabled state
    [ 1384.058642] device ra0 left promiscuous mode
    [ 1384.063173] br-wlan: port 1(ra0) entered disabled state
    [ 1384.106877] IPv6: ADDRCONF(NETDEV_UP): br-wlan: link is not ready
    [ 1384.509325]
    [ 1384.509325] _      _____   ___  ___    _________  ___  ____
    [ 1384.509325] | | /| / / _ | / _ \/ _ \  / ___/ __ \/ _ \/ __/ V1.1
    [ 1384.509325] | |/ |/ / __ |/ , _/ ___/ / /__/ /_/ / , _/ _/
    [ 1384.509325] |__/|__/_/ |_/_/|_/_/     \___/\____/_/|_/___/
    [ 1384.509325]             Onion Enhanced MT7688 WiFi Driver
    [ 1384.509325]
    [ 1384.696150] DMA Scheduler Mode=0(LMAC)
    [ 1384.699982] efuse_probe: efuse = 10000012
    [ 1384.704178] 1. Phy Mode = 14
    [ 1384.900014] 2. Phy Mode = 14
    [ 1384.903027] 3. Phy Mode = 14
    [ 1384.906536]  WTBL Segment 1 info:
    [ 1384.909907]          MemBaseAddr/FID:0x28000/0
    [ 1384.913848]          EntrySize/Cnt:32/128
    [ 1384.917294]  WTBL Segment 2 info:
    [ 1384.920651]          MemBaseAddr/FID:0x40000/0
    [ 1384.924549]          EntrySize/Cnt:64/128
    [ 1384.927993]  WTBL Segment 3 info:
    [ 1384.931351]          MemBaseAddr/FID:0x42000/64
    [ 1384.935341]          EntrySize/Cnt:64/128
    [ 1384.938785]  WTBL Segment 4 info:
    [ 1384.942155]          MemBaseAddr/FID:0x44000/128
    [ 1384.946215]          EntrySize/Cnt:32/128
    [ 1395.820885] IPv6: ADDRCONF(NETDEV_UP): ra0: link is not ready
    [ 1395.832836] IPv6: ADDRCONF(NETDEV_CHANGE): ra0: link becomes ready
    [ 1399.445630] br-wlan: port 1(ra0) entered blocking state
    [ 1399.450945] br-wlan: port 1(ra0) entered disabled state
    [ 1399.456685] device ra0 entered promiscuous mode
    [ 1399.461449] br-wlan: port 1(ra0) entered blocking state
    [ 1399.466798] br-wlan: port 1(ra0) entered forwarding state
    [ 1399.474263] IPv6: ADDRCONF(NETDEV_CHANGE): br-wlan: link becomes ready
    
    root@Omega-3079:/#
    root@Omega-3079:/# ifconfig apcli0
    apcli0    Link encap:Ethernet  HWaddr 40:A3:6B:C1:30:7A
              inet6 addr: fe80::42a3:6bff:fec1:307a/64 Scope:Link
              UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
              RX packets:0 errors:0 dropped:0 overruns:0 frame:0
              TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:1000
              RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
    

    As you can see message "Interface apcli0 link up! (WPA2PSK AES)" is absent after wifisetup add.
    After reboot:

    ..............................
    [   29.625770]  WTBL Segment 4 info:
    [   29.629128]          MemBaseAddr/FID:0x44000/128
    [   29.633204]          EntrySize/Cnt:32/128
    [   46.757195] br-wlan: port 1(ra0) entered blocking state
    [   46.762509] br-wlan: port 1(ra0) entered disabled state
    [   46.768266] device ra0 entered promiscuous mode
    [   46.773029] br-wlan: port 1(ra0) entered blocking state
    [   46.778380] br-wlan: port 1(ra0) entered forwarding state
    [   46.785637] IPv6: ADDRCONF(NETDEV_CHANGE): br-wlan: link becomes ready
    [   49.059676] Interface apcli0 link up! (WPA2PSK AES)
    
    
    
    BusyBox v1.28.3 () built-in shell (ash)
    
       ____       _             ____
      / __ \___  (_)__  ___    / __ \__ _  ___ ___ ____ _
     / /_/ / _ \/ / _ \/ _ \  / /_/ /  ' \/ -_) _ `/ _ `/
     \____/_//_/_/\___/_//_/  \____/_/_/_/\__/\_, /\_,_/
     W H A T  W I L L  Y O U  I N V E N T ?  /___/
     -----------------------------------------------------
       Ī©-ware: 0.3.3 b247
     -----------------------------------------------------
    root@Omega-3079:/# [   71.680434] random: crng init done
    
    root@Omega-3079:/# ifconfig apcli0
    apcli0    Link encap:Ethernet  HWaddr 40:A3:6B:C1:30:7A
              inet addr:192.168.1.43  Bcast:192.168.1.255  Mask:255.255.255.0
              inet6 addr: fe80::42a3:6bff:fec1:307a/64 Scope:Link
              UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
              RX packets:0 errors:0 dropped:1 overruns:0 frame:0
              TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:1000
              RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
    
    root@Omega-3079:/#
    

    "Interface apcli0 link up! (WPA2PSK AES)" present.



  • @Pavel-Negrobov I was able to duplicate your issue. There does seem to be bug causing the problem.

    I have a of workaround you could use if you can't reboot. Stop the wifi using the command wifi down. Unload the wifi module: rmmod mt_wireless, reload it: insmod mt_wireless then restart wifi using: wifi up. That works but it's a bit rough.

    The issue seems to be that when wifi restarts, it is no copying the "config wifi-config" ssid and key into the sta configuration. So the other option is to use uci update the sta section yourself so when the wifi restarts it will read the correct values.

    I haven't seen this issue on the standard OpenWrt driver, so I think it is an issue for Onion to fix.



  • @crispyoz said in Some WiFi and ethernet connection questions (or bugs?):

    I have a of workaround you could use if you can't reboot. Stop the wifi using the command wifi down. Unload the wifi module: rmmod mt_wireless, reload it: insmod mt_wireless then restart wifi using: wifi up. That works but it's a bit rough.

    My omega does not have mt_wireless kernel module, but have mt_wifi:

    root@Omega-3079:/# lsmod | grep mt_wireless
    root@Omega-3079:/# lsmod | grep mt_wi
    mt_wifi              1360203  2
    

    And this sequence seems works correctly:

    /usr/bin/wifisetup add -ssid ZyXEL_GIGA_III -encr psk2 -password invalid_pass
    /usr/bin/wifisetup remove -ssid ZyXEL_GIGA_III
    /sbin/wifi down
    rmmod mt_wifi
    insmod mt_wifi
    /sbin/wifi up
    /usr/bin/wifisetup add -ssid ZyXEL_GIGA_III -encr psk2 -password valid_pass
    

    I will add these commands to my program and check again.

    Thank you.



  • @Pavel-Negrobov sorry yes mt_wifi is the correct module, I was writing from memory and memory malfunctioned šŸ™‚


Log in to reply
 

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