<?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 TCPIP Event timing error in MQX 4.2 in MQX Software Solutions</title>
    <link>https://community.nxp.com/t5/MQX-Software-Solutions/TCPIP-Event-timing-error-in-MQX-4-2/m-p/719467#M17618</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Our application has been developed with MQX 3.8. Our application has a dhcp client and it works properly..&lt;/P&gt;&lt;P&gt;We are porting our application to MQX 4.2 and now the dhcp client is not renewing the lease time before the lease time finishes. For example, our dhcp server is offering a lease time =60s and the DHCPclient is renewing the IP addres very 400s.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I heve been debugging and I see this in tcpip.c (MQX 4.2)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;void TCPIP_task&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt; (&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt; void *dummy,&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt; void *creator&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt; )&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;{&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;..................&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;.....................&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;timeafter = RTCS_time_get();&lt;/EM&gt;&lt;BR /&gt; &lt;BR /&gt;&lt;EM&gt; /* If head changed set time delta to zero to prevent immidiate event */&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt; if (queue == TCPIP_Event_head)&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt; {&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt; timedelta = RTCS_timer_get_interval(timebefore, timeafter);&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt; }&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt; else&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt; {&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt; timedelta = 0;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&lt;STRONG&gt; }&lt;/STRONG&gt;&lt;/EM&gt;&lt;BR /&gt; &lt;BR /&gt;&lt;EM&gt;t&lt;STRONG&gt;imebefore = timeafter;&lt;/STRONG&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt; timedelta = TCPIP_Event_time(timedelta);&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;...............................&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;...............................&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;}&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Comparing MQX 3.8 and MQX 4.2 I suggest&amp;nbsp;doing&amp;nbsp; this change:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;void TCPIP_task&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;(&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;void *dummy,&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;void *creator&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;)&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;{&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;..................&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;.....................&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;timeafter = RTCS_time_get();&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;/* If head changed set time delta to zero to prevent immidiate event */&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;if (queue == TCPIP_Event_head)&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;{&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;timedelta = RTCS_timer_get_interval(timebefore, timeafter);&lt;/EM&gt;&lt;BR /&gt;&lt;SPAN style="color: #ff0000;"&gt;&lt;EM&gt;timebefore = timeafter;&lt;/EM&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;EM&gt;}&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;else&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;{&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;timedelta = 0;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;}&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;EM&gt;timedelta = TCPIP_Event_time(timedelta);&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;...............................&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;...............................&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;}&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have tested and now the DHCP client works properly&amp;nbsp; like in MQX 3.8.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is this change correct? Is there an event timing error in MQX 4.2?&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 01 Mar 2018 11:53:27 GMT</pubDate>
    <dc:creator>eukeniurkiaga</dc:creator>
    <dc:date>2018-03-01T11:53:27Z</dc:date>
    <item>
      <title>TCPIP Event timing error in MQX 4.2</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/TCPIP-Event-timing-error-in-MQX-4-2/m-p/719467#M17618</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Our application has been developed with MQX 3.8. Our application has a dhcp client and it works properly..&lt;/P&gt;&lt;P&gt;We are porting our application to MQX 4.2 and now the dhcp client is not renewing the lease time before the lease time finishes. For example, our dhcp server is offering a lease time =60s and the DHCPclient is renewing the IP addres very 400s.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I heve been debugging and I see this in tcpip.c (MQX 4.2)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;void TCPIP_task&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt; (&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt; void *dummy,&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt; void *creator&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt; )&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;{&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;..................&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;.....................&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;timeafter = RTCS_time_get();&lt;/EM&gt;&lt;BR /&gt; &lt;BR /&gt;&lt;EM&gt; /* If head changed set time delta to zero to prevent immidiate event */&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt; if (queue == TCPIP_Event_head)&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt; {&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt; timedelta = RTCS_timer_get_interval(timebefore, timeafter);&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt; }&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt; else&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt; {&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt; timedelta = 0;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&lt;STRONG&gt; }&lt;/STRONG&gt;&lt;/EM&gt;&lt;BR /&gt; &lt;BR /&gt;&lt;EM&gt;t&lt;STRONG&gt;imebefore = timeafter;&lt;/STRONG&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt; timedelta = TCPIP_Event_time(timedelta);&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;...............................&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;...............................&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;}&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Comparing MQX 3.8 and MQX 4.2 I suggest&amp;nbsp;doing&amp;nbsp; this change:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;void TCPIP_task&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;(&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;void *dummy,&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;void *creator&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;)&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;{&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;..................&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;.....................&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;timeafter = RTCS_time_get();&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;/* If head changed set time delta to zero to prevent immidiate event */&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;if (queue == TCPIP_Event_head)&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;{&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;timedelta = RTCS_timer_get_interval(timebefore, timeafter);&lt;/EM&gt;&lt;BR /&gt;&lt;SPAN style="color: #ff0000;"&gt;&lt;EM&gt;timebefore = timeafter;&lt;/EM&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;EM&gt;}&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;else&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;{&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;timedelta = 0;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;}&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;EM&gt;timedelta = TCPIP_Event_time(timedelta);&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;...............................&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;...............................&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;}&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have tested and now the DHCP client works properly&amp;nbsp; like in MQX 3.8.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is this change correct? Is there an event timing error in MQX 4.2?&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 Mar 2018 11:53:27 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/TCPIP-Event-timing-error-in-MQX-4-2/m-p/719467#M17618</guid>
      <dc:creator>eukeniurkiaga</dc:creator>
      <dc:date>2018-03-01T11:53:27Z</dc:date>
    </item>
    <item>
      <title>Re: TCPIP Event timing error in MQX 4.2</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/TCPIP-Event-timing-error-in-MQX-4-2/m-p/719468#M17619</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Eukeni:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We have an MQX 4.2.0.2 patch, it fixed some RTCS bugs, including one DHCP. Please see the attached file. But I am not sure whether it related to your issue or not. I would suggest you apply&amp;nbsp; this patch.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Daniel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Mar 2018 05:26:53 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/TCPIP-Event-timing-error-in-MQX-4-2/m-p/719468#M17619</guid>
      <dc:creator>danielchen</dc:creator>
      <dc:date>2018-03-19T05:26:53Z</dc:date>
    </item>
    <item>
      <title>Re: TCPIP Event timing error in MQX 4.2</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/TCPIP-Event-timing-error-in-MQX-4-2/m-p/719469#M17620</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Daniel,&lt;/P&gt;&lt;P&gt;Sorry, I had already applied&amp;nbsp;&lt;SPAN style="display: inline !important; float: none; background-color: transparent; color: #51626f; font-family: 'Helvetica Neue',Helvetica,Arial,'Lucida Grande',sans-serif; font-size: 15px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px;"&gt;MQX 4.2.0.2 patch, and it did not solve this problem.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="display: inline !important; float: none; background-color: transparent; color: #51626f; font-family: 'Helvetica Neue',Helvetica,Arial,'Lucida Grande',sans-serif; font-size: 15px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px;"&gt; I think that if&amp;nbsp; "&lt;SPAN style="background-color: transparent; border-image-outset: 0; border-image-repeat: stretch; border-image-slice: 100%; border-image-source: none; border-image-width: 1; color: #ff0000; font-family: &amp;amp;quot; helvetica neue&amp;amp;quot;,helvetica,arial,&amp;amp;quot;lucida grande&amp;amp;quot;,sans-serif; font-size: 15px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; vertical-align: baseline; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px; padding: 0px; margin: 0px; border: 0px none #ff0000;"&gt;&lt;EM style="border-image-outset: 0; border-image-repeat: stretch; border-image-slice: 100%; border-image-source: none; border-image-width: 1; font-family: &amp;amp;quot; helvetica neue&amp;amp;quot;,helvetica,arial,&amp;amp;quot;lucida grande&amp;amp;quot;,sans-serif; font-size: 15px; font-style: italic; font-weight: 400; vertical-align: baseline; padding: 0px; margin: 0px; border: 0px none #ff0000;"&gt;timebefore = timeafter;&lt;/EM&gt;&lt;/SPAN&gt; " when "timedelta=0" then all the timings will be incorrect. That is my opinion but I am not totally sure.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="display: inline !important; float: none; background-color: transparent; color: #51626f; font-family: 'Helvetica Neue',Helvetica,Arial,'Lucida Grande',sans-serif; font-size: 15px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px;"&gt;Regards,&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Mar 2018 13:04:05 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/TCPIP-Event-timing-error-in-MQX-4-2/m-p/719469#M17620</guid>
      <dc:creator>eukeniurkiaga</dc:creator>
      <dc:date>2018-03-19T13:04:05Z</dc:date>
    </item>
  </channel>
</rss>

