<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: RT1064 freertos lwip udp example receive from broadcast in i.MX RT Crossover MCUs</title>
    <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/RT1064-freertos-lwip-udp-example-receive-from-broadcast/m-p/1835237#M29530</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/224743"&gt;@akift&lt;/a&gt;&amp;nbsp;，&lt;/P&gt;
&lt;P&gt;&amp;nbsp; This post also useful to you:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://blog.csdn.net/m0_61659911/article/details/132415649" target="_blank"&gt;https://blog.csdn.net/m0_61659911/article/details/132415649&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Wish it helps you!&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;/P&gt;
&lt;P&gt;Kerry&lt;/P&gt;</description>
    <pubDate>Tue, 26 Mar 2024 08:06:15 GMT</pubDate>
    <dc:creator>kerryzhou</dc:creator>
    <dc:date>2024-03-26T08:06:15Z</dc:date>
    <item>
      <title>RT1064 freertos lwip udp example receive from broadcast</title>
      <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/RT1064-freertos-lwip-udp-example-receive-from-broadcast/m-p/1833341#M29476</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I am working on RT1064EVK and using I&amp;nbsp;evkmimxrt1064_lwip_ipv4_ipv6_echo_freertos example.&lt;/P&gt;&lt;P&gt;udp echo example receives the data which send to device IP only.&lt;/P&gt;&lt;P&gt;But I would like to receive the broadcast data - which send to any IP-&amp;nbsp; and specific port.&lt;/P&gt;&lt;P&gt;What modifications I need to do in the example code?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I may need to add below lwipopts.h.&lt;/P&gt;&lt;LI-CODE lang="c"&gt;#define IP_SOF_BROADCAST 1
#define IP_SOF_BROADCAST_RECV 1
#define LWIP_BROADCAST_PING 1&lt;/LI-CODE&gt;&lt;P&gt;And after I need to change binding address to&amp;nbsp;IP_ADDR_ANY.&lt;BR /&gt;But I couldn't find where to change.&lt;BR /&gt;&lt;BR /&gt;Any help would be appreciated. Thanks&lt;/P&gt;</description>
      <pubDate>Fri, 22 Mar 2024 02:21:14 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/RT1064-freertos-lwip-udp-example-receive-from-broadcast/m-p/1833341#M29476</guid>
      <dc:creator>akift</dc:creator>
      <dc:date>2024-03-22T02:21:14Z</dc:date>
    </item>
    <item>
      <title>Re: RT1064 freertos lwip udp example receive from broadcast</title>
      <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/RT1064-freertos-lwip-udp-example-receive-from-broadcast/m-p/1835236#M29529</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/224743"&gt;@akift&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp; Thanks for your interest in the NXP MIMXRT product, I would like to provide service for you.&lt;/P&gt;
&lt;P&gt;&amp;nbsp; I don't have the broadcast demo, but I write a multicast demo previously.&lt;/P&gt;
&lt;P&gt;&amp;nbsp; I think, you also can refer to my multicast doc, I also share one document, but just write in Chinese, the doc contains the code and test result picture.&lt;/P&gt;
&lt;P&gt;&amp;nbsp; If you still have question about it, please kindly let me know.&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;/P&gt;
&lt;P&gt;Kerry&lt;/P&gt;</description>
      <pubDate>Tue, 26 Mar 2024 08:03:56 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/RT1064-freertos-lwip-udp-example-receive-from-broadcast/m-p/1835236#M29529</guid>
      <dc:creator>kerryzhou</dc:creator>
      <dc:date>2024-03-26T08:03:56Z</dc:date>
    </item>
    <item>
      <title>Re: RT1064 freertos lwip udp example receive from broadcast</title>
      <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/RT1064-freertos-lwip-udp-example-receive-from-broadcast/m-p/1835237#M29530</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/224743"&gt;@akift&lt;/a&gt;&amp;nbsp;，&lt;/P&gt;
&lt;P&gt;&amp;nbsp; This post also useful to you:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://blog.csdn.net/m0_61659911/article/details/132415649" target="_blank"&gt;https://blog.csdn.net/m0_61659911/article/details/132415649&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Wish it helps you!&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;/P&gt;
&lt;P&gt;Kerry&lt;/P&gt;</description>
      <pubDate>Tue, 26 Mar 2024 08:06:15 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/RT1064-freertos-lwip-udp-example-receive-from-broadcast/m-p/1835237#M29530</guid>
      <dc:creator>kerryzhou</dc:creator>
      <dc:date>2024-03-26T08:06:15Z</dc:date>
    </item>
    <item>
      <title>Re: RT1064 freertos lwip udp example receive from broadcast</title>
      <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/RT1064-freertos-lwip-udp-example-receive-from-broadcast/m-p/1835762#M29547</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/60336"&gt;@kerryzhou&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;Thank you but your reply is not helpful. Also the implementations are very different than NXP example.&lt;/P&gt;&lt;P&gt;When I scrutinize the information in the two examples, I can only conclude that LWIP_IGMP is not defined.&lt;/P&gt;&lt;P&gt;I have defined&amp;nbsp;#define LWIP_IGMP 1 in lwipopts.h , but still I can't receive broadcast data.&lt;/P&gt;&lt;P&gt;Could you have a look&amp;nbsp;evkmimxrt1064_lwip_ipv4_ipv6_echo_freertos example in the SDK?&lt;/P&gt;&lt;P&gt;The example is provided by NXP, so I assume you or your colleagues&amp;nbsp; can help us very easily. Probably a small change is needed to receive broadcast data over udp.&amp;nbsp;&lt;BR /&gt;I have tried the change mentioned in the first post but it is not working. There might be a bug in the example.&lt;BR /&gt;&lt;BR /&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Tue, 26 Mar 2024 23:27:25 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/RT1064-freertos-lwip-udp-example-receive-from-broadcast/m-p/1835762#M29547</guid>
      <dc:creator>akift</dc:creator>
      <dc:date>2024-03-26T23:27:25Z</dc:date>
    </item>
    <item>
      <title>Re: RT1064 freertos lwip udp example receive from broadcast</title>
      <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/RT1064-freertos-lwip-udp-example-receive-from-broadcast/m-p/1838271#M29622</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/224743"&gt;@akift&lt;/a&gt;&amp;nbsp;，&lt;/P&gt;
&lt;P&gt;&amp;nbsp; My example is the multicast, not the broadcast.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;To the broadcast, do you try this code:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="kerryzhou_0-1711939401955.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/271266i9DAC6D49B35E0ACB/image-size/medium?v=v2&amp;amp;px=400" role="button" title="kerryzhou_0-1711939401955.png" alt="kerryzhou_0-1711939401955.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can try it again.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Wish it helps you!&lt;/P&gt;
&lt;P&gt;If you still have question about it, please kindly let me know.&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;/P&gt;
&lt;P&gt;Kerry&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 01 Apr 2024 02:45:16 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/RT1064-freertos-lwip-udp-example-receive-from-broadcast/m-p/1838271#M29622</guid>
      <dc:creator>kerryzhou</dc:creator>
      <dc:date>2024-04-01T02:45:16Z</dc:date>
    </item>
    <item>
      <title>Re: RT1064 freertos lwip udp example receive from broadcast</title>
      <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/RT1064-freertos-lwip-udp-example-receive-from-broadcast/m-p/1840226#M29654</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/224743"&gt;@akift&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;I'm not sure &lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/60336"&gt;@kerryzhou&lt;/a&gt; understood your question.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have managed to receive broadcasts using code like the following snippet:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;LI-CODE lang="cpp"&gt;	struct netconn *pListenerConnection = netconn_new(NETCONN_UDP);
	if (!pListenerConnection)
	{
		// failed to listen
		DebugPrintf("listener failed on netconn_new()\n");
		goto restart;
	}

	struct netbuf *pBuf;
	lastNetError = netconn_bind(pListenerConnection, IP_ADDR_ANY, listenPort);
	if (ERR_OK != lastNetError)
	{
		// failed to listen
		DebugPrintf("Listener failed on netconn_bind(), return %i\n", lastNetError);
		netconn_delete(pListenerConnection);
		goto restart;
	}

	// process requests from possible clients.
	while (1)
	{
		lastNetError = netconn_recv(pListenerConnection, &amp;amp;pBuf);

		// depending on the return
		if (ERR_OK != lastNetError)
		{
			// some error.
			DebugPrintf("listener got error %i in netconn_recv()\n", lastNetError);
			// restart the connection
			netconn_delete(pListenerConnection);
			goto restart;
		};
		// pBuf has the message:  
		uint8_t packet[8];  // just interested in the first this many bytes
		size_t packetSize = netbuf_copy(pBuf, packet, sizeof(packet));

		if (packetSize != sizeof(packet))
		{
			DebugPrintf("listener got an unexpected request, not %d bytes long.\n", packetSize);
			// delete the pBuf and wait for another UDP packet.
			netbuf_delete(pBuf);
			continue;
		}
      // use the data in packet.

		netbuf_delete(pBuf);
	}


&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;I hope it helps.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;</description>
      <pubDate>Wed, 03 Apr 2024 15:55:51 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/RT1064-freertos-lwip-udp-example-receive-from-broadcast/m-p/1840226#M29654</guid>
      <dc:creator>jaylarson</dc:creator>
      <dc:date>2024-04-03T15:55:51Z</dc:date>
    </item>
  </channel>
</rss>

