This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Socket recvfrom() doesn't fill out address buffer

I have an application using the nRF9160 and its LTE modem to connect to a LWM2M server. During some debugging I enabled LWM2M_LOG_LEVEL_DBG and saw that I consistently got an error:

[00:07:53.415,954] <err> net_lwm2m_engine: Unknown IP address family:0
[00:07:53.416,015] <dbg> net_lwm2m_engine: lwm2m_udp_receive: checking for reply from [unk]

After checking some more and posting an issue on Zephyr GitHub I was informed that the problem lies with NCS, and that recvfrom() doesn't fill out the source address as it should. Therefore, later the error is produced, because the variable from_addr is never filled out correctly.

I was told that this was a known issue within the NCS socket implementation. Is this something that is solved or being worked on?

This is not code breaking in any way, but quite annoying getting it in the log all the time.

I am using NCS 1.8.0 and Modem 1.3.1.

Regards,

Andreas Pettersson

  • Hi Andreas,

    Basically, this is not a bug but rather a limitation of the Modem. nRF9160 modem firmware does not support sendto operation for TLS/DTLS sockets at the bottom level, while this step is conducted by the net_lwm2m_engine maintained by the Zephyr project from the application side, so you get this error to repot from debugging information.There should be no influence on the MQTT transmission between your client and server.

    Currently, we are working on some other higher priority tasks but we do have a plan to investigate this limitation further. Thanks for reporting this to us! 

    Best regards,

    Charlie

  • Hi,

    OK, thanks, good that you have it in the backlog!

    /Andreas

Related