<?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 MQX Ethernet: Send UDP Frame? in MQX Software Solutions</title>
    <link>https://community.nxp.com/t5/MQX-Software-Solutions/MQX-Ethernet-Send-UDP-Frame/m-p/418248#M13921</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm on a K60D512 (on TWR) and I'm using MQX 4.2 and KDS v3.0.0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm trying to work on Ethernet with UDP Frame.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I test to send from my laptop to the TWR an UDP frame with success, but not the reverse.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have the following code (simplified)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="c++" __jive_macro_name="code" class="jive_macro_code _jivemacro_uid_14313459128443487 jive_text_macro" data-renderedposition="239_8_1232_704" jivemacro_uid="_14313459128443487" modifiedtitle="true"&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;#define ENET_IPADDR&amp;nbsp; IPADDR(192,168,1,128) 
#define ENET_IPMASK&amp;nbsp; IPADDR(255,255,0,0) 
#define ENET_IPGATEWAY&amp;nbsp; IPADDR(0,0,0,0) &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;
error = RTCS_create();&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ip_data.ip = ENET_IPADDR;
ip_data.mask = ENET_IPMASK;
ip_data.gateway = ENET_IPGATEWAY;&lt;/P&gt;&lt;P&gt;ENET_get_mac_address(BSP_DEFAULT_ENET_DEVICE, ENET_IPADDR, enet_address);
ipcfg_init_device(BSP_DEFAULT_ENET_DEVICE, enet_address);&lt;/P&gt;&lt;P&gt;ipcfg_bind_staticip(BSP_DEFAULT_ENET_DEVICE, &amp;amp;ip_data);&lt;/P&gt;&lt;P&gt;sock = socket(AF_INET, SOCK_DGRAM, 0);
local_sin.sin_family = AF_INET;
local_sin.sin_port = 32768;
local_sin.sin_addr.s_addr = INADDR_ANY;
 
result = bind(sock, &amp;amp;local_sin, sizeof (sockaddr_in));&lt;/P&gt;&lt;P&gt;while(1)
{
&amp;nbsp; sock = RTCS_selectall(1000);
&amp;nbsp; if (sock == 0)
&amp;nbsp; {
&amp;nbsp;&amp;nbsp;&amp;nbsp; printf("TimeOut expired. No data received. Trying again\n");
&amp;nbsp; }
&amp;nbsp; else
&amp;nbsp; {
&amp;nbsp;&amp;nbsp;&amp;nbsp; count = recvfrom(sock, my_buffer, 10, 0, &amp;amp;local_sin, &amp;amp;local_len);
&amp;nbsp;&amp;nbsp;&amp;nbsp; if (count == RTCS_ERROR)
&amp;nbsp;&amp;nbsp;&amp;nbsp; {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; printf("\nrecvfrom() failed with error %lx", RTCS_geterror(sock));
&amp;nbsp;&amp;nbsp;&amp;nbsp; }
&amp;nbsp;&amp;nbsp;&amp;nbsp; else 
&amp;nbsp;&amp;nbsp;&amp;nbsp; {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; counter++;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; printf("\nReceived %ld bytes of data.", count);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; printf("Data received: %s, Packet %d\n", my_buffer, counter);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; count = sendto(sock, my_buffer, count, 0, &amp;amp;local_sin, local_len);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; printf("--------SendTO Return = %d", count);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }
&amp;nbsp; }
}&lt;/P&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;So If I set a static IP with &lt;/SPAN&gt;ipcfg_bind_staticip send work correctly.&lt;/P&gt;&lt;P&gt;If I do not make it or if I try with IP = 255.255.255.255, sendto() return -1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Until now, I have in my mind thet UDP not request a&amp;nbsp; specific IP address?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In fact, I must have a configurable system which auto adapt to its environment:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1) TWR &amp;lt;-&amp;gt; LapTop (On TCP)&lt;/P&gt;&lt;P&gt;2) TWR &amp;lt;-&amp;gt; Ethernet&amp;nbsp; Switch &amp;lt;-&amp;gt; LapTop (On TCP)&lt;/P&gt;&lt;P&gt;3) TWR &amp;lt;-&amp;gt; Ethernet&amp;nbsp; DHCP ROUTER &amp;lt;-&amp;gt; LapTop (On TCP)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So the&amp;nbsp; idea was to use UDP broadcast frame to request from the tower its IP address. (Allowed by DHCP if exist): LapTop make a Request on UDP, TWR respond on UDP.&lt;/P&gt;&lt;P&gt;If IP address not configured in TWR (because no DHCP), Laptop software will send an UDP frame with a chosen IP address to set TWR TCP/IP address.&lt;/P&gt;&lt;P&gt;This is why I want send UDP frame without previous IP address configuration...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 11 May 2015 12:28:21 GMT</pubDate>
    <dc:creator>arnogir</dc:creator>
    <dc:date>2015-05-11T12:28:21Z</dc:date>
    <item>
      <title>MQX Ethernet: Send UDP Frame?</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/MQX-Ethernet-Send-UDP-Frame/m-p/418248#M13921</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm on a K60D512 (on TWR) and I'm using MQX 4.2 and KDS v3.0.0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm trying to work on Ethernet with UDP Frame.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I test to send from my laptop to the TWR an UDP frame with success, but not the reverse.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have the following code (simplified)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="c++" __jive_macro_name="code" class="jive_macro_code _jivemacro_uid_14313459128443487 jive_text_macro" data-renderedposition="239_8_1232_704" jivemacro_uid="_14313459128443487" modifiedtitle="true"&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;#define ENET_IPADDR&amp;nbsp; IPADDR(192,168,1,128) 
#define ENET_IPMASK&amp;nbsp; IPADDR(255,255,0,0) 
#define ENET_IPGATEWAY&amp;nbsp; IPADDR(0,0,0,0) &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;
error = RTCS_create();&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ip_data.ip = ENET_IPADDR;
ip_data.mask = ENET_IPMASK;
ip_data.gateway = ENET_IPGATEWAY;&lt;/P&gt;&lt;P&gt;ENET_get_mac_address(BSP_DEFAULT_ENET_DEVICE, ENET_IPADDR, enet_address);
ipcfg_init_device(BSP_DEFAULT_ENET_DEVICE, enet_address);&lt;/P&gt;&lt;P&gt;ipcfg_bind_staticip(BSP_DEFAULT_ENET_DEVICE, &amp;amp;ip_data);&lt;/P&gt;&lt;P&gt;sock = socket(AF_INET, SOCK_DGRAM, 0);
local_sin.sin_family = AF_INET;
local_sin.sin_port = 32768;
local_sin.sin_addr.s_addr = INADDR_ANY;
 
result = bind(sock, &amp;amp;local_sin, sizeof (sockaddr_in));&lt;/P&gt;&lt;P&gt;while(1)
{
&amp;nbsp; sock = RTCS_selectall(1000);
&amp;nbsp; if (sock == 0)
&amp;nbsp; {
&amp;nbsp;&amp;nbsp;&amp;nbsp; printf("TimeOut expired. No data received. Trying again\n");
&amp;nbsp; }
&amp;nbsp; else
&amp;nbsp; {
&amp;nbsp;&amp;nbsp;&amp;nbsp; count = recvfrom(sock, my_buffer, 10, 0, &amp;amp;local_sin, &amp;amp;local_len);
&amp;nbsp;&amp;nbsp;&amp;nbsp; if (count == RTCS_ERROR)
&amp;nbsp;&amp;nbsp;&amp;nbsp; {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; printf("\nrecvfrom() failed with error %lx", RTCS_geterror(sock));
&amp;nbsp;&amp;nbsp;&amp;nbsp; }
&amp;nbsp;&amp;nbsp;&amp;nbsp; else 
&amp;nbsp;&amp;nbsp;&amp;nbsp; {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; counter++;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; printf("\nReceived %ld bytes of data.", count);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; printf("Data received: %s, Packet %d\n", my_buffer, counter);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; count = sendto(sock, my_buffer, count, 0, &amp;amp;local_sin, local_len);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; printf("--------SendTO Return = %d", count);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }
&amp;nbsp; }
}&lt;/P&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;So If I set a static IP with &lt;/SPAN&gt;ipcfg_bind_staticip send work correctly.&lt;/P&gt;&lt;P&gt;If I do not make it or if I try with IP = 255.255.255.255, sendto() return -1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Until now, I have in my mind thet UDP not request a&amp;nbsp; specific IP address?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In fact, I must have a configurable system which auto adapt to its environment:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1) TWR &amp;lt;-&amp;gt; LapTop (On TCP)&lt;/P&gt;&lt;P&gt;2) TWR &amp;lt;-&amp;gt; Ethernet&amp;nbsp; Switch &amp;lt;-&amp;gt; LapTop (On TCP)&lt;/P&gt;&lt;P&gt;3) TWR &amp;lt;-&amp;gt; Ethernet&amp;nbsp; DHCP ROUTER &amp;lt;-&amp;gt; LapTop (On TCP)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So the&amp;nbsp; idea was to use UDP broadcast frame to request from the tower its IP address. (Allowed by DHCP if exist): LapTop make a Request on UDP, TWR respond on UDP.&lt;/P&gt;&lt;P&gt;If IP address not configured in TWR (because no DHCP), Laptop software will send an UDP frame with a chosen IP address to set TWR TCP/IP address.&lt;/P&gt;&lt;P&gt;This is why I want send UDP frame without previous IP address configuration...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 May 2015 12:28:21 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/MQX-Ethernet-Send-UDP-Frame/m-p/418248#M13921</guid>
      <dc:creator>arnogir</dc:creator>
      <dc:date>2015-05-11T12:28:21Z</dc:date>
    </item>
    <item>
      <title>Re: MQX Ethernet: Send UDP Frame?</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/MQX-Ethernet-Send-UDP-Frame/m-p/418249#M13922</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Arnaud,&lt;/P&gt;&lt;P&gt;Please review following to see if it helps.&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.nxp.com/message/314041"&gt;Re: Simple UDP communication&lt;/A&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Remote monitoring solution using MQX and Kinetis MCUs&amp;lt;&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://cache.freescale.com/files/32bit/doc/app_note/AN4644.pdf" rel="nofollow" target="_blank"&gt;http://cache.freescale.com/files/32bit/doc/app_note/AN4644.pdf&lt;/A&gt;&lt;SPAN&gt;&amp;gt;&amp;nbsp; (REV 0)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;20 Mar 2013 This Application Note demonstrates the implementation of a Remote Medical Monitor system using Kinetis MCUs and MQX RTOS&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;·&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;·&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; PDF&lt;/P&gt;&lt;P&gt;·&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 138KB&lt;/P&gt;&lt;P&gt;·&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Application Notes: AN4644&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Associated File: AN4644SW&amp;lt;&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://cache.freescale.com/files/32bit/doc/app_note/AN4644SW.zip" rel="nofollow" target="_blank"&gt;http://cache.freescale.com/files/32bit/doc/app_note/AN4644SW.zip&lt;/A&gt;&lt;SPAN&gt;&amp;gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;David&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 May 2015 16:34:19 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/MQX-Ethernet-Send-UDP-Frame/m-p/418249#M13922</guid>
      <dc:creator>DavidS</dc:creator>
      <dc:date>2015-05-11T16:34:19Z</dc:date>
    </item>
    <item>
      <title>Re: MQX Ethernet: Send UDP Frame?</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/MQX-Ethernet-Send-UDP-Frame/m-p/418250#M13923</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Yes I Already seen this example.&lt;/P&gt;&lt;P&gt;I used a big part of this to start my UDP experimentation.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But this example does not send&amp;nbsp; UDP frame on client side.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So I try to call "SendTo" after have received data on UDP with receivFrom.&lt;/P&gt;&lt;P&gt;I seen 2 problems:&lt;/P&gt;&lt;P&gt;- I can't send UDP frame if I not bind with IP address. It seems to me UDP can work without have IP address! ?? (Or bind with&amp;nbsp; a dummy address like (0,0,0,0) )&lt;/P&gt;&lt;P&gt;- In other side, I have some case where I start a TCP socket. Then I call "listen" and then "accept". This API is blocant until connection done on TCP way. I will try to manage UDP frame and TCP on different task.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 May 2015 06:15:15 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/MQX-Ethernet-Send-UDP-Frame/m-p/418250#M13923</guid>
      <dc:creator>arnogir</dc:creator>
      <dc:date>2015-05-12T06:15:15Z</dc:date>
    </item>
    <item>
      <title>Re: MQX Ethernet: Send UDP Frame?</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/MQX-Ethernet-Send-UDP-Frame/m-p/418252#M13925</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Arnaud,&lt;/P&gt;&lt;P&gt;You are right. You cannot establish any meaningful connection when your IP address is still NULL.&lt;/P&gt;&lt;P&gt;If I understood correctly, main problem is communication in case when network don’t have DHCP server and board do not know network parameters.&lt;/P&gt;&lt;P&gt;I suppose that it has no sense creating something very new – it will just lead to more potential issues.&lt;/P&gt;&lt;P&gt;DHCP protocol has to be use first.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would like to recommend for example:&lt;/P&gt;&lt;OL style="list-style-type: decimal;"&gt;&lt;LI&gt;Start DHCP client and ask for IP address.&lt;/LI&gt;&lt;LI&gt;If board does not receive IP address from DHCP server, board could some time listen whether opposite side sends also DHCP discovery message (it is also broadcasts messages). If opposite side ask also for IP address by DHCP discovery message, board could start his own DHCP server and assign IP address to both board and PC.&lt;/LI&gt;&lt;LI&gt;If there isn’t DHCP server on network and PC do not send DHCP discovery message it is clear that either PC has hardly set IP address or PC is not connected. So, we can set some static IP address (probably from Private network address range) and potentially wait for some very specific broadcast/multicast message (send by PC application). On base of this specific message board recognize that source address belongs to my PC application. This broadcast could directly contain new IP address for board (it do not solve issue when 2 boards are connect to the same network) or rather board could use source IP address and set it as (default) gateway. In that case you could start standard communication even when board and PC IP address do not fits to the same network. &lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope it helps you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Have a great day,&lt;BR /&gt;RadekS&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-----------------------------------------------------------------------------------------------------------------------&lt;BR /&gt;Note: If this post answers your question, please click the Correct Answer button. Thank you!&lt;BR /&gt;-----------------------------------------------------------------------------------------------------------------------&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 May 2015 11:57:28 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/MQX-Ethernet-Send-UDP-Frame/m-p/418252#M13925</guid>
      <dc:creator>RadekS</dc:creator>
      <dc:date>2015-05-12T11:57:28Z</dc:date>
    </item>
    <item>
      <title>Re: MQX Ethernet: Send UDP Frame?</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/MQX-Ethernet-Send-UDP-Frame/m-p/418253#M13926</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This helps me in the sense that it confirms my observations.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;However, most cases for my application is the case number 3 but every time several card on the network.&lt;BR /&gt;So your solution is not working.&lt;/P&gt;&lt;P&gt;I will use a forbidden IP when board is clear (factory) :1.0.0.1 to replies to UDP frame. Then, the IP configuration procces will be run. After that, on the nexts power on, I will always use the last known IP. (by waiting new IP configuration via UDP)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now, if someone has a clean solution to send an UDP frame with the SrcAddr = 0.0.0.0, let me know!&lt;/P&gt;&lt;P&gt;And so, provided solution in linked post seem working for the person who is asked the question. But not for me. May be I not use correctly the function?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;:smileyhappy:&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 May 2015 12:31:39 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/MQX-Ethernet-Send-UDP-Frame/m-p/418253#M13926</guid>
      <dc:creator>arnogir</dc:creator>
      <dc:date>2015-05-12T12:31:39Z</dc:date>
    </item>
    <item>
      <title>Re: MQX Ethernet: Send UDP Frame?</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/MQX-Ethernet-Send-UDP-Frame/m-p/418254#M13927</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Arnaud,&lt;/P&gt;&lt;P&gt;Thank you for more details about network configuration.&lt;/P&gt;&lt;P&gt;Unfortunately there probably isn’t any universal solution for such self configured network.&lt;/P&gt;&lt;P&gt;You can develop your own special solution for assigning IP addresses by your PC application or you can just simply run DHCP server on PC side (This should be simplest solution).&lt;/P&gt;&lt;P&gt;Idea1:&lt;/P&gt;&lt;P&gt;This is probably half works idea - What about leave it on board DHCP?&lt;/P&gt;&lt;P&gt;Boards can simply start DHCP client. When board didn’t receive answer from DHCP server, board can start (after some random time) own HDCP server. The fastest board will assign IP addresses to others.&lt;/P&gt;&lt;P&gt;Idea2:&lt;/P&gt;&lt;P&gt;IPv6 - unique IP addresses.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope it helps you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Have a great day,&lt;BR /&gt;RadekS&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-----------------------------------------------------------------------------------------------------------------------&lt;BR /&gt;Note: If this post answers your question, please click the Correct Answer button. Thank you!&lt;BR /&gt;-----------------------------------------------------------------------------------------------------------------------&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 May 2015 13:31:03 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/MQX-Ethernet-Send-UDP-Frame/m-p/418254#M13927</guid>
      <dc:creator>RadekS</dc:creator>
      <dc:date>2015-05-12T13:31:03Z</dc:date>
    </item>
    <item>
      <title>Re: MQX Ethernet: Send UDP Frame?</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/MQX-Ethernet-Send-UDP-Frame/m-p/418255#M13928</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This board is to be integrated in some different factory with an unknown network architecture.&lt;/P&gt;&lt;P&gt;Some network has DHCP, some has only a router without DHCP, other could be a simplest link between Laptop and board!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We also develop the LapTop software to communicate with the board&amp;nbsp; via Ethernet.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So, I can't implement DHCP in the board.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="hps"&gt;I am always amazed&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;that&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;MQX&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;can not&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;manage&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;the&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;UDP&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;frame&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;if sent&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;with&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;source IP&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;to 0&lt;/SPAN&gt;!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 May 2015 13:48:22 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/MQX-Ethernet-Send-UDP-Frame/m-p/418255#M13928</guid>
      <dc:creator>arnogir</dc:creator>
      <dc:date>2015-05-12T13:48:22Z</dc:date>
    </item>
    <item>
      <title>Re: MQX Ethernet: Send UDP Frame?</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/MQX-Ethernet-Send-UDP-Frame/m-p/418256#M13929</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for the above problem, I choose to use a temporary IP address until assigned by UDP frame message.&lt;/P&gt;&lt;P&gt;But is I bind with address of type 1.0.0.1 or 10.0.0.1 this does not work, when I bind UDP sock:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="; color: #0000ff; font-size: 10pt;"&gt;&lt;STRONG&gt;=&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt; &lt;STRONG&gt;bind&lt;/STRONG&gt;(DV_Eth_UDPSocketRxID, &amp;amp;DV_ETH_UDPSocketRxAddr, &lt;/SPAN&gt;&lt;SPAN style="; color: #000080; font-size: 10pt;"&gt;&lt;STRONG&gt;sizeof&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;(DV_ETH_UDPSocketRxAddr));&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;Error returned is 0x1510...&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;Which IP Address Range is accepted by MQX? !!&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;for the problem number 2 listed above:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;"I have some case where I start a TCP socket. Then I call "listen" and then "accept". This API is blocant until connection done on TCP way. I will try to manage UDP frame and TCP on different task."&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;Could you indicate me if it is because I have a bad use or if it is the MQX behavior?&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;Explain my Case:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;- On Init I call ipcfg_init_device..&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;- On a task: ipcfg_bind_staticip; socket(AF_INET, SOCK_DGRAM).. bind() to create an UDP socket to receive UDP Frame (Poll with receivFrom.&amp;nbsp; and then start second task&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;- On second task: Socket, bind, listen and then "accept" ( To wait TCP connection. Port is different from UDP socket!)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;Effect: while accept not return because no connection on TCP, the UDP frame cannot be received: &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;recvfrom() failed with error 1704&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;Thank:smileyplain:&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 May 2015 14:40:32 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/MQX-Ethernet-Send-UDP-Frame/m-p/418256#M13929</guid>
      <dc:creator>arnogir</dc:creator>
      <dc:date>2015-05-12T14:40:32Z</dc:date>
    </item>
  </channel>
</rss>

