<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://devzone.nordicsemi.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>How to get both Ethernet and Cellular interfaces working with Zephyr MQTT Client on an nRF9151DK, and how to use getaddrinfo on a specific interface?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/121735/how-to-get-both-ethernet-and-cellular-interfaces-working-with-zephyr-mqtt-client-on-an-nrf9151dk-and-how-to-use-getaddrinfo-on-a-specific-interface</link><description>Hello Nordic team, 
 After many hours I have not been able to get socket dispatching working with Zephyrs MQTT client, and I am not sure how to proceed. 
 First of all I would like to ask if, since that post was made (about a year ago), anything has changed</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 30 Sep 2025 22:53:45 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/121735/how-to-get-both-ethernet-and-cellular-interfaces-working-with-zephyr-mqtt-client-on-an-nrf9151dk-and-how-to-use-getaddrinfo-on-a-specific-interface" /><item><title>RE: How to get both Ethernet and Cellular interfaces working with Zephyr MQTT Client on an nRF9151DK, and how to use getaddrinfo on a specific interface?</title><link>https://devzone.nordicsemi.com/thread/550271?ContentTypeID=1</link><pubDate>Tue, 30 Sep 2025 22:53:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:21e920fc-ece3-466c-892d-a8ea6ddf88b4</guid><dc:creator>dheadrick</dc:creator><description>&lt;p&gt;I wanted to follow up on this and inform any future readers that this issue has been resolved now.&lt;br /&gt;&lt;br /&gt;Socket offloading can now be enabled and disabled at runtime using the following functions from the&amp;nbsp;&lt;pre class="ui-code" data-mode="text"&gt;zephyr/net/socket_offload.h&lt;/pre&gt; file&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;void socket_offload_dns_enable(bool enable)
{
	dns_offload_enabled = enable;
}

bool socket_offload_dns_is_enabled(void)
{
	return (dns_offload != NULL) &amp;amp;&amp;amp; dns_offload_enabled;
}&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to get both Ethernet and Cellular interfaces working with Zephyr MQTT Client on an nRF9151DK, and how to use getaddrinfo on a specific interface?</title><link>https://devzone.nordicsemi.com/thread/538301?ContentTypeID=1</link><pubDate>Thu, 05 Jun 2025 17:33:29 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:838e58be-9d0e-4b8b-be93-a76a953ae716</guid><dc:creator>dheadrick</dc:creator><description>&lt;p&gt;Ineed this appears to be an involved challenge. There seems to be a larger issue around this than just my use case, as the fact that both the Zephyr DNS and Zephyr MQTT libraries do not work with the socket dispatcher has, and likely will continue, to cause many headaches for a variety of developers until it is resolved.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I have just made a post on the Zephyr Discord server, in the &amp;#39;nordic&amp;#39; channel.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Please let me know if you come across a solution, or others facing a similar issue, as this is the largest critical roadblock in our project now.&amp;nbsp;&amp;nbsp;&lt;br /&gt;&lt;br /&gt;Thank you.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to get both Ethernet and Cellular interfaces working with Zephyr MQTT Client on an nRF9151DK, and how to use getaddrinfo on a specific interface?</title><link>https://devzone.nordicsemi.com/thread/538240?ContentTypeID=1</link><pubDate>Thu, 05 Jun 2025 13:50:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3cfaee18-702a-4f0d-9c9f-eaf7be4ae032</guid><dc:creator>Michal</dc:creator><description>&lt;p&gt;Hello.&lt;/p&gt;
&lt;p&gt;I have been looking more into it with the help of my colleagues and looks like I was quite naive about it.&lt;/p&gt;
&lt;p&gt;What I&amp;#39;d personally recommend is checking with the &lt;a href="https://discord.com/invite/Ck7jw53nU2"&gt;Zephyr discord server&lt;/a&gt;, especially since the MQTT library is technically a part of Zephyr as a whole, and not just NCS.&lt;/p&gt;
&lt;p&gt;That&amp;#39;s probably the most likely place to encounter people that had a similar issue and possibly a solution.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Michal&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to get both Ethernet and Cellular interfaces working with Zephyr MQTT Client on an nRF9151DK, and how to use getaddrinfo on a specific interface?</title><link>https://devzone.nordicsemi.com/thread/537725?ContentTypeID=1</link><pubDate>Mon, 02 Jun 2025 17:00:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:08b196a2-4ca0-4230-b400-20278ea60f9e</guid><dc:creator>dheadrick</dc:creator><description>&lt;p&gt;Just to provide an update:&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I tried replacing the getaddrinfo() function with an implemenation of the DNS resolver equivalent function: &amp;#39;dns_get_addr_info()&amp;#39;, with no success. It appears any attempt to use DNS relies on internal sockets, which do not obey a defined interface and cannot be configured for use in a project which uses the socket dispatcher....&amp;nbsp;&lt;br /&gt;&lt;br /&gt;Please let me know how we may continue forward with this issue, as this is critical for our products success.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Thank you&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to get both Ethernet and Cellular interfaces working with Zephyr MQTT Client on an nRF9151DK, and how to use getaddrinfo on a specific interface?</title><link>https://devzone.nordicsemi.com/thread/537014?ContentTypeID=1</link><pubDate>Mon, 26 May 2025 18:13:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1129cf69-82de-4cbb-bc90-36da38e0574a</guid><dc:creator>dheadrick</dc:creator><description>&lt;p&gt;Hello Michal, could you please elaborate on what issue this solves, and if possible, provide an example? I am not sure how the use of a Connection Manager solves any of my problems. &lt;br /&gt;&lt;br /&gt;The two main issues I am having are: &lt;br /&gt;1. DNS not working with specific interfaces when socket offloading is selected (and socket offloading is required for use of the internal modem AFAIK).&lt;/p&gt;
&lt;p&gt;2. Custom implementation of MQTT transport layer not working - and no examples or references available online to help me troubleshoot.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to get both Ethernet and Cellular interfaces working with Zephyr MQTT Client on an nRF9151DK, and how to use getaddrinfo on a specific interface?</title><link>https://devzone.nordicsemi.com/thread/536785?ContentTypeID=1</link><pubDate>Fri, 23 May 2025 12:57:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bbfa1f18-081a-4cb3-94f0-38795355679f</guid><dc:creator>Michal</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;Have you looked at &lt;a href="https://docs.nordicsemi.com/bundle/ncs-2.9.1/page/zephyr/connectivity/networking/conn_mgr/index.html"&gt;Connection Manager&lt;/a&gt; in Zephyr? I think several other customers have been successful using that.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Michal&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>