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

[E][WiFiGeneric.cpp:641] hostByName(): DNS Failed for CE #1595

Closed
wegunterjr opened this issue Jul 4, 2018 · 6 comments
Closed

[E][WiFiGeneric.cpp:641] hostByName(): DNS Failed for CE #1595

wegunterjr opened this issue Jul 4, 2018 · 6 comments

Comments

@wegunterjr
Copy link

wegunterjr commented Jul 4, 2018

Hardware:

Board: ESP32 Dev Module
Core Installation/update date: version 3.5.4/ says most up to date (Seems wrong?)
IDE name: Platform.io
Flash Frequency: 40Mhz
Upload Speed: 115200

Description:

Not sure what is happening, but this is the error I am getting:

[E][WiFiGeneric.cpp:641] hostByName(): DNS Failed....
`

I think it has to do with calling WiFi.begin(sid, pwd), but wanted to verify..

@jontay81
Copy link

Hardware:
Boards: Adafruit Feather ESP32, HiLetgo ESP32 Dev Board
Core Installation/update date: July 7. 2018 install date
IDE name: VSCode / Arduino Extension
Flash Frequency: 80Mhz
Upload Speed: 115200

Description:
Having this same error when scanning for BLE signals then issuing a POST request over WiFi to a LAN server with DNS setup through my router.

It occurs intermittently - somewhere between 1 and 4 hours after reset. After one occurrence, the error occurs every time the device attempts a POST request.

Haven't tested on an internet DNS lookup or using a LAN IP address yet.

[V][HTTPClient.cpp:140] beginInternal(): url: http://dev-wifi:3100/api/beacon
[D][HTTPClient.cpp:181] beginInternal(): host: dev-wifi port: 3100 url: /api/beacon
[E][WiFiGeneric.cpp:659] hostByName(): DNS Failed for dev-wifi
[D][HTTPClient.cpp:846] connect(): failed connect to dev-wifi:3100
[W][HTTPClient.cpp:1124] returnError(): error(-1): connection refused

I suppose there's a way to catch the error and reset the wifi connection that might work. I'll update this if I find a workaround.

@copercini
Copy link
Contributor

I'm also getting it during or after BLE scans

@copercini
Copy link
Contributor

This seems to happen here when a task has a priority too high (over 4) or may the wifi code isn't pinned to arduino core

@copercini
Copy link
Contributor

I think I found the problem: there is a task that handle the hostByName() command here

This task has priority 2, so if you create other tasks with more priority, the reported bug will appear

@roger-zacharczyk
Copy link

Having the same issue despite the update. The message "STA IP..., GW... " is logged, though, so it gets all the addresses needed.

@roger-zacharczyk
Copy link

Nevermind that. I passed "http://hostname" instead of just "hostname".

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

4 participants