Skip to content
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

[TW#25966] Static IP, STA Gateway: 0.0.0.0 #2344

Closed
Si03 opened this issue Aug 28, 2018 · 0 comments
Closed

[TW#25966] Static IP, STA Gateway: 0.0.0.0 #2344

Si03 opened this issue Aug 28, 2018 · 0 comments

Comments

@Si03
Copy link

Si03 commented Aug 28, 2018

Environment

  • Development Kit: ESP32-Wroom 32 clone

Problem Description

Historically (and on ESP8266 non-os) we set gateway to 0.0.0.0 on a closed network, however ESPIDF does not allow this. IDF checks that ip, gw and nm are not IPADDR_ANY (=0, =0.0.0.0) here
This blocks the event: 'SYSTEM_EVENT_STA_GOT_IP', and skips the check for IP changed.

Expected Behavior

I believe that gateway 0.0.0.0 is valid and should be permitted. What else can we set if there is no network gateway?

Actual Behavior

Setting static IP with a default gateway of 0.0.0.0 causes 'invalid static ip' and skips event: 'SYSTEM_EVENT_STA_GOT_IP', network connectivity fails.
Making a change here to remove the ...|| ip4_addr_isany_val(sta_ip.gw)... seems to work fine.

Steps to reproduce

as above.

@FayeY FayeY changed the title Static IP, STA Gateway: 0.0.0.0 [TW#25966] Static IP, STA Gateway: 0.0.0.0 Sep 2, 2018
@igrr igrr closed this as completed in 770e413 Sep 11, 2018
catalinio pushed a commit to catalinio/pycom-esp-idf that referenced this issue Jun 28, 2019
0xFEEDC0DE64 pushed a commit to 0xFEEDC0DE64/esp-idf that referenced this issue May 5, 2021
…#2344)

Pin 2 is not found on the [Adafruit docs](https://learn.adafruit.com/adafruit-huzzah32-esp32-feather) for this board and 33 was suggested in espressif#1586 as a fix. I've tried this locally on my board and it is working correctly.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant