-
Notifications
You must be signed in to change notification settings - Fork 119
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ESP8266/Embedded devices unable to connect to 2.4Ghz Radio #278
Comments
|
Log 1: Openwrt r6302 (davidc502 build), Kernel 4.9.82, WPA2-PSK-CCMP [10.3.4.0-20180226] Wireless config:
5Ghz disabled (different router), 2.4ghz opened for IoT devices (Espressif) wlan2 (wpa2-psk-ccmp) log:
|
radio2 went out shortly (12hrs), is it because it's used for DFS scan?
|
|
Log 1 repeats for DHCP and static IP. If I create a secondary radio on wlan1, I get Log 3. Logread doesn't output anything else, its just keep repeating. |
On a single session, after making several changes to the AP(2.4)'s settings, the rest of the devices doesn't seem to get discovered as well. Here are 2 other ESP device's log:
after successful handshake, does mwlwifi notify about the new device to DHCP? |
Second update: Disabling encryption allows all the three devices to login (discovered by DHCP).
|
Please don't disable WMM. |
And use CCMP only. |
I was trying to find out if any of those were conflicting with this issue, apparently they do not. I have set the wlan to AES only (not auto nor TKIP) |
|
This is DHCP, how about static IP? |
BTW, aid 2 and 3 are the same kind of client? |
I've allocated static ip for all the 3 clients. They're all same kind of client (3) and one camera which is offline. |
|
cat /etc/config/wireless
Log:
Ping: (no response, not even timeout)
|
Have you not tried to set a static IP address inside the wireless clients
themselves and not within the router that still talks to DHCP.
Sounds like you keep setting a static DHCP lease within the router and not
client.
If you set a static IP within the wireless clients and not the router, do
you still have these problems?
…On Mar 4, 2018 11:50, "Ganesh Kumar" ***@***.***> wrote:
1.
The terminal screenshot in my previous post had devices allocated with
static ip and that is when I get "DHCP packet received from wlan1 which has
no address"
2.
Setup for only ESP device with static ip and log after a reboot.
cat /etc/config/dhcp
config dnsmasq
option domainneeded '1'
option localise_queries '1'
option rebind_protection '1'
option rebind_localhost '1'
option local '/lan/'
option domain 'lan'
option expandhosts '1'
option authoritative '1'
option readethers '1'
option leasefile '/tmp/dhcp.leases'
option resolvfile '/tmp/resolv.conf.auto'
option nonwildcard '1'
option localservice '1'
config dhcp 'lan'
option interface 'lan'
option start '100'
option limit '150'
option leasetime '12h'
list dhcp_option '6,8.8.8.8,8.8.4.4'
config dhcp 'wan'
option interface 'wan'
option ignore '1'
config odhcpd 'odhcpd'
option maindhcp '0'
option leasefile '/tmp/hosts/odhcpd'
option leasetrigger '/usr/sbin/odhcpd-update'
option loglevel '4'
config host
option name 'DESKTOP-XX'
option dns '1'
option mac 'xx:xx:xx:xx:xx'
option ip '192.168.1.199'
option leasetime 'infinite'
config host
option name 'VelopNode1'
option dns '1'
option mac '58:ef:xx:xx:xx:xx'
option ip '192.168.1.151'
option leasetime 'infinite'
config host
option name 'Hikam-0505'
option dns '1'
option mac '88:83:5d:xx:xx:xx'
option ip '192.168.1.200'
option leasetime 'infinite'
config host
option name 'ESP_C0F513'
option dns '1'
option mac 'dc:4f:22:xx:xx:xx'
option ip '192.168.1.235'
option leasetime 'infinite'
cat /etc/config/wireless
config wifi-device 'radio0'
option type 'mac80211'
option channel '36'
option hwmode '11a'
option path 'soc/soc:pcie/pci0000:00/0000:00:01.0/0000:01:00.0'
option htmode 'VHT80'
config wifi-iface 'default_radio0'
option device 'radio0'
option network 'lan'
option mode 'ap'
option ssid 'OpenWrt'
option encryption 'none'
option disabled '1'
config wifi-device 'radio1'
option type 'mac80211'
option hwmode '11g'
option path 'soc/soc:pcie/pci0000:00/0000:00:02.0/0000:02:00.0'
option country 'US'
option channel '11'
option txpower '29'
option htmode 'HT20'
option legacy_rates '1'
config wifi-iface 'default_radio1'
option device 'radio1'
option network 'lan'
option mode 'ap'
option ssid 'SSID'
option key 'PASSWORD'
option encryption 'psk2+ccmp'
option disabled '1'
Logs:
Sun Mar 4 12:45:37 2018 daemon.err uhttpd[1810]: luci: accepted login on /admin/network/wireless for root from 192.168.1.1
Sun Mar 4 12:45:48 2018 daemon.notice netifd: radio1 (11006): command failed: Not supported (-95)
Sun Mar 4 12:45:48 2018 daemon.err hostapd: Configuration file: /var/run/hostapd-phy1.conf
Sun Mar 4 12:45:48 2018 kern.debug kernel: [ 546.593951] ieee80211 phy1: change: 0xffffffff
Sun Mar 4 12:45:48 2018 kern.info kernel: [ 546.683234] IPv6: ADDRCONF(NETDEV_UP): wlan1: link is not ready
Sun Mar 4 12:45:48 2018 kern.info kernel: [ 546.690075] br-lan: port 2(wlan1) entered blocking state
Sun Mar 4 12:45:48 2018 kern.info kernel: [ 546.695453] br-lan: port 2(wlan1) entered disabled state
Sun Mar 4 12:45:48 2018 kern.info kernel: [ 546.700905] device wlan1 entered promiscuous mode
Sun Mar 4 12:45:48 2018 daemon.notice hostapd: wlan1: interface state UNINITIALIZED->COUNTRY_UPDATE
Sun Mar 4 12:45:48 2018 daemon.err hostapd: Using interface wlan1 with hwaddr 60:38:e0:xx:xx:xx and ssid "SSID"
Sun Mar 4 12:45:49 2018 kern.debug kernel: [ 546.756698] ieee80211 phy1: change: 0x100
Sun Mar 4 12:45:49 2018 kern.debug kernel: [ 546.769749] ieee80211 phy1: change: 0x42
Sun Mar 4 12:45:49 2018 kern.info kernel: [ 546.937221] IPv6: ADDRCONF(NETDEV_CHANGE): wlan1: link becomes ready
Sun Mar 4 12:45:49 2018 kern.info kernel: [ 546.943666] br-lan: port 2(wlan1) entered blocking state
Sun Mar 4 12:45:49 2018 kern.info kernel: [ 546.949012] br-lan: port 2(wlan1) entered forwarding state
Sun Mar 4 12:45:49 2018 daemon.notice hostapd: wlan1: interface state COUNTRY_UPDATE->ENABLED
Sun Mar 4 12:45:49 2018 daemon.notice hostapd: wlan1: AP-ENABLED
Sun Mar 4 12:45:49 2018 kern.debug kernel: [ 547.027698] ieee80211 phy1: change: 0x20
Sun Mar 4 12:45:49 2018 daemon.notice netifd: Network device 'wlan1' link is up
Sun Mar 4 12:45:53 2018 daemon.info hostapd: wlan1: STA dc:4f:22:xx:xx:xx IEEE 802.11: associated (aid 1)
Sun Mar 4 12:45:54 2018 daemon.notice hostapd: wlan1: AP-STA-CONNECTED dc:4f:22:xx:xx:xx
Sun Mar 4 12:45:54 2018 daemon.info hostapd: wlan1: STA dc:4f:22:xx:xx:xx WPA: pairwise key handshake completed (RSN)
Sun Mar 4 12:46:26 2018 daemon.info hostapd: wlan1: STA dc:4f:22:xx:xx:xx IEEE 802.11: authenticated
Ping: (no response, not even timeout)
***@***.***:~# ping 192.168.1.235
PING 192.168.1.235 (192.168.1.235): 56 data bytes
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#278 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/ARIphG_fVsnqSeB2CJi-JP1_Wff9s1SFks5tbCl6gaJpZM4Sa2UI>
.
|
@rs-se the problem is these are ESP8285 based devices and configuring static ip is not possible because they run proprietary firmware. I am not sure about the camera's wifi module but all these devices can be configured from their respective apps to join 2.4Ghz networks. As of now the devices connect without issues to the radio2 on 3200acm (which is not mwlwifi, dhcp discovers it) and my velop mesh nodes. |
|
phy0
phy1:
PS: I was going through this issue #242, I see similar issue with authentication. |
Please use open to test and get log:
Run the same test under security mode and get log. |
Had one ESP client running, right after enabling wlan1 and setting up the monitor mode it connected! I tried turned on all the clients as of now and DHCP allocated the static ip. Had the clients connected over wlan2 for the previous 18hrs. This is bizarre. Will continue to monitor them and report with monitor logs if it occurs. |
Apologies, due to my absent mindedness, I forgot to look at the encryption being disabled. So I followed your steps to get mon0 up and monitoring tcpdump.
I do not happen to see any connection/dhcp packet on the tcpdumps. Tried pinging the client with static ip allocated, but no response. |
Please use open mode to do the test first:
Since open mode is all right according to your description, tcpdump should get DHCP and Ping packets. Run the same test for security mode, I want to know if DHCP packets can be received by the router. Finally, run the test for security mode but set static IP to client. |
Here you go:
PS: I have the client blocked from accessing the internet (hence the port 53 unreachable) |
@powderluv I found a method to keep |
Awesome!! thanks |
I've had this issue for long time with my ESP8266 IoT devices and my WRT3200ACM. My solution hasd been to completely disable the 2.4GHz interface and use an old AP at 2.4GHz. |
Is there any other solution?As far as I know, the official firmware does not have this problem.I really don‘t want to disable WMM,I want speed...... |
Isn't the comment just above a solution for you ? |
just to clarify, you can also have 3 interfaces on only 2 wifi devices... in other words, you can have multiple interfaces on one phy#. This is what I do to prevent interference at 2.4 ghz level (or at least thats my logic behind it) |
Hi all, I used to work for HP/Aruba in the wifi group, I remember we had an issue with Marvell chipset being used in a Linksys multimedia bridge. The problem behavior is exactly like the one discussed in this thread, it is related to LDPC feature, I found out if LDPC is enabled, the Linksys device won`t like it when receiving, so I end up suggesting to our customer we disable LDPC transmit from the AP (which use Atheros chipset 802.11n AR9390), even though the Linksys device advertise it can receive LDPC packet, by disabling from the AP fixed the issue of DHCP 8-) |
I just bought a used WRT1900ACS, so the issue here can cause all my wifi IOT devices problem as most of them is based on ESP8266. I have a linux laptop with AR9390 so wifi sniffing is no issue if needed. |
Looking at the ESP8266 SDK for RTOS it looks like there was a fix for not sending assoc request with LDPC
However most of the IOT devices I know are not using RTOS SDK, but using the ESP8266 core for Arduino and I did not find any info about it there.
It looks like the parameter is updated correctly in "hostapd-phy1.conf" but I'm not sure if the beacon frame is updated correctly. |
Thanks for trying, but this hasn't seemed to help... at least for me. I verified that my hostapd-ph1.conf was properly configured so that isn't the problem. I've had my WRT for many years now, since this issue was opened... so far the only solution is to disable WMM, which unfortunately causes issues with some of my other devices so I end up having an extra interface as a bandaid. I provided good detailed wireshark logs in this thread somewhere back if anyone is interested i posted the logs in my other account, here: #278 (comment) |
I have verified with a sniffer that the LDPC flag is updated correctly with "option ldpc '0'". |
if you have an extra nodemcu, can you try flashing this https://github.com/sidoh/esp8266_milight_hub and see if it is able to connect to your wifi? |
I flashed a binary from the project you suggested on a generic esp8266 board, it did not connect to my router with LDPC disabled/WMM enabled, once I enabled LDPC and disabled WMM it connected OK. So this means that the LDPC is probably not the casue for ESP devices not connecting. |
thanks for the test! I have the same experience. whether this is an issue with ESP or mwlwifi I don't think has been determined, but only mwlwifi users seem to ever have a problem these devices |
Hi, can you do a wireless trace during the test with LDPC disabled and WMM on, if you disable WMM there is no LDPC because no 802.11n frame, only legacy b/g, so indirec I will try to setup my Linksys router because if it rains tomorrow, no tennis so can play with this issue 8-) |
correct with wmm on, handshake completes, but there is no DHCP offer made after DHCP discover. |
I can confirm that my ESP8266 based devices are able to connect to Wi-Fi network with WMM enabled after configuring Wi-Fi interface with
I could also see in Wireshark, that bit wlan.ht.capabilities.ldpccoding got zeroed out in beacon frames (HT LDPC coding capability: Transmitter does not support receiving LDPC coded packets). Update: |
Hi, can you share the passphrase of WPA2 settings, I can input to wireshark to decode frames since your trace has 4-ways handshake. Also can you keep ACK frames in trace, it would help to troubleshoot if receiver got it right or not, thanks. |
I am using stock firmware 1.0.3.187766 on the WRT1900ACS to gather some traces with my ESP, the stock firmware is really bad with respect to configuration, cannot wait to switch to openwrt. One finding I found interesting is on probe response, the router reply with "duplicate" HT Capabilities, the first HT Capabilities tag(45) has LDPC on, but subsequent HT Capabilities tag (221) has LDPC off, my guess is the ESP parse the 2nd tag and take the latest value which is LDPC disable. From the openwrt trace here in this thread, there is no 2nd HT Capabilities Tag. You can browse my trace. capture20200914b-marvell-channel6-iot-assoc-dhcp-retiries.zip Tag: HT Capabilities (802.11n D1.10) Tag: Vendor Specific: Epigram, Inc.: HT Capabilities (802.11n D1.10) From my own experience during the era of 802.11n, before the 802.11n is ratified chipset vendors released pre-802.11n and probably Marvell forgot to remote the tag 221 used for pre-802.11n. For those who want to decode with wireshark, the SSID is Linksys13548 and WPA password is 9r4nu0dxvw ,no worry 8-) this password will be short live when I switch to openwrt. Do a filter on eapol to quickly locate the area on interest. |
Today I did a switch over to WRT1900ACS 2.4G using stock fw for a test and all IOT ESP devices reconnected without any issue. So far I can say that the WRT1900ACS is a notch above ASUS AC68P as far as wifi performance. |
Had this problem for a week. Add thanks everyone for the help |
@MoranLevy just wmm 0 is enough. but thats no solution. it disabled 802.11ac and 802.11n and turns the radio to legacy mode. so LDPC has no effect anymore. |
Thanks When it finally worked I assumed that it is the combination and did not test it further.You are right only setting wmm is enough |
@MoranLevy To answer your question about the second part, I presume you asked about LDPC disable, disable LDPC will not impact much your wifi as LDPC is an improvement of FEC (Forward Error Correction) vs the regular BCC. You will notice the good effect of LDPC if you are doing long distance. LDPC allow to recover a frame with some bits errors, usually frames that are received with weak signal. |
@chithanhhoang this is wrong. turboqam works with qca, marvell, mediatek and everything else capable of doing vht in 2.4 ghz. however. mac80211 does prevent of using vht in 2.4 ghz like the rest of the drivers. its very easy to patch mac80211 and the driver to support turboqam. basicly just vht must be enabled for 2.4 ghz and hostapd must be configured to broadcast a special beacon ie info field. to archive this you need to mod the drivers for vht capabilities in 2.4 ghz and you need to set "vendor_vht=1" in hostapd.conf. this ie element is supported by alot of windows client drivers. i implemented this to dd-wrt since a long time to support turbo qam on all chipsets |
@BrainSlayer I never said turboqam i.e. 802.11ac 256QAM does not work on others vendors chipsets in 2.4, I said in my post in the beginning Broadcom was the first to put the hack into 2.4G and called it turboqam, and eventually others vendors followed. I worked on both Broadcom and Atheros proprietary drivers so I did the similar hack in 2013 on QCA9880 to interop with Broadcom 43460 2.4 256QAM. I also used the Veriwave to force 2.4 256QAM into QCA radio. Once you tune the radio any frequencies, the tx/rx of 802.11ac does not care what is happening at analog level. |
@thecode You are right, I found the git commit that match your good findings, the change is made indeed into the opaque libcore.a of esp8266 sdk. So anything that was using the esp8266 sdk prior to the fix will cause connectivity issue if the transmitter thinks it can tx ldpc packet to receiver. commit 31299b1ee2c886d71da92a2ac4429d5b4ecd3bc1
diff --git a/components/esp8266/lib/VERSION b/components/esp8266/lib/VERSION
|
I am trying to setup the wireless camera over 2.4ghz access point on 3200ACM running openwrt r6302/r6365 using the latest driver on 3200ACM with all the possible encryption and channels but it just fails after authentication and hence dhcp is unable to detect and allocate an IP to it. Here are the logs that I observed on various settings.
After allocating static ip:
At first I though it was an issue with dnsmasq, but then I was able to connect the camera with radio2 over 2.4ghz.
The text was updated successfully, but these errors were encountered: