<?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>MQX Software SolutionsのトピックRe: UDP none blocking recvfrom(... RTCS_MSG_PEEK ...) causing RTCSERR_UDP_PORT_ZERO</title>
    <link>https://community.nxp.com/t5/MQX-Software-Solutions/UDP-none-blocking-recvfrom-RTCS-MSG-PEEK-causing-RTCSERR-UDP/m-p/172756#M2069</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;CW = Current 7.1.2 with all updates, MQX = Current 3.4, target 52259evb using MRAM debug for testing.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;in user_config.h, I only have UDP, ICMP and GATEWAY's enabled, all the other RTCS stuff is off.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 04 Feb 2010 04:13:44 GMT</pubDate>
    <dc:creator>CarlFST60L</dc:creator>
    <dc:date>2010-02-04T04:13:44Z</dc:date>
    <item>
      <title>UDP none blocking recvfrom(... RTCS_MSG_PEEK ...) causing RTCSERR_UDP_PORT_ZERO</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/UDP-none-blocking-recvfrom-RTCS-MSG-PEEK-causing-RTCSERR-UDP/m-p/172754#M2067</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;RTCS_geterror(sock); is returning&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;#define RTCSERR_UDP_PORT_ZERO&amp;nbsp;&amp;nbsp;&amp;nbsp; (RTCS_ERROR_BASE|0x665)&amp;nbsp;&amp;nbsp;&amp;nbsp; /* can't send to port 0&amp;nbsp; */&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;after I do something like this (just to illustrate easily the problem):&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;sendto();&lt;/P&gt;&lt;P&gt;_time_delay(10);&lt;/P&gt;&lt;P&gt;recvfrom(... RTCS_MSG_PEEK&amp;nbsp; ...); //no data to receive as the turn around time is 100mS&lt;/P&gt;&lt;P&gt;//Quickly try to resend&lt;/P&gt;&lt;P&gt;sendto(); //This will ALWAYS return the above error&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;so I tried this&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;sendto();&lt;/P&gt;&lt;P&gt;_time_delay(1);&lt;/P&gt;&lt;P&gt;recvfrom(... RTCS_MSG_PEEK&amp;nbsp; ...); //no data to receive as the turn around time is 100mS&lt;/P&gt;&lt;P&gt;shutdown(sock...);&lt;/P&gt;&lt;P&gt;sock = socket(PF_INET, SOCK_DGRAM, 0);&lt;/P&gt;&lt;P&gt;error = bind(sock, &amp;amp;local_sin, sizeof(local_sin));&lt;/P&gt;&lt;P&gt;sendto(); //This will ALWAYS return the above error&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The point is, I need to be able to have a UDP timeout and retry, so i need to use recvfrom() as a non blocking to make my timeout, but cannot work out what to do to shutdown() and socket_bind()&amp;nbsp; to get it to come back so that I can send again...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;Normally,if message peek returns no error and none zero, I do a normal recvfrom(); to get the datagram. all this works fine, ist only a problem when the timeout happens&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV class="message-edit-history"&gt;&lt;SPAN class="edit-author"&gt;Message Edited by CarlFST60L on&lt;/SPAN&gt; &lt;SPAN class="local-date"&gt;2010-02-03&lt;/SPAN&gt; &lt;SPAN class="local-time"&gt;06:29 AM&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Feb 2010 14:27:24 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/UDP-none-blocking-recvfrom-RTCS-MSG-PEEK-causing-RTCSERR-UDP/m-p/172754#M2067</guid>
      <dc:creator>CarlFST60L</dc:creator>
      <dc:date>2010-02-03T14:27:24Z</dc:date>
    </item>
    <item>
      <title>Re: UDP none blocking recvfrom(... RTCS_MSG_PEEK ...) causing RTCSERR_UDP_PORT_ZERO</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/UDP-none-blocking-recvfrom-RTCS-MSG-PEEK-causing-RTCSERR-UDP/m-p/172755#M2068</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;Please give the environment used ( CW version, MQX version, Target ) !&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Feb 2010 19:12:42 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/UDP-none-blocking-recvfrom-RTCS-MSG-PEEK-causing-RTCSERR-UDP/m-p/172755#M2068</guid>
      <dc:creator>prodsp</dc:creator>
      <dc:date>2010-02-03T19:12:42Z</dc:date>
    </item>
    <item>
      <title>Re: UDP none blocking recvfrom(... RTCS_MSG_PEEK ...) causing RTCSERR_UDP_PORT_ZERO</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/UDP-none-blocking-recvfrom-RTCS-MSG-PEEK-causing-RTCSERR-UDP/m-p/172756#M2069</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;CW = Current 7.1.2 with all updates, MQX = Current 3.4, target 52259evb using MRAM debug for testing.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;in user_config.h, I only have UDP, ICMP and GATEWAY's enabled, all the other RTCS stuff is off.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Feb 2010 04:13:44 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/UDP-none-blocking-recvfrom-RTCS-MSG-PEEK-causing-RTCSERR-UDP/m-p/172756#M2069</guid>
      <dc:creator>CarlFST60L</dc:creator>
      <dc:date>2010-02-04T04:13:44Z</dc:date>
    </item>
    <item>
      <title>Re: UDP none blocking recvfrom(... RTCS_MSG_PEEK ...) causing RTCSERR_UDP_PORT_ZERO</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/UDP-none-blocking-recvfrom-RTCS-MSG-PEEK-causing-RTCSERR-UDP/m-p/172757#M2070</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;We have now tested this with MQX3.5 with no usable result.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;We are desperately in need of a working UDP timeout example or idea on how to get it going as RTCS and its documentation is clearly lacking in this fundamental area.&lt;BR /&gt;&lt;BR /&gt;we just need to send a packet, if it doesn't get the response, close the connection, reopen and resend. Using RTCS_MSG_PEEK causes the next sendto(); to return an error. there must be more to shutting down that just&lt;BR /&gt;shutdown();&lt;BR /&gt;socket();&lt;BR /&gt;bind();&lt;BR /&gt;after timeout using RTCS_MSG_PEEK error.&lt;BR /&gt;&lt;BR /&gt;I hope I am just making a simple mistake, but I am unable to progress based on the examples / documentation.&lt;BR /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Feb 2010 13:47:42 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/UDP-none-blocking-recvfrom-RTCS-MSG-PEEK-causing-RTCSERR-UDP/m-p/172757#M2070</guid>
      <dc:creator>CarlFST60L</dc:creator>
      <dc:date>2010-02-15T13:47:42Z</dc:date>
    </item>
    <item>
      <title>Re: UDP none blocking recvfrom(... RTCS_MSG_PEEK ...) causing RTCSERR_UDP_PORT_ZERO</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/UDP-none-blocking-recvfrom-RTCS-MSG-PEEK-causing-RTCSERR-UDP/m-p/172758#M2071</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;the problem was solved, you have to reset remote_sin after callign shutdown();&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Feb 2010 05:11:23 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/UDP-none-blocking-recvfrom-RTCS-MSG-PEEK-causing-RTCSERR-UDP/m-p/172758#M2071</guid>
      <dc:creator>CarlFST60L</dc:creator>
      <dc:date>2010-02-16T05:11:23Z</dc:date>
    </item>
  </channel>
</rss>

