Omega2 `apcli0` will not obtain ipv4 address
-
Hello all,
I recently received an Omega2 for Christmas and I'm having trouble actually connecting it to the internet.
For various reasons I opted to do a command-line configuration of wifi settings using the serial port. My firmware is up to date (
omega2-v0.3.2-b233.bin
). According toiwconfig
(see appendedwifidebug.log
), I am successfully associated with my router using WEP. Up until this point, things seem to be working properly.However, when I do
ifconfig
orip addr
, the interfaceapcli0
only shows a link local ipv6 address. There isn't even a field for an ipv4 address! According to my router's DHCP table, the Omega2 never even attempted to grab an IP address. So I'm not sure if this means the kernel thinksapcli0
is configured to use ipv6 only, or there is some setup I'm missing. Interestingly enough,wifidebug.log
claimsapcli0
has neither sent nor received any data. Has anyone seen this problem before and have any idea how and/or whether my device somehow got misconfigured?Starting
udhcpc
manually has no effect either:root@Omega-E72B:/# udhcpc udhcpc: started, v1.28.3 udhcpc: sending discover udhcpc: sending discover udhcpc: sending discover
This is the contents of
wifidebug.log
(minus sensitive content):root@Omega-E72B:/# cat /tmp/wifidebug.log ================ WIFI DEBUG LOG ================ == Fri Dec 6 17:01:47 GMT 2019 == ================ ifconfig ================ apcli0 Link encap:Ethernet HWaddr 40:A3:6B:C0:E7:2C inet6 addr: fe80::42a3:6bff:fec0:e72c/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) br-wlan Link encap:Ethernet HWaddr 40:A3:6B:C0:E7:2B inet addr:192.168.3.1 Bcast:192.168.3.255 Mask:255.255.255.0 inet6 addr: fe80::42a3:6bff:fec0:e72b/64 Scope:Link inet6 addr: fd1d:48c4:7633::1/60 Scope:Global UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:40 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:0 (0.0 B) TX bytes:7564 (7.3 KiB) eth0 Link encap:Ethernet HWaddr 40:A3:6B:C0:E7:2D inet6 addr: fe80::42a3:6bff:fec0:e72d/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:500 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:0 (0.0 B) TX bytes:167597 (163.6 KiB) Interrupt:5 lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 inet6 addr: ::1/128 Scope:Host UP LOOPBACK RUNNING MTU:65536 Metric:1 RX packets:304 errors:0 dropped:0 overruns:0 frame:0 TX packets:304 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:19712 (19.2 KiB) TX bytes:19712 (19.2 KiB) ra0 Link encap:Ethernet HWaddr 40:A3:6B:C0:E7:2B inet6 addr: fe80::42a3:6bff:fec0:e72b/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) Interrupt:6 ================ iwconfig ================ lo no wireless extensions. apcli0 RTWIFI SoftAP ESSID:[redacted] br-wlan no wireless extensions. eth0 no wireless extensions. Mode:Managed Channel=6 Access Point: 00:90:A9:CB:3F:06 Bit Rate=150 Mb/s ra0 RTWIFI SoftAP ESSID:"Omega-E72B" Mode:Managed Channel=6 Access Point: 40:A3:6B:C0:E7:2B Bit Rate=150 Mb/s ================ uci show wireless ================ wireless.radio0=wifi-device wireless.radio0.type='ralink' wireless.radio0.variant='mt7628' wireless.radio0.country='US' wireless.radio0.hwmode='11g' wireless.radio0.htmode='HT40' wireless.radio0.channel='auto' wireless.radio0.disabled='0' wireless.radio0.device_mode='apsta' wireless.radio0.op_mode='preference' wireless.ap=wifi-iface wireless.ap.device='radio0' wireless.ap.mode='ap' wireless.ap.network='wlan' wireless.ap.ifname='ra0' wireless.ap.encryption='psk2' wireless.ap.key='12345678' wireless.ap.disabled='0' wireless.ap.ssid='Omega-E72B' wireless.sta=wifi-iface wireless.sta.device='radio0' wireless.sta.mode='sta' wireless.sta.ifname='apcli0' wireless.sta.key='1' wireless.sta.network='wwan' wireless.sta.led='omega2:blue:wifi' wireless.sta.disabled='0' wireless.sta.encryption='wep' wireless.sta.ssid=[redacted] wireless.@wifi-config[0]=wifi-config wireless.@wifi-config[0].key='1' wireless.@wifi-config[0].key1=[redacted] wireless.@wifi-config[0].ssid=[redacted] wireless.@wifi-config[0].encryption='wep
-
@William-Jones the device will have an ipv6 address even if it is not connected to your wifi. Have you re-run wifisetup, search for your ssid then enter the key?
-
@crispyoz said in Omega2 `apcli0` will not obtain ipv4 address:
@William-Jones the device will have an ipv6 address even if it is not connected to your wifi. Have you re-run wifisetup, search for your ssid then enter the key?
Here's what happens when I do that:
root@Omega-E72B:/# wifisetup Onion Omega Wifi Setup Select from the following: 1) Scan for Wifi networks 2) Type network info q) Exit Selection: 1 Scanning for wifi networks... Select Wifi network: ... 24) [redacted] ... Selection: 24 Network: [redacted] Encryption type: wep Enter password: [redacted] > Restarting wifimanager for changes to take effect root@Omega-E72B:/# [84073.049188] br-wlan: port 1(ra0) entered disabled state [84073.744554] device ra0 left promiscuous mode [84073.749022] br-wlan: port 1(ra0) entered disabled state [84073.803391] IPv6: ADDRCONF(NETDEV_UP): br-wlan: link is not ready [84074.235626] [84074.235626] _ _____ ___ ___ _________ ___ ____ [84074.235626] | | /| / / _ | / _ \/ _ \ / ___/ __ \/ _ \/ __/ V1.1 [84074.235626] | |/ |/ / __ |/ , _/ ___/ / /__/ /_/ / , _/ _/ [84074.235626] |__/|__/_/ |_/_/|_/_/ \___/\____/_/|_/___/ [84074.235626] Onion Enhanced MT7688 WiFi Driver [84074.235626] [84074.395505] DMA Scheduler Mode=0(LMAC) [84074.399336] efuse_probe: efuse = 10000012 [84074.403492] 1. Phy Mode = 14 [84074.625011] 2. Phy Mode = 14 [84074.627990] 3. Phy Mode = 14 [84074.631217] WTBL Segment 1 info: [84074.634626] MemBaseAddr/FID:0x28000/0 [84074.638515] EntrySize/Cnt:32/128 [84074.642002] WTBL Segment 2 info: [84074.645362] MemBaseAddr/FID:0x40000/0 [84074.649247] EntrySize/Cnt:64/128 [84074.652715] WTBL Segment 3 info: [84074.656074] MemBaseAddr/FID:0x42000/64 [84074.660047] EntrySize/Cnt:64/128 [84074.663507] WTBL Segment 4 info: [84074.666865] MemBaseAddr/FID:0x44000/128 [84074.670926] EntrySize/Cnt:32/128 [84084.910012] IPv6: ADDRCONF(NETDEV_UP): ra0: link is not ready [84084.916024] IPv6: ADDRCONF(NETDEV_CHANGE): ra0: link becomes ready [84088.555178] br-wlan: port 1(ra0) entered blocking state [84088.560492] br-wlan: port 1(ra0) entered disabled state [84088.566293] device ra0 entered promiscuous mode [84088.571060] br-wlan: port 1(ra0) entered blocking state [84088.576425] br-wlan: port 1(ra0) entered forwarding state [84088.583978] IPv6: ADDRCONF(NETDEV_CHANGE): br-wlan: link becomes ready [84090.737455] Interface apcli0 link up! (OPEN WEP) root@Omega-E72B:/# ip addr 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 UNKNOWN qlen 1000 link/ether 40:a3:6b:c0:e7:2d brd ff:ff:ff:ff:ff:ff inet6 fe80::42a3:6bff:fec0:e72d/64 scope link valid_lft forever preferred_lft forever 3: ra0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel master br-wlan state UP qlen 1000 link/ether 40:a3:6b:c0:e7:2b brd ff:ff:ff:ff:ff:ff inet6 fe80::42a3:6bff:fec0:e72b/64 scope link valid_lft forever preferred_lft forever 5: apcli0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UNKNOWN qlen 1000 link/ether 40:a3:6b:c0:e7:2c brd ff:ff:ff:ff:ff:ff inet6 fe80::42a3:6bff:fec0:e72c/64 scope link valid_lft forever preferred_lft forever 7: br-wlan: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP qlen 1000 link/ether 40:a3:6b:c0:e7:2b brd ff:ff:ff:ff:ff:ff inet 192.168.3.1/24 brd 192.168.3.255 scope global br-wlan valid_lft forever preferred_lft forever inet6 fd1d:48c4:7633::1/60 scope global valid_lft forever preferred_lft forever inet6 fe80::42a3:6bff:fec0:e72b/64 scope link valid_lft forever preferred_lft forever root@Omega-E72B:/# iwconfig lo no wireless extensions. apcli0 RTWIFI SoftAP ESSID:[redacted] Mode:Managed Channel=6 Access Point: 00:90:A9:CB:3F:06 Bit Rate=150 Mb/s br-wlan no wireless extensions. eth0 no wireless extensions. ra0 RTWIFI SoftAP ESSID:"Omega-E72B" Mode:Managed Channel=6 Access Point: 40:A3:6B:C0:E7:2B Bit Rate=150 Mb/s root@Omega-E72B:/#
It looks like we successfully associate with the router, but no IP address is ever assigned...
-
@William-Jones there are some reports of similar issues and the solution is to edit /etc/config/wireless and comment out "option country 'US' "
-
Commenting out that option, and even removing it completely, and then restarting the Omega2 or the wifimanager has no effect:
root@Omega-E72B:/# cat /etc/config/wireless config wifi-device 'radio0' option type 'ralink' option variant 'mt7628' 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-E72B' config wifi-iface 'sta' option device 'radio0' option mode 'sta' option ifname 'apcli0' option key '1' option network 'wwan' option led 'omega2:blue:wifi' option disabled '0' option encryption 'wep' option ssid [redacted] config wifi-config option key '1' option key1 [redacted] option ssid [redacted] option encryption 'wep' root@Omega-E72B:/# ifconfig apcli0 Link encap:Ethernet HWaddr 40:A3:6B:C0:E7:2C inet6 addr: fe80::42a3:6bff:fec0:e72c/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) ... root@Omega-E72B:/# iwconfig ... apcli0 RTWIFI SoftAP ESSID:[redacted] Mode:Managed Channel=6 Access Point: 00:90:A9:CB:3F:06 Bit Rate=150 Mb/s
Any other possibilities?
-
@William-Jones my next step would be to hard code the IP just to determine if the issue is with dhcp or the network/setup itself. To do this edit your /etc/config/network file and look for wlan section. Change the proto option to "static" (instead of dhcp) and then add option ipaddr '192.168.1.100' and add option netmask '255.255.255.0' , option gateway '192.168.1.1'. Of course these setting need to be changed to suit your own network configuration. Then restart and check ifconfig, ping the gateway etc.
-
Okay, this is interesting... by switching to a static IP address, I finally get an ipv4 address:
root@Omega-E72B:/# cat /etc/config/network config interface 'loopback' option ifname 'lo' option proto 'static' option ipaddr '127.0.0.1' option netmask '255.0.0.0' config globals 'globals' option ula_prefix 'fd1d:48c4:7633::/48' config interface 'wlan' option type 'bridge' option proto 'static' option ipaddr '192.168.3.1' option netmask '255.255.255.0' option ip6assign '60' config interface 'wwan' option ifname 'apcli0' # option proto 'dhcp' option proto 'static' option ipaddr 192.168.1.100 option netmask 255.255.255.0 option gateway 192.168.1.1 option hostname 'Omega-E72B' config interface 'wan' option ifname 'eth0' option proto 'dhcp' root@Omega-E72B:/# ifconfig apcli0 Link encap:Ethernet HWaddr 40:A3:6B:C0:E7:2C inet addr:192.168.1.100 Bcast:192.168.1.255 Mask:255.255.255.0 inet6 addr: fe80::42a3:6bff:fec0:e72c/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-E72B:/# iwconfig ... apcli0 RTWIFI SoftAP ESSID:[redacted] Mode:Managed Channel=6 Access Point: 00:90:A9:CB:3F:06 Bit Rate=150 Mb/s ...
It seems as if I should be connected to the router; the MAC address specified in the Access Point field of
iwconfig
is correct. However, pinging the router does nothing:root@Omega-E72B:/# ping 192.168.1.1 PING 192.168.1.1 (192.168.1.1): 56 data bytes ^C --- 192.168.1.1 ping statistics --- 3 packets transmitted, 0 packets received, 100% packet loss root@Omega-E72B:/#
This indicates that there's something wrong with my network setup... but what?
-
I have attempted a factory reset and to use a separate radio on my router- with
WPA2
encryption- using the following command line:wifisetup add -ssid [redacted2] -encr psk2 -password [redacted2]
After the interfaces reset,
apcli0
will refuse to associated with the router:root@Omega-E72B:/# iwconfig lo no wireless extensions. apcli0 RTWIFI SoftAP ESSID:"" Mode:Managed Channel=6 Access Point: Not-Associated Bit Rate:150 Mb/s br-wlan no wireless extensions. eth0 no wireless extensions. ra0 RTWIFI SoftAP ESSID:"Omega-E72B" Mode:Managed Channel=6 Access Point: 40:A3:6B:C0:E7:2B Bit Rate=150 Mb/s
If I attempt to set both networks up simultaneously, the Omega2 only ever attempts to associate with the WEP network. I'm very much stumped and about to give up. What is wrong here?!
-
@William-Jones most routers will have a debug log you can turn on, this should show you the process of association and where the wheels are falling off. WHat type and model router do you have?
-
@crispyoz Western Digital MyNet N750... older router that was discontinued a few years ago...
Did another factory reset and then went back to WEP settings. The router log accessible from the admin panel shows no activity from the Omega2...
But the Omega2 can clearly find it because the MAC address is correct.
-
By using the xfinity-wifi hotspot in my modem, which has no encryption enabled, I am able to connect the Omega2 to a network. I can't actually access the internet because I can't authenticate via a webpage, but at least this is a sign that the hardware is working... and maybe my router isn't...
root@Omega-0000:/# wifisetup add -ssid xfinitywifi -encr none ... root@Omega-E72B:/# iwconfig ... apcli0 RTWIFI SoftAP ESSID:"xfinitywifi" Mode:Managed Channel=11 Access Point: 06:1D:D5:97:DC:10 Bit Rate=150 Mb/s ... root@Omega-E72B:/# ip addr ... 5: apcli0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UNKNOWN qlen 1000 link/ether 40:a3:6b:c0:e7:2c brd ff:ff:ff:ff:ff:ff inet 172.20.20.20/24 brd 172.20.20.255 scope global apcli0 valid_lft forever preferred_lft forever inet6 fe80::42a3:6bff:fec0:e72c/64 scope link valid_lft forever preferred_lft forever ... root@Omega-E72B:/# ping 172.20.20.1 PING 172.20.20.1 (172.20.20.1): 56 data bytes 64 bytes from 172.20.20.1: seq=0 ttl=64 time=19.701 ms 64 bytes from 172.20.20.1: seq=1 ttl=64 time=30.207 ms 64 bytes from 172.20.20.1: seq=2 ttl=64 time=17.992 ms ^C --- 172.20.20.1 ping statistics --- 3 packets transmitted, 3 packets received, 0% packet loss round-trip min/avg/max = 17.992/22.633/30.207 ms root@Omega-E72B:/#
EDIT: I disabled encryption on my main router, connected in much the same manner, and I was able to access the Internet and ping Google. However, since the IP address is of the form
192.168.252.x
instead of192.168.1.x
, I can't actually access the Omega2 from any of my other computers on the home network. The DHCP request also shows up in my router logs in this case:Fri Jan 3 22:11:33 2020 DHCP: Server sending ACK to 192.168.252.130. (Lease time = 604800) Fri Jan 3 22:11:33 2020 DHCP: Server receive REQUEST from 40:a3:6b:c0:e7:2c. Fri Jan 3 22:11:33 2020 DHCP: Server sending OFFER of 192.168.252.130. Fri Jan 3 22:11:32 2020 DHCP: Server receive DISCOVER from 40:a3:6b:c0:e7:2c.
So it appears I'm not setting something up w/ WEP properly?
-
@William-Jones this is a bit of a long shot but I wonder if your router is not correctly negotiating the WEP type, there are 2 types of WEP, Open and Shared, you could try specifying your specific WEP type. From the docs:
"Use wep+shared or wep+open to force a specific mode."
-
Manually specifying either
shared
oropen
has no effect. Inwifisetup
, the optionwep+shared
is interpreted as no encryption (fair enough).When I manually try to set the relevant options using
uci
or modify/etc/config/wireless
directly, something is forcefully setting the encryption ofconfig wifi-iface 'sta'
(apcli0
) back towep
in both/etc/config/wireless
anduci show
whenapcli0
comes up. How can I figure out what is forcefully changing the string back?Also, has seriously nobody seen an error like this? I almost installed OpenWRT on my home router a few years back. This makes me want to stay far away.
-
@William-Jones that is an interesting turn of events. My suspicion is that the Warp driver is making these changes but this driver is not open source so there is no way to look at that code. Maybe @Lazar-Demin from Onion can comment on that.
A quick fix might be to set the correct configuration manually then set the wireless config file to read only. I've never tried that before but it might be worth a try.
This is not something I have heard of before and I have Omega2+ on a few hundred sites utilising a wide range of wifi APs.
-
Even when I set the wireless config file to read only, something is managing to change the string back to
wep
alone.This is not something I have heard of before and I have Omega2+ on a few hundred sites utilising a wide range of wifi APs.
Do any of them use WEP shared :P?
-
@William-Jones yes I have 3 or 4 on WEP (reluctantly) all on one site and router. I would suggest you try another router, WEP is inherently insecure so I don't think anyone is going to fix an issue related to WEP.