<?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: Non-blocking UDP receive problem - Error 0x1120</title>
    <link>https://community.nxp.com/t5/MQX-Software-Solutions/Non-blocking-UDP-receive-problem-Error-0x1120/m-p/325909#M10391</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Then please check the priority of your application task and compare with the priority of TCP/IP task. By default the priority of TCP/IP task is set to 6. Your application task shall have lower priority (higher number = 7, 8 ...).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Seems like you don't allow the TCP/IP task to service and free the allocated messages, that might be MQX task priority problem. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 30 Jul 2014 07:24:38 GMT</pubDate>
    <dc:creator>Martin_</dc:creator>
    <dc:date>2014-07-30T07:24:38Z</dc:date>
    <item>
      <title>Non-blocking UDP receive problem - Error 0x1120</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/Non-blocking-UDP-receive-problem-Error-0x1120/m-p/325906#M10388</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'd like to receive UDP packets in a non-blocking way. The problem is that recvfrom returns error 0x1120.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here's how I initialize the UDP socket:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;socket_handle = socket(AF_INET, SOCK_DGRAM, 0);&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;server_socket_addr.sin_family&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; = AF_INET;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;server_socket_addr.sin_port&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; = port;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;server_socket_addr.sin_addr.s_addr = INADDR_ANY;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;status = bind(socket_handle, &amp;amp;server_socket_addr, sizeof(server_socket_addr));&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;uint32_t opt_value = TRUE;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;uint32_t opt_length = sizeof (uint32_t);&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;status = setsockopt (&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&amp;nbsp; socket_handle,&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&amp;nbsp; SOL_UDP,&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&amp;nbsp; OPT_RECEIVE_NOWAIT,&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&amp;nbsp; &amp;amp;opt_value,&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&amp;nbsp; opt_length&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&amp;nbsp; );&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;_UDP_max_queue_size = 1;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;/P&gt;&lt;P&gt;Cyclically, I call&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;recvfrom(socket_handle, buffer, sizeof(buffer), 0, &amp;amp;client_socket_addr, &amp;amp;socket_addr_len)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But this line returns error 0x1120. In rtcs_err.h the corresponding line says&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; #define RTCSERR_OUT_OF_BUFFERS&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (RTCS_ERROR_BASE|0x120)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any ideas how to solve this problem? The blocking variant works, by the way.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kind regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Michael&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;--&lt;/P&gt;&lt;P&gt;Setup: CW 10.6, MQX 4.1, TWR-K60F120M&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 Jul 2014 15:24:16 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/Non-blocking-UDP-receive-problem-Error-0x1120/m-p/325906#M10388</guid>
      <dc:creator>michael_wahler</dc:creator>
      <dc:date>2014-07-29T15:24:16Z</dc:date>
    </item>
    <item>
      <title>Re: Non-blocking UDP receive problem - Error 0x1120</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/Non-blocking-UDP-receive-problem-Error-0x1120/m-p/325907#M10389</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It might be application specific configuration of system resources available for RTCS. Try to increase those before RTCS_create() in similar way as in the example below:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="c++" __jive_macro_name="code" class="jive_text_macro jive_macro_code _jivemacro_uid_1406693672436735" jivemacro_uid="_1406693672436735" modifiedtitle="true"&gt;
&lt;P&gt;&amp;nbsp; /* Init RTCS */&lt;/P&gt;
&lt;P&gt;&amp;nbsp; _RTCSPCB_init = 4;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; _RTCSPCB_grow = 2;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; _RTCSPCB_max = 20;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; _RTCS_msgpool_init = 4;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; _RTCS_msgpool_grow = 2;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; _RTCS_msgpool_max&amp;nbsp; = 20;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; _RTCS_socket_part_init = 4;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; _RTCS_socket_part_grow = 2;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; _RTCS_socket_part_max&amp;nbsp; = 20;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; _UDP_max_queue_size = 100;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;/P&gt;
&lt;P&gt;&amp;nbsp; _RTCSTASK_stacksize = 4500;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;/P&gt;
&lt;P&gt;&amp;nbsp; error = RTCS_create();&lt;/P&gt;
&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Jul 2014 04:18:13 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/Non-blocking-UDP-receive-problem-Error-0x1120/m-p/325907#M10389</guid>
      <dc:creator>Martin_</dc:creator>
      <dc:date>2014-07-30T04:18:13Z</dc:date>
    </item>
    <item>
      <title>Re: Non-blocking UDP receive problem - Error 0x1120</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/Non-blocking-UDP-receive-problem-Error-0x1120/m-p/325908#M10390</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for your answer. Unfortunately, this does not help. With these parameters, recvfrom receives an empty buffer 20 times and then fails with the same error again.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any other ideas?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Jul 2014 07:12:28 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/Non-blocking-UDP-receive-problem-Error-0x1120/m-p/325908#M10390</guid>
      <dc:creator>michael_wahler</dc:creator>
      <dc:date>2014-07-30T07:12:28Z</dc:date>
    </item>
    <item>
      <title>Re: Non-blocking UDP receive problem - Error 0x1120</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/Non-blocking-UDP-receive-problem-Error-0x1120/m-p/325909#M10391</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Then please check the priority of your application task and compare with the priority of TCP/IP task. By default the priority of TCP/IP task is set to 6. Your application task shall have lower priority (higher number = 7, 8 ...).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Seems like you don't allow the TCP/IP task to service and free the allocated messages, that might be MQX task priority problem. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Jul 2014 07:24:38 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/Non-blocking-UDP-receive-problem-Error-0x1120/m-p/325909#M10391</guid>
      <dc:creator>Martin_</dc:creator>
      <dc:date>2014-07-30T07:24:38Z</dc:date>
    </item>
    <item>
      <title>Re: Non-blocking UDP receive problem - Error 0x1120</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/Non-blocking-UDP-receive-problem-Error-0x1120/m-p/325910#M10392</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Martin,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I checked the priorities of my tasks:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Calibri; font-size: 15px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Calibri; font-size: 15px;"&gt;TCP/IP task - prio 6&lt;/SPAN&gt;&lt;/P&gt;&lt;P lang="de-CH" style="font-family: Calibri; font-size: 11.0pt;"&gt;Main task (MQX_AUTO_START_TASK) - prio 9&lt;/P&gt;&lt;P lang="de-CH" style="font-family: Calibri; font-size: 11.0pt;"&gt;&amp;nbsp; - spawns hw timer task - prio 7&lt;/P&gt;&lt;P lang="de-CH" style="font-family: Calibri; font-size: 11.0pt;"&gt;&lt;/P&gt;&lt;P lang="de-CH" style="font-family: Calibri; font-size: 11.0pt;"&gt;Still not working though :smileysad: Any other ideas?&lt;/P&gt;&lt;P lang="de-CH" style="font-family: Calibri; font-size: 11.0pt;"&gt;&lt;/P&gt;&lt;P lang="de-CH" style="font-family: Calibri; font-size: 11.0pt;"&gt;Michael&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Aug 2014 13:39:35 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/Non-blocking-UDP-receive-problem-Error-0x1120/m-p/325910#M10392</guid>
      <dc:creator>michael_wahler</dc:creator>
      <dc:date>2014-08-13T13:39:35Z</dc:date>
    </item>
  </channel>
</rss>

