<?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>LTE and ethernet coexistence</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/107676/lte-and-ethernet-coexistence</link><description>Hi, 
 I am trying to build an application that uses LTE for network access, currently with MQTT towards test.mosquitto.org. Simultaneously I want to use an ethernet device for communication with other (local) devices. This is an spi ethernet, the MCHP</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 20 Feb 2024 12:29:31 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/107676/lte-and-ethernet-coexistence" /><item><title>RE: LTE and ethernet coexistence</title><link>https://devzone.nordicsemi.com/thread/469790?ContentTypeID=1</link><pubDate>Tue, 20 Feb 2024 12:29:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7d20ffc9-01ac-4cd8-b4b5-52ddfd15856d</guid><dc:creator>berulo01</dc:creator><description>&lt;p&gt;Thanks&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/members/gildev"&gt;GilDev&lt;/a&gt;&amp;nbsp;!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: LTE and ethernet coexistence</title><link>https://devzone.nordicsemi.com/thread/469703?ContentTypeID=1</link><pubDate>Tue, 20 Feb 2024 08:33:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b4295176-535b-4fa6-a9a7-b998dbb9e65d</guid><dc:creator>GilDev</dc:creator><description>&lt;p&gt;Hi&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/members/berulo01"&gt;berulo01&lt;/a&gt;&amp;nbsp;,&lt;/p&gt;
&lt;p&gt;We are all kind of trying to achieve the same thing but I think we are on our own on this, Zephyr doesn&amp;rsquo;t fully support multiple interfaces (at least it seems not for every network feature, like getaddrinfo() that is called by the aws_iot lib at least and maybe the mqtt one), nor does Nordic.&lt;/p&gt;
&lt;p&gt;I reply to your GitHub mention here too, feel free to DM if you need to. My need is only one connection or the other, so I implemented my global flag &lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/108023/aws_iot-example-without-network-offloading/467862"&gt;as explained here&lt;/a&gt;. It may help your issue but probably needs to be adapted to Azure and concurrent network interfaces.&lt;/p&gt;
&lt;p&gt;On my end, the whole MBEDTLS lib took so much space (45 kB heap + 6 kB &amp;times; 2 SSL content buffers + much more) even after optimizing everything that we told our client we couldn&amp;rsquo;t do an AWS connection through Ethernet directly for now, and might need a gateway that will be accessible on a private local network through HTTP that will act as a middleman. I really hope in the end I&amp;rsquo;ll be able to make everything fit and work reliably but there are so variables (buffer sizes and such) and complex configuration and secure concepts that I cannot easily estimate this&amp;hellip;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: LTE and ethernet coexistence</title><link>https://devzone.nordicsemi.com/thread/469637?ContentTypeID=1</link><pubDate>Mon, 19 Feb 2024 20:47:30 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:91b4f506-bb0b-4a73-92ae-f009cade726d</guid><dc:creator>berulo01</dc:creator><description>&lt;p&gt;UPDATE:&lt;/p&gt;
&lt;p&gt;I was able to get my above scenario working by doing a setsockopt of SO_BINDTODEVICE in the mqtt lib (used by Azure lib). I just hard-coded this for now.&lt;/p&gt;
&lt;p&gt;Is there already a nice way to pass in specific network interface names into network libs so I can bind sockets to specific network devices? If not, are there any plans to add something for this?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: LTE and ethernet coexistence</title><link>https://devzone.nordicsemi.com/thread/469625?ContentTypeID=1</link><pubDate>Mon, 19 Feb 2024 17:07:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:81a84745-c1f1-4067-839c-9e710026d5a5</guid><dc:creator>berulo01</dc:creator><description>&lt;p&gt;&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/members/michal_5f00_r"&gt;Michal&lt;/a&gt;&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/members/gildev"&gt;GilDev&lt;/a&gt;&amp;nbsp;I am wondering if one of you could help clarify something regarding Socket Offloading and the recent github fix. I have a scenario where I am using nRF9160 LTE to connect to Azure via TLS offloading (i.e., TLS handled in modem), and also an Ethernet device for a local network that is NOT using TLS connections.&lt;/p&gt;
&lt;p&gt;I am able to establish socket connections individually in each case using CONFIG_NET_SOCKETS_OFFLOAD_DISPATCHER, but only the first socket connections works. IOW, if LTE connects via Azure first, the Ethernet socket connection doesn&amp;#39;t connect, and if the Ethernet socket connection comes up first, the LTE socket connection doesn&amp;#39;t connect. My application requires that both connections run simultaneously (coexist) vs just one at a time.&lt;/p&gt;
&lt;p&gt;I am using SO_BINDTODEVICE for the Ethernet socket, but haven&amp;#39;t yet made any changes to the socket connection for Azure (IoT Hub). For Azure, it appears that I need to make an update to the underlying mqtt or mqtt_helper lib to support this.&lt;/p&gt;
&lt;p&gt;Here is where I need some advice...&lt;br /&gt;The updates to the SLM app from &lt;a href="https://github.com/nrfconnect/sdk-nrf/pull/13834"&gt;this PR&lt;/a&gt; seems to indicate that I would only need to make an update to Azure sockets if I am using Native TLS (mbedtls) as TLS_NATIVE is only used in this case. Which made me wonder if my use case is even supported by the Sockets Offload Dispatcher.&lt;br /&gt;&lt;br /&gt;More pointed questions...&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Can I use CONFIG_NET_SOCKETS_OFFLOAD_DISPATCHER with a non-TLS socket + a TLS-offload socket? If so, what are the socket options for both?&lt;/li&gt;
&lt;li&gt;If the answer to #1 is no, will it work if I change the TLS socket to Native (mbedtls)? In this case I am assuming I would just follow what in done in the SML app.&lt;/li&gt;
&lt;li&gt;Why doesn&amp;#39;t the update to the SLM use SO_BINDTODEVICE? The Zephyr &lt;a href="https://github.com/zephyrproject-rtos/zephyr/blob/b2b40169639e0aa8fa27fd8e385f6647b708c71d/doc/connectivity/networking/api/sockets.rst#dealing-with-multiple-offloaded-interfaces"&gt;readme&lt;/a&gt; for Sockets Offload Dispatcher shows using it for this case. I&amp;#39;m assuming this is the missing piece for me -- just add SO_BINDTODEVICE to Azure/mqtt?&lt;/li&gt;
&lt;/ol&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: LTE and ethernet coexistence</title><link>https://devzone.nordicsemi.com/thread/467555?ContentTypeID=1</link><pubDate>Mon, 05 Feb 2024 12:12:28 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:86877d87-6ad8-4f84-8ab5-a4ebba7b2306</guid><dc:creator>Michal</dc:creator><description>&lt;p&gt;This was indeed an oversight and is already being addressed in &lt;a href="https://github.com/nrfconnect/sdk-nrf/pull/13834"&gt;https://github.com/nrfconnect/sdk-nrf/pull/13834&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Thank you for reporting it.&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: LTE and ethernet coexistence</title><link>https://devzone.nordicsemi.com/thread/467018?ContentTypeID=1</link><pubDate>Wed, 31 Jan 2024 19:04:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ad8a476b-0846-4aca-ad58-1dbee62b1253</guid><dc:creator>Michal</dc:creator><description>&lt;p&gt;Thank you for the information, I will look into it with the developers.&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: LTE and ethernet coexistence</title><link>https://devzone.nordicsemi.com/thread/466695?ContentTypeID=1</link><pubDate>Tue, 30 Jan 2024 09:45:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b4718868-bbd8-4861-aa12-ecafafddc183</guid><dc:creator>peran</dc:creator><description>&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/members/knutel"&gt;knutel&lt;/a&gt; thank you so much for your reply! This was very helpful. &lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/members/michal_5f00_r"&gt;Michal&lt;/a&gt; In my search I came across line 1120 in nrf91_sockets.c, where the the socket is registered. This is registered as a not offloaded socket. But the nrf91 should be offloaded, correct? Because it is not registered as offloaded, socket_dispatcher gets confused and forwards me to nrf91 socket stuff when I try access native socket stuff. I have not tested this extensively, but my initial tests indicate that socket dispatching and SO_BINDTODEVICE now works.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;This is my diff:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;diff --git a/lib/nrf_modem_lib/nrf91_sockets.c b/lib/nrf_modem_lib/nrf91_sockets.c
index 4ab896064..a07322ce5 100644
--- a/lib/nrf_modem_lib/nrf91_sockets.c
+++ b/lib/nrf_modem_lib/nrf91_sockets.c
@@ -1117,7 +1117,7 @@ static int nrf91_socket_create(int family, int type, int proto)
 
 #define NRF91_SOCKET_PRIORITY 40
 
-NET_SOCKET_REGISTER(nrf91_socket, NRF91_SOCKET_PRIORITY, AF_UNSPEC,
+NET_SOCKET_OFFLOAD_REGISTER(nrf91_socket, NRF91_SOCKET_PRIORITY, AF_UNSPEC,
                    nrf91_socket_is_supported, nrf91_socket_create);
 
 /* Create a network interface for nRF91 */
&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: LTE and ethernet coexistence</title><link>https://devzone.nordicsemi.com/thread/466050?ContentTypeID=1</link><pubDate>Thu, 25 Jan 2024 14:34:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a72db307-dae9-4fd5-aac4-4877b3fc1eda</guid><dc:creator>knutel</dc:creator><description>&lt;p&gt;See &amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/96529/nrf9160-ethernet-and-lte-both-available-but-cannot-open-sockets-under-ethernet/466049"&gt;RE: nRF9160 Ethernet and LTE both available but cannot open sockets under Ethernet&lt;/a&gt; for details about why this does not quite work.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: LTE and ethernet coexistence</title><link>https://devzone.nordicsemi.com/thread/465828?ContentTypeID=1</link><pubDate>Wed, 24 Jan 2024 14:04:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b8499810-f92e-47fc-80ab-5f8657b1f7b9</guid><dc:creator>Michal</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;I am consulting my colleagues and I will get back to you.&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: LTE and ethernet coexistence</title><link>https://devzone.nordicsemi.com/thread/465511?ContentTypeID=1</link><pubDate>Tue, 23 Jan 2024 09:59:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e1fcbac8-5857-4832-83dd-58bc462b5102</guid><dc:creator>GilDev</dc:creator><description>&lt;p&gt;Also very interested in this, as I&amp;rsquo;m having &lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/96529/nrf9160-ethernet-and-lte-both-available-but-cannot-open-sockets-under-ethernet/465507"&gt;the same questions/issues&lt;/a&gt;.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>