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
ENC28J60: dns resolve fails after few minutes uptime #54199
Comments
Hi @joelguittet, Can you describe you network configuration please? (DHCP/IP static adress/DNS entries..) |
Hello @RomainPelletant Sure. I have DHCPv4 activated; no static IP addres. DNS server is the local router (properly shown in the shell) at 192.168.1.1. I just ran the dns_resolve sample on an other board (with no enc28j60 so the config is much different). It's properly working.
But the documentation at https://docs.zephyrproject.org/latest/connectivity/networking/api/dns_resolve.html do not really explains the details of the CONFIG. Just to check the KConfig which is not enough I think. I should maybe play with these settings, right ? Regards, |
If I am not wrong, DHCP shall add the right DNS entry (in your case 192.168.1.1).
Using the IP directly is working? |
Seems this help, but after a quick moment, then I'm no more able to query DNS resolution. Using the shell, timeout or -11 error is reported. I will try to use some configuration settings from the dns_resolve sample. |
Using configuration of the DNS from dns_resolve sample I got the same result: DNS resolution working at the beginning, but failing after few minutes. Maybe it's due to enc28j60 driver ? Don't know how to determine this :-( |
Hi @joelguittet |
I'd check if the DNS server address does not get corrupted somehow (you can list configured servers with Otherwise, if it's a driver issue, I'm not really of much use as I don't have experience with that particular one. Are you able to send any other packets when DNS starts to malfunction (for example with |
Hello
Note: When I opened the ticket the issue occurred 1 minute after uptime. But it seems to be generally 3 or 4 minutes after uptime. It seems the issue is related to the ENC28J60 driver but it's strange I'm the first to report it. Isn't it ? Or maybe it is not used a lot ? I should receive an ESP01 module soon, I will check with this module if I get the error with my hardware and my application, this will confirm (or not) if this is due to enc28j60 driver. Joel |
Hello I have build and ran my application on stm32f746g_disco board, which has RMII LAN8742A Ethernet PHY without any issue. The difference is only the Ethernet PHY. The configuration used was the same (DHCPv4, dynamic DNS address...) We can conclude this is an issue with the ENC28J60 driver. I'm updating the first post of this thread to indicate this. Joel |
Unfortunately this driver is currently unmaintained, so we need a volunteer to step up and provide a fix. Unassigning @rlubos since he is the maintainer of the networking stack and not individual drivers. |
@carlescufi no problem I understand this. Will try W5500 and ESP01 as a replacement for my project. I'm not enough experienced with zephyr to start this kind of deep debugging on the networking parts :-) |
@joelguittet FYI i am using eth_enc424j600 without any DNS issues |
Thanks @RomainPelletant I just received this afternoon a W5500 module. Wired, reconfigured in the dts. Working. No modification of the app again. This is a double confirmation enc28j60 has issues. |
I briefly tested it on nRF52840DK today. I used zperf sample ( |
This issue has been marked as stale because it has been open (more than) 60 days with no activity. Remove the stale label or add a comment saying that you would like to have the label removed otherwise this issue will automatically be closed in 14 days. Note, that you can always re-open a closed issue at any time. |
Hello Working with W5500 interface since several months now I realize I now get some issues (my application is growing...) As a consequence only a single socket can be used at a time. Driver to be reworked to permit offloading the sockets instead of just using the first socket in a raw-access mode. Joel |
This is ingenious causal inference. |
This issue has been marked as stale because it has been open (more than) 60 days with no activity. Remove the stale label or add a comment saying that you would like to have the label removed otherwise this issue will automatically be closed in 14 days. Note, that you can always re-open a closed issue at any time. |
@jfischer-no are you planning to work on this? (it's getting the Stale label auto-added) |
#54199 (comment) |
Ok, let’s close this then |
Describe the bug
I'm running an HTTP client application on STM32L4A6 Nucleo board + ENC28J60 module.
After few minutes, the DNS resolve fails to query addresses. I have observed this in my application but also in the console just doing
net dns query google.fr
plenty of time up to the first failure, which occurs after few minutes only after starting the application.In my application
getaddrinfo
function returns error code -101.My prj.conf particularly contains:
To Reproduce
Steps to reproduce the behavior:
net dns query google.fr
Expected behavior
DNS resolution working.
Impact
Blocking the development.
Logs and console output
In the console and after activating debug logs I see it is because of timeout:
Environment (please complete the following information):
Additional context
DHCPv4 activated, no IPv6.
IP address is provided by the local router. DNS is provided at the same time, it's the local router (192.168.1.1) and the command
net dns
properly show the DNS address before and after the issue occurs.Before the issue occur it is possible to do some ping in the console. After the issue occurs pings in the console fails with timeout.
The same application has been executed on stm32f746g_disco board (RMII Ethernet PHY) with no issues => the problem comes from ENC28J60 support.
Thanks for any support,
Joel
The text was updated successfully, but these errors were encountered: