Missing apcli0 interface with openwrt 23.05



  • Hello.
    I have a weird issue using wireless network on onion omega2p.
    With an old openwrt 18 image works all fine. With a 23.05 image the apcli0 interface is missing:

    # ip a
    1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN qlen 1000
        link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
        inet 127.0.0.1/8 scope host lo
           valid_lft forever preferred_lft forever
        inet6 ::1/128 scope host 
           valid_lft forever preferred_lft forever
    2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP qlen 1000
        link/ether 88:1e:59:00:3f:69 brd ff:ff:ff:ff:ff:ff
        inet 192.168.2.129/24 brd 192.168.2.255 scope global eth0
           valid_lft forever preferred_lft forever
        inet6 fe80::8a1e:59ff:fe00:3f69/64 scope link 
           valid_lft forever preferred_lft forever
    8: ra0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP qlen 1000
        link/ether 88:1e:59:00:3f:68 brd ff:ff:ff:ff:ff:ff
        inet 192.168.3.1/24 brd 192.168.3.255 scope global ra0
           valid_lft forever preferred_lft forever
        inet6 fda2:fb96:9cf5:10::1/60 scope global noprefixroute 
           valid_lft forever preferred_lft forever
        inet6 fe80::8a1e:59ff:fe00:3f68/64 scope link 
           valid_lft forever preferred_lft forever
    

    and if I try to enable it I get an error:

    # ifconfig apcli0 up
    ifconfig: SIOCGIFFLAGS: No such device
    

    And obviously with ifup command:

    # ifup wwan
    # ifstatus wwan
    {
    	"up": false,
    	"pending": false,
    	"available": true,
    	"autostart": true,
    	"dynamic": false,
    	"proto": "dhcp",
    	"device": "apcli0",
    	"data": {
    		
    	},
    	"errors": [
    		{
    			"subsystem": "interface",
    			"code": "DEVICE_CLAIM_FAILED"
    		}
    	]
    }
    
    

    This is the configuration of the wireless client:

    # uci show wireless.client
    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='0'
    

    The AP mode works fine, I can connect to.
    No clues from dmesg.
    Disabling ra0 changes nothing. In any case, in my application I need both.

    Any suggest? What I'm doing wrong?

    Regards

    Alberto




  • @Alberto-Brosich can you post the output of the command uci show network



  • This is the output.

    # 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='fda2:fb96:9cf5::/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='Omega-XXXX'
    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='Host-XXXX'
    

    Regards

    Alberto


  • administrators

    @Alberto-Brosich The output of uci show wireless would be helpful as well!



  • Here it is. Thanks in advance.

    # uci 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='0'
    wireless.default_radio0=wifi-iface
    wireless.default_radio0.device='radio0'
    wireless.default_radio0.network='wlan'
    wireless.default_radio0.mode='ap'
    wireless.default_radio0.ssid='SSID-XXXX'
    wireless.default_radio0.encryption='psk2'
    wireless.default_radio0.ifname='ra0'
    wireless.default_radio0.key='xxxxx'
    wireless.default_radio0.disabled='0'
    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='0'
    
    

    and this is the output of wifi status:

    # wifi status
    {
      "radio0": {
        "up": true,
        "pending": false,
        "autostart": true,
        "disabled": false,
        "retry_setup_failed": false,
        "config": {
          "path": "platform/10300000.wmac",
          "channel": "auto",
          "band": "2g",
          "htmode": "HT40",
          "disabled": false
        },
        "interfaces": [
          {
            "section": "default_radio0",
            "ifname": "ra0",
            "config": {
              "mode": "ap",
              "ssid": "SSID-XXXX",
              "encryption": "psk2",
              "ifname": "ra0",
              "key": "xxxxx",
              "network": [
                "wlan"
              ],
              "disabled": false
            },
            "vlans": [],
            "stations": []
          },
          {
            "section": "client",
            "ifname": "apcli0",
            "config": {
              "mode": "sta",
              "ssid": "MySSID",
              "key": "MyKey",
              "encryption": "psk2",
              "ifname": "apcli0",
              "network": [
                "wwan"
              ],
              "disabled": false
            },
            "vlans": [],
            "stations": []
          }
        ]
      }
    }
    
    

  • administrators

    @Alberto-Brosich Did you follow the documentation instructions to connect to a secure wireless network to set the client SSID and key?

    I ask because wireless.client.ssid and wireless.client.key are set to the defaults.



  • Yes, I started from there.
    I modified the outputs for privacy reason.

    I used the following commands:

    uci set wireless.client.ssid='<YOUR WIFI NETWORK NAME HERE>' 
    uci set wireless.client.key='<YOUR WIFI NETWORK PASSWORD HERE>'
    uci commit wireless 
    wifi
    

    After that ip a doesn't show apcli0 interface, ifup wwan doesn't have any effect and the ifstatus wwan show the error DEVICE_CLAIM_FAILED. I checked several times both SSID and key.

    I noticed that disabling radio0 device (uci set wireless.radio0.disabled=1; uci commit wireless; wifi) removes ra0 device from the list.
    But enabling wifi client (uci set wireless.client.disabled=0; uci commit wireless; wifi) doesn't enable apcli0 interface, and any following command (e.g. ifup wwan, iwinfo apcli0 info, etc.) obviously does not work.
    And, as I said, there are not kernel log entries about that. Mainly no [ 993.442095] apcli0: associated line, or any kind of error.



  • @Alberto-Brosich your ssid key in your post is only 5 characters in both the sta and ap, perhaps you masked them out for the post, but if not then this will cause the issue ifup issue. Since you have selected psk2 encryption, your keys need to be between 8 and 63 characters.



  • Yes, I masked ssid and key. I checked several times that they were correct.
    I can see that also ra0 interface disappear for few seconds (using ip a command) after committing wireless client configuration and reloading it using the command wifi.
    With 18.06 firmware the apcli0 is always visible, even if it is disabled:

    # uci get wireless.sta.disabled
    1
    # ifconfig apcli0
    apcli0    Link encap:Ethernet  HWaddr xx:xx:xx:xx:xx:xx  
              BROADCAST 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)
    
    

    Regards



  • @Alberto-Brosich Try this configuration of network and wireless and tell me how you go ,just change only the client parameters (nothing secret in mine):

    /etc/config/network:

    config interface 'loopback'
            option device 'lo'
            option proto 'static'
            option ipaddr '127.0.0.1'
            option netmask '255.0.0.0'
            option disabled '0'
    
    config globals 'globals'
            option ula_prefix 'fd80:3b06:c6c7::/48'
    
    config device
            option name 'br-lan'
            option type 'bridge'
            list ports 'eth0'
    
    config interface 'wlan'
            option device 'br-lan'
            option proto 'static'
            option ipaddr '192.168.3.1'
            option netmask '255.255.255.0'
            option ip6assign '60'
            option disabled '0'
    
    config switch
            option name 'switch0'
            option reset '1'
            option enable_vlan '0'
    
    config interface 'wwan'
            option proto 'dhcp'
            option device 'apcli0'
            option disabled '0'
    
    config  interface 'lan'
            option device 'eth0'
            option proto 'static'
            option netmask '255.255.255.0'
            option ipaddr '192.168.4.1'
    
    

    /etc/config/wireless

    config wifi-device 'radio0'
            option type 'mac80211'
            option path 'platform/10300000.wmac'
            option channel '11'
            option band '2g'
            option htmode 'HT20'
            option disabled '0'
            option country 'ID'
    
    config wifi-iface 'default_radio0'
            option device 'radio0'
            option network 'wlan'
            option mode 'ap'
            option ssid 'dash'
            option encryption 'psk2'
            option key 'gnkdsjhfksfksgf;isyuf'
            option hidden '0'
            option disabled '1'
    
    config wifi-iface 'client'
            option device 'radio0'
            option network 'wwan'
            option mode 'sta'
            option ssid 'MarriottBonvoy'
            option key ''
            option encryption 'none'
            option ifname 'apcli0'
            option disabled '0'
            option disassoc_low_ack '0'
    
    


1 out of 10

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