<?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: RTCS_selectall and RTCS_selectset in MQX Software Solutions</title>
    <link>https://community.nxp.com/t5/MQX-Software-Solutions/RTCS-selectall-and-RTCS-selectset/m-p/186826#M3306</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If there a bug here?&amp;nbsp; I'm having the same problem with MQX 3.7.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 18 Jan 2012 20:49:56 GMT</pubDate>
    <dc:creator>ggary</dc:creator>
    <dc:date>2012-01-18T20:49:56Z</dc:date>
    <item>
      <title>RTCS_selectall and RTCS_selectset</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/RTCS-selectall-and-RTCS-selectset/m-p/186824#M3304</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm using K60 (tower board) and MQX 3.7&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'd like to use socket to receive UDP packets (800bytes every 32ms) in 2 different ports.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have tried to use&amp;nbsp;RTCS_selectall but I lose some packets.&lt;/P&gt;&lt;P&gt;So I'have tried this simple code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;....&lt;/P&gt;&lt;P&gt;_int_install_unexpected_isr();&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;// Inizialize networking&lt;/P&gt;&lt;P&gt;initialize_networking();&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;// local address initialization&lt;BR /&gt;laddr.sin_family = AF_INET;&lt;BR /&gt;laddr.sin_port = 2500;&lt;BR /&gt;laddr.sin_addr.s_addr = INADDR_ANY;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;// Create a datagram socket:&lt;BR /&gt;socklist[ID_SOCKET_SDO] = socket(PF_INET, SOCK_DGRAM, 0);&lt;BR /&gt;if (socklist[ID_SOCKET_SDO] == RTCS_SOCKET_ERROR) {&lt;BR /&gt;printf("\nFailed to create datagram socket.");&lt;BR /&gt;_task_block();&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;// Bind the datagram socket to the UDP port:&lt;BR /&gt;error = bind(socklist[ID_SOCKET_SDO], &amp;amp;laddr, sizeof(laddr));&lt;BR /&gt;if (error != RTCS_OK) {&lt;BR /&gt;printf("\nFailed to bind datagram - 0x%lx.", error);&lt;BR /&gt;_task_block();&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;laddr.sin_port = 2501;&lt;/P&gt;&lt;P&gt;// Create a datagram socket:&lt;BR /&gt;socklist[ID_SOCKET_PROFILO_MOTO] = socket(PF_INET, SOCK_DGRAM, 0);&lt;BR /&gt;if (socklist[ID_SOCKET_PROFILO_MOTO] == RTCS_SOCKET_ERROR) {&lt;BR /&gt;printf("\nFailed to create datagram socket.");&lt;BR /&gt;_task_block();&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;// Bind the datagram socket to the UDP port:&lt;BR /&gt;error = bind(socklist[ID_SOCKET_PROFILO_MOTO], &amp;amp;laddr, sizeof(laddr));&lt;BR /&gt;if (error != RTCS_OK) {&lt;BR /&gt;printf("\nFailed to bind datagram - 0x%lx.", error);&lt;BR /&gt;_task_block();&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;// Echo server&lt;/P&gt;&lt;P&gt;// error = ECHOSRV_init("EchoServer", 17, 1000);&lt;BR /&gt;// if (error != RTCS_OK) {&lt;BR /&gt;// printf("\nFailed to echo server init - 0x%lx.", error);&lt;BR /&gt;// _task_block();&lt;BR /&gt;// }&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;while (TRUE) {&lt;/P&gt;&lt;P&gt;// prepare recevive structs&lt;BR /&gt;GPIOA_PDOR ^= BIT_29; // green led TOGGLE&lt;BR /&gt;sock = RTCS_selectset(socklist, NUM_SOCKET_WAITING, 100);&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If I stop the sender device, I suppose I have to see every 100ms my led toggle.&lt;/P&gt;&lt;P&gt;This doesn't happen, the timeout is... random. Sometimes is bigger than a second.&lt;/P&gt;&lt;P&gt;Why?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;&lt;P&gt;G&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 Nov 2011 19:00:51 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/RTCS-selectall-and-RTCS-selectset/m-p/186824#M3304</guid>
      <dc:creator>gionny</dc:creator>
      <dc:date>2011-11-29T19:00:51Z</dc:date>
    </item>
    <item>
      <title>Re: RTCS_selectall and RTCS_selectset</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/RTCS-selectall-and-RTCS-selectset/m-p/186825#M3305</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;I am having the same problem in MQX 3.7 and CW MCU v10.1. My code open a UDP socket and when I use RTCS_select or RTCS_selectall with timeout, &amp;nbsp;the same is random and sometimes never returns until a message in the socket is received.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best Regards&lt;/P&gt;&lt;P&gt;Thiago&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Dec 2011 00:48:00 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/RTCS-selectall-and-RTCS-selectset/m-p/186825#M3305</guid>
      <dc:creator>ThiagoE</dc:creator>
      <dc:date>2011-12-14T00:48:00Z</dc:date>
    </item>
    <item>
      <title>Re: RTCS_selectall and RTCS_selectset</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/RTCS-selectall-and-RTCS-selectset/m-p/186826#M3306</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If there a bug here?&amp;nbsp; I'm having the same problem with MQX 3.7.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Jan 2012 20:49:56 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/RTCS-selectall-and-RTCS-selectset/m-p/186826#M3306</guid>
      <dc:creator>ggary</dc:creator>
      <dc:date>2012-01-18T20:49:56Z</dc:date>
    </item>
    <item>
      <title>Re: RTCS_selectall and RTCS_selectset</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/RTCS-selectall-and-RTCS-selectset/m-p/186827#M3307</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes there are flaws in rtcs when it comes to select. You don't happen to be using PPP are you? If you are then timeouts will never work since the ppp driver has infinite loops in it.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Jan 2012 13:30:52 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/RTCS-selectall-and-RTCS-selectset/m-p/186827#M3307</guid>
      <dc:creator>BryGuyH</dc:creator>
      <dc:date>2012-01-19T13:30:52Z</dc:date>
    </item>
  </channel>
</rss>

