SDK / HW info:
- nRF Connect SDK v3.3.0 (migrating to 3.4.0_LTS soon)
- Modem firmware: mfw_nrf91x1_2.0.4
- Boards: nRF9151 DK + custom nrf9151 board which uses a very similar skimmed devicetree to nrf9151dk (both .../nrf9151/ns)
What we're trying to do: A UART-to-cellular gateway where each command carries a single caller-supplied timeout (1–180s)
meant to bound the whole operation (resolve → connect → send/recv) end-to-end. send()/recv() are correctly bounded via
SO_SNDTIMEO/SO_RCVTIMEO. The DNS step (getaddrinfo(), offloaded via nrf9x_socket_offload_getaddrinfo() straight into
nrf_getaddrinfo()) has no such bound.
As getaddrinfo() is used to create a socket it is logical that a SO*TIMEO is not usable.
Questions:
1. Any supported way (AT command / nrf_setsockopt() option / Kconfig) to bound nrf_getaddrinfo()'s worst-case blocking time?
2. If not, a documented/typical worst-case to design around?
3. If genuinely unbounded today, is a timeout option planned, or is app-level work-queue + watchdog (accepting the modem
call itself can't be cancelled) the recommended pattern?
Current workaround: run it on our own work queue with a generous task-watchdog backstop purely to catch a truly stuck call
(reboot recovery) — not a real bound, since we can't cancel nrf_getaddrinfo() itself.