Arduino
Arduino copied to clipboard
ESP8266 can't get DHCP IP addres from Asus router
Hi,
I have a problem described below. Is there any solution?
Platform
- Hardware: ESP8266-12F
- Core Version: Any higher then 2.5.2
- Development Env: Arduino IDE
- Operating System: Windows 10
Settings in IDE
- Module: Wemos D1 R2 & mini
- Flash Mode:
- Flash Size: 4MB no SPIFFS
- lwip Variant: v2 Lower Memory
- Reset Method:
- Flash Frequency:
- CPU Frequency: 80Mhz
- Upload Using: SERIAL
- Upload Speed: 912600
Problem Description
I use Wemos D1 mini R2 with Arduino core for ESP8266. With any core version higher than 2.5.2 ESP can't get DHCP IP address from ASUS RT-AX86U router (although according to debug data it succesfully connects to wifi).
When I revert back to core 2.5.2 or 2.5.0 ESP sucessfully connects to Asus router and gets IP address. Is it known issue?
Regards
Any comment pls?
Not really a helpful reply from me, but I am quite curious to see an answer, as it is reported often by users of my software too.
Any core higher then 2.5.2 is useless with asus routers :( I stay with 2.5.
Well it seems also to depend on the firmware of those Asus routers, as reported by some. (I don't have Asus routers here)
Well it seems also to depend on the firmware of those Asus routers, as reported by some. (I don't have Asus routers here)
Thx. I'll pay attention when new asus' fws will be releasing.
It was more like downgrade made it work (again), but I have no idea what specific router it was.
@cniedzi
Any core higher then 2.5.2 is useless with asus routers :( I stay with 2.5.
With latest release, can you try, in the tools menu:
-
- to select generic esp8266 board
-
- then select firmware version "nonos-sdk 2.2.1 (legacy)"
-
- flash and report
Did you also try to flash OpenWrt on your asus router ?
@cniedzi
Any core higher then 2.5.2 is useless with asus routers :( I stay with 2.5.
With latest release, can you try, in the tools menu:
- to select generic esp8266 board
- then select firmware version "nonos-sdk 2.2.1 (legacy)"
- flash and report
Did you also try to flash OpenWrt on your asus router ?
Hi, thx for reply. nonos-sdk 2.2.1 (legacy) doesn't work for me with the latest release.
I didn't try OpenWrt because I use Mesh system.
Regards
Hi @cniedzi ,
I have an ASUS Rt-AC86U running Merlin firmware. My IoT device runs tasmota wit Arduino Core 2.7.4.9 and I have the same problem with DHCP addresses. I took a trace on the router and I can clearly see that the device ignores the DHCP offer from the router, sp111_trace_NOK.zip
#8319 may fix this issue (follow the links for explanations). It is not merged yet into master branch but will be soon. In the meantime, any report about it is welcome (by merging the PR or by using the alpha version 0.0.2 board manager installer for the Arduino IDE).
Having the same issue with tasmota zbridge connecting to a ASUS RT-AX88U running wrt-merlin. The bridge required several manual power cycles after a reboot before it would reconnect to wifi. Following the guide below and another forum post, once "Wi-Fi Agile Multiband" was disabled on the 2.4 band the issue completely dissapeared.
https://www.asus.com/us/support/FAQ/1042475
Setting the IP on the device will probably be a better short term solution but maybe this info will help someone else until the fix above is implemented.
@movodos we have a test version of Tasmota available with the fix Please join the discussion and test at https://github.com/arendst/Tasmota/discussions/13623
Tasmota 10.0.0.2 test version with #8319 fix did not help. I still have the same DHCP issues on my ASUS router. Trace attached. esp8266_trace.zip .
Hi, any news about this issue? Core 3.0.2 still doesn't work for me :( PS. Sometimes I am able to sucessfully connect to Asus router, most often just after uploading new sketch.
Hi, any news about this issue? Core 3.0.2 still doesn't work for me :(
There are suggestions after your last message that we'd like to have reports about.
Hi, any news about this issue? Core 3.0.2 still doesn't work for me :(
There are suggestions after your last message that we'd like to have reports about.
I've tried Alpha board manager and to install 0.0.2 core but there were errors during uploading sketch (for normal releases everyting goes fine). Should I set something in addition?
Arduino: 1.8.19 (Windows 10), Board: "LOLIN(WEMOS) D1 mini Pro, Sketch, Off, Off, 80 MHz, Flash, Disabled (new aborts on oom), Disabled, All SSL ciphers (most compatible), 32KB cache + 32KB IRAM (balanced), Use pgm_read macros for IRAM/PROGMEM, 16MB (FS:14MB OTA:~1019KB), v2 Lower Memory, Disabled, HTTP_UPDATE, Only Sketch, 921600"
Executable segment sizes:
ICACHE : 32768 - flash instruction cache
IROM : 298964 - code in flash (default or ICACHE_FLASH_ATTR)
IRAM : 31497 / 32768 - code in IRAM (IRAM_ATTR, ISRs...)
DATA : 1708 ) - initialized variables (global, static) in RAM/HEAP
RODATA : 3712 ) / 81920 - constants (global, static) in RAM/HEAP
BSS : 27168 ) - zeroed variables (global, static) in RAM/HEAP
Build-Dir: C:\Users\Czarek\AppData\Local\Temp\arduino_build_511358
C:\Users\Czarek\AppData\Local\Arduino15\packages\esp8266\tools\python3\3.7.2-post1/python3 -I C:\Users\Czarek\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\0.0.2/tools/upload.py -fi 0 -up 1 --port COM3 --baud 921600 --before default_reset --after hard_reset --sk 0x0 C:\Users\Czarek\AppData\Local\Temp\arduino_build_511358/Sterownik_WiFi.ino.bin --fs 0x200000 C:\Users\Czarek\AppData\Local\Temp\arduino_build_511358/Sterownik_WiFi.ino
Port: 'COM3', does not exist!
...Upload aborted
An error occurred while uploading the sketch
The core 3.0.2-42-gb5f3d1d6 (0.0.1) uploads correctly.
Hi, any suggestions how to install 0.0.2 core?
0.0.1 and 0.0.2 installation process are similar, unofficial and experimental.
If 0.0.1 installs fine, then 0.0.2 can be installed with the same process.
In doubt or in case of a previous installation, you can quit the IDE, remove arduino15/staging/packages/esp8266-0.0*
and arduino15/packaging/esp8266/hardware/esp8266/0.0*
and retry.
0.0.1 and 0.0.2 installation process are similar, unofficial and experimental. If 0.0.1 installs fine, then 0.0.2 can be installed with the same process. In doubt or in case of a previous installation, you can quit the IDE, remove
arduino15/staging/packages/esp8266-0.0*
andarduino15/packaging/esp8266/hardware/esp8266/0.0*
and retry.
I've done what you suggested - 0.0.1 uploads fine while 0.0.2 with error: "Port: 'COM3', does not exist!". So, I have to wait for official release...
COM port management is managed by the Arduino IDE. To my knowledge this esp8266 Arduino core has no impact on the serial port management and I'm afraid I can't see any reason why 0.0.1 and 0.0.2 should behave differently regarding your COM3 port.
You can try to manually use esptool
:
In the Arduino IDE preference, enable verbose upload, then retry to flash, then copy-pase the esptool command line from the Arduino IDE log window onto a command-line shell, then try to play with the arguments.
In both version 0.0.1 and 0.0.2, esptool is the same.
COM port management is managed by the Arduino IDE. To my knowledge this esp8266 Arduino core has no impact on the serial port management and I'm afraid I can't see any reason why 0.0.1 and 0.0.2 should behave differently regarding your COM3 port.
You can try to manually use
esptool
: In the Arduino IDE preference, enable verbose upload, then retry to flash, then copy-pase the esptool command line from the Arduino IDE log window onto a command-line shell, then try to play with the arguments. In both version 0.0.1 and 0.0.2, esptool is the same.
2.5.0 uses esptool - DOES upload
C:\Users\Czarek\AppData\Local\Arduino15\packages\esp8266\tools\esptool\2.5.0-3-20ed2b9/esptool.exe -vv -cd nodemcu -cb 921600 -cp COM3 -ca 0x00000 -cf C:\Users\Czarek\AppData\Local\Temp\arduino_build_151226/Sterownik_WiFi.ino.bin
0.0.1 uses upload.py instead of esptool - DOES upload
C:\Users\Czarek\AppData\Local\Arduino15\packages\esp8266\tools\python3\3.7.2-post1/python3 -I C:\Users\Czarek\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\0.0.1/tools/upload.py --chip esp8266 --port COM3 --baud 921600 --before default_reset --after hard_reset write_flash 0x0 C:\Users\Czarek\AppData\Local\Temp\arduino_build_391240/Sterownik_WiFi.ino.bin
0.0.2 uses upload.py - DOES NOT upload
C:\Users\Czarek\AppData\Local\Arduino15\packages\esp8266\tools\python3\3.7.2-post1/python3 -I C:\Users\Czarek\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\0.0.2/tools/upload.py -fi 0 -up 1 --port COM3 --baud 921600 --before default_reset --after hard_reset --sk 0x0 C:\Users\Czarek\AppData\Local\Temp\arduino_build_151226/Sterownik_WiFi.ino.bin --fs 0x200000 C:\Users\Czarek\AppData\Local\Temp\arduino_build_151226/Sterownik_WiFi.ino
With 0.0.2 no matter which port I set, "Port: 'COM3', does not exist!". I've sucessfully used esptool for 0.0.2. I have to test it - ESP8266 sometimes connects, sometimes not.
I can say 0.0.1 is more or less the same as 3.0.2 - ESP8266 connects to router after ca. 3-5 min. while 2.5.0 instantly. In both cases WiFi connection is set instantly, but there is a problem with DHCP negotiation for 2.5.0+.
You can now remove 0.0.1 and reinstall it, or try the "git version",
DHCP updates have just been integrated in master branch.
You can now remove 0.0.1 and reinstall it, or try the "git version",
DHCP updates have just been integrated in master branch.
I have installed 3.1.0-dev and it looks promising. I can connect to router similarly to 2.5.0.
EDIT: Looks like I've stated premature opinion :( Sometimes I can connect immediately, somtimes I can't connect at all or I have to wait long time... Still testing.
You can now remove 0.0.1 and reinstall it, or try the "git version",
DHCP updates have just been integrated in master branch.
I have installed 3.1.0-dev and it looks promising. I can connect to router similarly to 2.5.0.
EDIT: Looks like I've stated premature opinion :( Sometimes I can connect immediately, somtimes I can't connect at all or I have to wait long time... Still testing.
It looks promising, but does it worked? Does 3.1.0-dev solved the problem?
Same problem here with AX56U
it seems that the latest version on the master branch completely fixed the problem on my Asus AX56U. I had a the same problem even using my provider's router (Vodafone Station) and it is fixed on that router too.
Congrats guys... is there an ETA for this patch to be released in the next release?
Same problem here, the workaround in issue #8412 (using WiFi.setPhyMode(WIFI_PHY_MODE_11G);
) worked for me.
Thanks, all of my esp8266s have been working fine with my new ASU's xt8 until I had to update one of them ... this 11G solution works just fine! Thanks again!
Same problem here, the workaround in issue #8412 (using
WiFi.setPhyMode(WIFI_PHY_MODE_11G);
) worked for me.