zephyr: ENC28J60: dns resolve fails after few minutes uptime

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:

CONFIG_DNS_RESOLVER=y
CONFIG_DNS_RESOLVER_LOG_LEVEL_DBG=y

To Reproduce Steps to reproduce the behavior:

  1. On nucleo_l4a6 + enc28j60 build a projet with Ethernet support
  2. in the console type 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:

[00:01:08.776,000] <dbg> net_dns_resolve: dns_resolve_name: (): DNS id will be 34471
[00:01:08.776,000] <dbg> net_dns_resolve: dns_write: (): [0] submitting work to server idx 0 for id 34471 hash 24745
[00:01:10.776,000] <dbg> net_dns_resolve: query_timeout: (sysworkq): Query timeout DNS req 34471 type 1 hash 24745
[00:01:10.776,000] <dbg> net_dns_resolve: dns_resolve_cancel_with_hash: (sysworkq): Cancelling DNS req 34471 (name my-server.com type 1 hash 24745)

Environment (please complete the following information):

  • OS: Linux
  • Toolchain: Zephyr SDK
  • I’m actually at zephyr commit ID e9a59518fcbd54f2ee27ea3f190a8fe7bd688f35 (v3.3.0-rc1 tag).

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

About this issue

  • Original URL
  • State: closed
  • Created a year ago
  • Comments: 21 (16 by maintainers)

Most upvoted comments

Working with W5500 interface since several months now I realize I now get some issues (my application is growing…) And the reason is pretty simple and it was probably the root cause of the ENC28J60 issue here : this kind of chip offload the sockets but it’s not integrated in Zephyr using offloading possibilities (see for example eswifi of winc1500 drivers in Zephyr).

This is ingenious causal inference.

@joelguittet FYI i am using eth_enc424j600 without any DNS issues