zephyr: [Zephyr 3.7 RC2] DNS resolution on HL7800 modem doesn't work

Describe the bug Previously, mqtt was working with hl7800 with zehyr3.6.0. After migration, i started getting this error:

Any thought?

CONNECT
[00:03:42.410,000] <dbg> modem_hl7800:  HANDLE CONNECT (len:0)
[00:03:42.410,000] <dbg> modem_hl7800: sock_read: Socket 1 RX 192 bytes
[00:03:42.410,000] <dbg> modem_hl7800: wait_for_modem_data: cur:0, exp:1
[00:03:42.460,000] <dbg> modem_hl7800: sock_read: Processing RX, buf len: 234
[00:03:42.461,000] <dbg> modem_hl7800: sock_read: Got all data, get EOF and OK (buf len:42)
[00:03:42.461,000] <dbg> modem_hl7800: sock_read: Sock 1 RX done
[00:03:42.461,000] <dbg> modem_hl7800: allow_sleep: Keep sleep
+KUDP_RCV: "10.105.16.254",53
[00:03:42.461,000] <dbg> modem_hl7812:  UNHANDLED RX IN2
                                       2b 4b 55 44 50 5f 52 43  56 3a 20 22 31 30 2e 31 |+KUDP_RC V: "10.1
                                       30 35 2e 31 36 2e 32 35  34 22 2c 35 33          |05.16.25 4",53   
[00:03:42.461,000] <dbg> modem_hl7812: sockreadrecv_cb_work: Sock 1 RX CB (size: 220)
[00:03:46.590,000] <err> mqtt_helper: getaddrinfo() failed, error -101
[00:03:46.590,000] <err> aws_iot: mqtt_helper_connect, error: 101
[00:03:46.590,000] <err> aws_iot_integration: aws_iot_connect, error: 101
[00:03:46.590,000] <err> cloud_module: cloud_connect failed, error: 101
[00:03:46.590,000] <dbg> cloud_module: connect_cloud: Cloud connection establishment in progress
[00:03:46.590,000] <dbg> cloud_module: connect_cloud: New connection attempt in 32 seconds if not successful

more info:

CONNECT
[00:01:59.174,000] <dbg>  modem_rx: HANDLE CONNECT (len:0)
[00:01:59.433,000] <dbg>  send_data: Sent 64 bytes
OK
[00:01:59.444,000] <dbg>  modem_rx: HANDLE OK (len:0)
[00:01:59.444,000] <dbg>  allow_sleep: Keep sleep
[00:01:59.445,000] <dbg> net_sock_addr: exec_query: 149 getaddrinfo.c
+KUDP_DATA: 1,192
[00:02:00.532,000] <dbg>  modem_rx: HANDLE +KUDP_DATA:  (len:5)
[00:02:00.532,000] <dbg>  allow_sleep: Keep awake
[00:02:00.532,000] <dbg>  allow_sleep_with_timeout: Keep awake
[00:02:00.532,000] <dbg>  is_cmd_ready: 265 LOWPOWER VGPIO:1 GPIO6:1 UART_CTS:0
[00:02:00.532,000] <dbg>  start_socket_rx: Start socket RX ID:1 size:192
[00:02:00.532,000] <dbg>  send_at_cmd: OUT: [AT+KUDPRCV=1,192]
CONNECT
[00:02:00.543,000] <dbg>  modem_rx: HANDLE CONNECT (len:0)
[00:02:00.543,000] <dbg>  sock_read: Socket 1 RX 192 bytes
[00:02:00.543,000] <dbg>  wait_for_modem_data: cur:0, exp:1
[00:02:00.594,000] <dbg>  sock_read: Processing RX, buf len: 234
[00:02:00.594,000] <dbg>  sock_read: Got all data, get EOF and OK (buf len:42)
[00:02:00.594,000] <dbg>  sock_read: Sock 1 RX done
[00:02:00.594,000] <dbg>  allow_sleep: Keep sleep
+KUDP_RCV: "10.105.16.254",53
[00:02:00.594,000] <dbg>  modem_rx: UNHANDLED RX IN2
                                       2b 4b 55 44 50 5f 52 43  56 3a 20 22 31 30 2e 31 |+KUDP_RC V: "10.1
                                       30 35 2e 31 36 2e 32 35  34 22 2c 35 33          |05.16.25 4",53   
[00:02:00.594,000] <dbg>  sockreadrecv_cb_work: Sock 1 RX CB (size: 220)
[00:02:00.594,000] <dbg> net_sock: zsock_received_cb: (hl7812_workq): ctx=0x2000d308, pkt=0x2004e1fc, st=0, user_data=(nil)
[00:02:00.692,000] <dbg> net_sock: zsock_recv_dgram: (net_socket_service): sock_get_offload_pkt_src_addr -134
[00:02:00.692,000] <err> net_dns_dispatcher: recv failed on IPv4 socket (134)
[00:02:00.692,000] <err> net_dns_dispatcher: DNS recv error (-134)
[00:02:01.067,000] <dbg>  allow_sleep: Keep awake
[00:02:01.067,000] <dbg>  allow_sleep_with_timeout: Keep awake
[00:02:01.067,000] <dbg>  is_cmd_ready: 265 LOWPOWER VGPIO:1 GPIO6:1 UART_CTS:0
[00:02:01.067,000] <dbg>  send_at_cmd: reset iface_ctx.response_sem: 0
[00:02:01.067,000] <dbg>  send_at_cmd: OUT: [AT+CCLK?]
[00:02:01.068,000] <dbg>  send_at_cmd: SEND ATCMD k_sem_take RET01: 0
+CCLK: "24/07/03,22:53:21+08"
[00:02:01.072,000] <dbg>  modem_rx: HANDLE +CCLK:  (len:22)
[00:02:01.072,000] <dbg>  wait_for_modem_data: cur:23, exp:25
[00:02:01.123,000] <inf>  RTC string: '"24/07/03,22:53:21+08"'
OK
[00:02:01.123,000] <dbg>  modem_rx: HANDLE OK (len:0)
[00:02:01.176,000] <dbg>  allow_sleep: Keep sleep
[00:02:01.176,000] <dbg>  mdm_hl7812_get_local_time: TM: yr: 124 mon: 6 hr: 22
[00:02:04.160,000] <dbg> net_dns_resolve: query_timeout: (sysworkq): Query timeout DNS req 27295 type 1 hash 2247
[00:02:04.160,000] <dbg> net_dns_resolve: dns_resolve_cancel_with_hash: (sysworkq): Cancelling DNS req 27295 (name xxxxxxats.iot.eu-west-1.amazonaws.com type 1 hash 2247)
[00:02:04.160,000] <dbg> net_sock_addr: dns_resolve_cb: (sysworkq): dns status: -101
[00:02:04.160,000] <dbg> net_sock_addr: exec_query: 161 getaddrinfo.c
[00:02:04.160,000] <dbg> net_sock_addr: exec_query: 163 getaddrinfo.c
[00:02:04.160,000] <dbg> net_sock_addr: exec_query: 137 getaddrinfo.c
[00:02:04.160,000] <dbg> net_sock_addr: exec_query: (cloud_module_thread): Timeout 5000
[00:02:04.160,000] <dbg> net_dns_resolve: dns_resolve_name: (cloud_module_thread): DNS id will be 27089
[00:02:04.160,000] <dbg> net_dns_resolve: dns_write: (cloud_module_thread): [0] submitting work to server idx 0 for id 27089 hash 2247
[00:02:04.160,000] <dbg>  offload_recv: offload_recv
[00:02:04.160,000] <dbg>  offload_sendto: offload_sendto
[00:02:04.160,000] <dbg>  allow_sleep: Keep awake
[00:02:04.160,000] <dbg>  allow_sleep_with_timeout: Keep awake
[00:02:04.160,000] <dbg>  is_cmd_ready: 265 LOWPOWER VGPIO:1 GPIO6:1 UART_CTS:0
[00:02:04.160,000] <dbg>  send_at_cmd: OUT: [AT+KUDPSND=1,"10.105.16.254",53,64]
CONNECT
[00:02:04.174,000] <dbg>  modem_rx: HANDLE CONNECT (len:0)
[00:02:04.308,000] <dbg>  send_data: Sent 64 bytes
OK
[00:02:04.315,000] <dbg>  modem_rx: HANDLE OK (len:0)
[00:02:04.315,000] <dbg>  allow_sleep: Keep sleep
[00:02:04.315,000] <dbg> net_sock_addr: exec_query: 149 getaddrinfo.c
+KUDP_DATA: 1,192
[00:02:05.333,000] <dbg>  modem_rx: HANDLE +KUDP_DATA:  (len:5)
[00:02:05.333,000] <dbg>  allow_sleep: Keep awake
[00:02:05.333,000] <dbg>  allow_sleep_with_timeout: Keep awake
[00:02:05.333,000] <dbg>  is_cmd_ready: 265 LOWPOWER VGPIO:1 GPIO6:1 UART_CTS:0
[00:02:05.333,000] <dbg>  start_socket_rx: Start socket RX ID:1 size:192
[00:02:05.333,000] <dbg>  send_at_cmd: OUT: [AT+KUDPRCV=1,192]
CONNECT
[00:02:05.345,000] <dbg>  modem_rx: HANDLE CONNECT (len:0)
[00:02:05.345,000] <dbg>  sock_read: Socket 1 RX 192 bytes
[00:02:05.345,000] <dbg>  wait_for_modem_data: cur:0, exp:1
[00:02:05.395,000] <dbg>  sock_read: Processing RX, buf len: 234
[00:02:05.395,000] <dbg>  sock_read: Got all data, get EOF and OK (buf len:42)
[00:02:05.395,000] <dbg>  sock_read: Sock 1 RX done
[00:02:05.395,000] <dbg>  allow_sleep: Keep sleep
+KUDP_RCV: "10.105.16.254",53
[00:02:05.395,000] <dbg>  modem_rx: UNHANDLED RX IN2
                                       2b 4b 55 44 50 5f 52 43  56 3a 20 22 31 30 2e 31 |+KUDP_RC V: "10.1
                                       30 35 2e 31 36 2e 32 35  34 22 2c 35 33          |05.16.25 4",53   
[00:02:05.395,000] <dbg>  sockreadrecv_cb_work: Sock 1 RX CB (size: 220)
[00:02:05.395,000] <dbg> net_sock: zsock_received_cb: (hl7812_workq): ctx=0x2000d308, pkt=0x2004e1fc, st=0, user_data=(nil)
[00:02:05.486,000] <dbg> net_sock: zsock_recv_dgram: (net_socket_service): sock_get_offload_pkt_src_addr -134
[00:02:05.486,000] <err> net_dns_dispatcher: recv failed on IPv4 socket (134)
[00:02:05.486,000] <err> net_dns_dispatcher: DNS recv error (-134)
[00:02:09.160,000] <dbg> net_dns_resolve: query_timeout: (sysworkq): Query timeout DNS req 27089 type 1 hash 2247
[00:02:09.160,000] <dbg> net_dns_resolve: dns_resolve_cancel_with_hash: (sysworkq): Cancelling DNS req 27089 (name xxxxxxxxxxxxxxxx-ats.iot.eu-west-1.amazonaws.com type 1 hash 2247)
[00:02:09.160,000] <dbg> net_sock_addr: dns_resolve_cb: (sysworkq): dns status: -101
[00:02:09.160,000] <dbg> net_sock_addr: exec_query: 161 getaddrinfo.c
[00:02:09.160,000] <dbg> net_sock_addr: exec_query: 163 getaddrinfo.c
[00:02:09.160,000] <dbg> net_sock_addr: z_impl_z_zsock_getaddrinfo_internal: 290 getaddrinfo.c
[00:02:09.160,000] <dbg> net_sock_addr: z_impl_z_zsock_getaddrinfo_internal: 300 getaddrinfo.c
[00:02:09.160,000] <dbg> net_sock_addr: z_impl_z_zsock_getaddrinfo_internal: 305 getaddrinfo.c
[00:02:09.160,000] <dbg> net_sock_addr: zsock_getaddrinfo: 480 getaddrinfo.c
[00:02:09.160,000] <err> mqtt_helper: getaddrinfo() failed, error -101
[00:02:09.160,000] <dbg> mqtt_helper: mqtt_state_set: Skipping transition to the same state (MQTT_STATE_DISCONNECTED)
[00:02:09.160,000] <err> aws_iot: mqtt_helper_connect, error: 101
[00:02:09.160,000] <err> aws_iot_integration: aws_iot_connect, error: 101
[00:02:09.160,000] <err> cloud_module: cloud_connect failed, error: 101
[00:02:09.160,000] <dbg> cloud_module: connect_cloud: Cloud connection establishment in progress
[00:02:09.160,000] <dbg> cloud_module: connect_cloud: New connection attempt in 32 seconds if not successful

Please also mention any information which could help others to understand the problem you’re facing:

  • What target platform are you using?
  • custom board combination of HL7800 and stm32u575 zephyr main branch

To Reproduce Steps to reproduce the behavior: because I am working on custom board, I cant exactly provide steps to reproduce it.

Expected behavior at 3.6.0 version, I had succesfull getaddrinfo return and mqtt connection

Environment (please complete the following information):

  • OS: Windows
  • Toolchain Zephyr SDK 0.16.5
  • Commit SHA or Version used

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 16 (16 by maintainers)

Most upvoted comments

I have reproduced the dns issue with the http get sample. Patch: hl7800_http_get.patch Log: http_get_3.7.0-rc2.log

It seems the socket packet source address may not be set correctly due to a change in the stack. @jukkar any tips?

@rerickson1

Thanks for the logs, could you share the sample app so I can try to reproduce?

cellular_hl7800-git.zip

this is exactly what i was doing for you 😃

@jukkar can I get the label platform: Laird Connectivity changed to platform: Ezurio. Laird Connectivity is no longer valid because we have renamed the company.