<?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>LPC MicrocontrollersのトピックLWIP Server Side Include causes ACK problem</title>
    <link>https://community.nxp.com/t5/LPC-Microcontrollers/LWIP-Server-Side-Include-causes-ACK-problem/m-p/578961#M19923</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by peterrq on Thu Oct 16 06:22:21 MST 2014&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;I am having problems with LWIP Server Side Includes. Some includes work whilst others don't.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;A failure results in the PC re-sending the GET command.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The target then continues to retransmit its data. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;There appears to be a mismatch in sequence numbers. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;For example: Wireshark shows that the target's next sequence number is expected to be 337 but the target next sends 338.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;FAILS:&amp;nbsp; sprintf(pcInsert, "&amp;lt;ptp&amp;gt;&amp;lt;/ptp&amp;gt;");&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;OK: sprintf(pcInsert, "&amp;lt;ptp&amp;gt;a&amp;lt;/ptp&amp;gt;");&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;FAILS:&amp;nbsp; sprintf(pcInsert, "&amp;lt;ptp&amp;gt;ab&amp;lt;/ptp&amp;gt;");&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;FAILS:&amp;nbsp; sprintf(pcInsert, "&amp;lt;ptp&amp;gt;abc&amp;lt;/ptp&amp;gt;");&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;FAILS:&amp;nbsp; sprintf(pcInsert, "&amp;lt;ptp&amp;gt;abcd&amp;lt;/ptp&amp;gt;");&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;OK:&amp;nbsp; sprintf(pcInsert, "&amp;lt;ptp&amp;gt;abcde&amp;lt;/ptp&amp;gt;");&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;But the word alignment pattern does not always hold.... Also the target's output is correct, no funnies in the text. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I am using the keil uVision 'sa_webserver' project supplied with LPCOpen 5/15/2014 (LPCOpen 2_12).&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Running on MPC4300 compiled using Keil uVision 5.11.1.0 (Armcc V5.04.0.49)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;My server side include processing:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;static const char *tags[] = {"mytag"};&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;http_set_ssi_handler(SSIHandler, tags, 1);&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;int SSIHandler(int iIndex, char *pcInsert, int iInsertLen)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;{&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; int len;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; len = api_lru(iIndex, pcInsert, iInsertLen);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; return len;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Where I have boiled api_lru() down to the lines above. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I have a much larger api_lwip() function that dumps lwip statistics &amp;amp; this function always seems to work. That despite the fact that LWIP statistic increment &amp;amp; so all modulo(4) outputs sizes are generated.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I have made the SSI TAG SIZE 400 bytes.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Pulling my hair out on this issue.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 15 Jun 2016 20:18:07 GMT</pubDate>
    <dc:creator>lpcware</dc:creator>
    <dc:date>2016-06-15T20:18:07Z</dc:date>
    <item>
      <title>LWIP Server Side Include causes ACK problem</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LWIP-Server-Side-Include-causes-ACK-problem/m-p/578961#M19923</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by peterrq on Thu Oct 16 06:22:21 MST 2014&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;I am having problems with LWIP Server Side Includes. Some includes work whilst others don't.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;A failure results in the PC re-sending the GET command.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The target then continues to retransmit its data. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;There appears to be a mismatch in sequence numbers. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;For example: Wireshark shows that the target's next sequence number is expected to be 337 but the target next sends 338.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;FAILS:&amp;nbsp; sprintf(pcInsert, "&amp;lt;ptp&amp;gt;&amp;lt;/ptp&amp;gt;");&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;OK: sprintf(pcInsert, "&amp;lt;ptp&amp;gt;a&amp;lt;/ptp&amp;gt;");&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;FAILS:&amp;nbsp; sprintf(pcInsert, "&amp;lt;ptp&amp;gt;ab&amp;lt;/ptp&amp;gt;");&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;FAILS:&amp;nbsp; sprintf(pcInsert, "&amp;lt;ptp&amp;gt;abc&amp;lt;/ptp&amp;gt;");&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;FAILS:&amp;nbsp; sprintf(pcInsert, "&amp;lt;ptp&amp;gt;abcd&amp;lt;/ptp&amp;gt;");&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;OK:&amp;nbsp; sprintf(pcInsert, "&amp;lt;ptp&amp;gt;abcde&amp;lt;/ptp&amp;gt;");&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;But the word alignment pattern does not always hold.... Also the target's output is correct, no funnies in the text. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I am using the keil uVision 'sa_webserver' project supplied with LPCOpen 5/15/2014 (LPCOpen 2_12).&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Running on MPC4300 compiled using Keil uVision 5.11.1.0 (Armcc V5.04.0.49)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;My server side include processing:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;static const char *tags[] = {"mytag"};&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;http_set_ssi_handler(SSIHandler, tags, 1);&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;int SSIHandler(int iIndex, char *pcInsert, int iInsertLen)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;{&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; int len;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; len = api_lru(iIndex, pcInsert, iInsertLen);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; return len;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Where I have boiled api_lru() down to the lines above. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I have a much larger api_lwip() function that dumps lwip statistics &amp;amp; this function always seems to work. That despite the fact that LWIP statistic increment &amp;amp; so all modulo(4) outputs sizes are generated.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I have made the SSI TAG SIZE 400 bytes.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Pulling my hair out on this issue.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 20:18:07 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LWIP-Server-Side-Include-causes-ACK-problem/m-p/578961#M19923</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T20:18:07Z</dc:date>
    </item>
  </channel>
</rss>

