<?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 Freemaster http IoT in FreeMASTER</title>
    <link>https://community.nxp.com/t5/FreeMASTER/Freemaster-http-IoT/m-p/1030658#M145</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to access a MCU with Freemaster over the internet. The MCU communicates via CAN bus with the Freemaster host application and is traveling in a "vehicle". I already managed to connect&amp;nbsp;with a second WIN PC&amp;nbsp;via the Freemaster Remote HTTP Server.&lt;/P&gt;&lt;P&gt;Now I want to use OpenWRT + CAN bus dongle + software to replace the second WIN PC. Unfortunately I can not find any documentation about the packing of the raw Freemaster CAN messages into the HTTP POST frame. Attached you can find a wireshark log and the output of the Freemaster Communication Debug Log.&lt;/P&gt;&lt;P&gt;The task is to implement the&amp;nbsp;&lt;SPAN&gt;Freemaster Remote HTTP Server in linux (with limited resources / target system has OpenWrt 32MB ram &amp;amp; 16MB flash).&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Hope someone from NXP can support this or someone can help me to analyse the translation from CAN messages to HTTP&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Cheers&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Sebastian&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 10 Dec 2019 21:23:30 GMT</pubDate>
    <dc:creator>Bohrfutter</dc:creator>
    <dc:date>2019-12-10T21:23:30Z</dc:date>
    <item>
      <title>Freemaster http IoT</title>
      <link>https://community.nxp.com/t5/FreeMASTER/Freemaster-http-IoT/m-p/1030658#M145</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to access a MCU with Freemaster over the internet. The MCU communicates via CAN bus with the Freemaster host application and is traveling in a "vehicle". I already managed to connect&amp;nbsp;with a second WIN PC&amp;nbsp;via the Freemaster Remote HTTP Server.&lt;/P&gt;&lt;P&gt;Now I want to use OpenWRT + CAN bus dongle + software to replace the second WIN PC. Unfortunately I can not find any documentation about the packing of the raw Freemaster CAN messages into the HTTP POST frame. Attached you can find a wireshark log and the output of the Freemaster Communication Debug Log.&lt;/P&gt;&lt;P&gt;The task is to implement the&amp;nbsp;&lt;SPAN&gt;Freemaster Remote HTTP Server in linux (with limited resources / target system has OpenWrt 32MB ram &amp;amp; 16MB flash).&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Hope someone from NXP can support this or someone can help me to analyse the translation from CAN messages to HTTP&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Cheers&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Sebastian&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Dec 2019 21:23:30 GMT</pubDate>
      <guid>https://community.nxp.com/t5/FreeMASTER/Freemaster-http-IoT/m-p/1030658#M145</guid>
      <dc:creator>Bohrfutter</dc:creator>
      <dc:date>2019-12-10T21:23:30Z</dc:date>
    </item>
    <item>
      <title>Re: Freemaster http IoT</title>
      <link>https://community.nxp.com/t5/FreeMASTER/Freemaster-http-IoT/m-p/1030659#M146</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear Sebastian,&lt;/P&gt;&lt;P&gt;this is also a response to your comment you made at the &lt;A _jive_internal="true" href="https://community.nxp.com/docs/DOC-345136#comments"&gt;3.0 release announcement&lt;/A&gt;. The FreeMASTER Lite and use of JSON-RPC is most likely the way for your use case to be&amp;nbsp;supported.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I understand that you may find the FreeMASTER Lite still too heavy to run it in an embedded Linux system. We are considering&amp;nbsp;a plan to create even lighter version suitable to run&amp;nbsp;directly in the MCU with Ethernet or WiFi connectivity. Such a "micro" server would support the same JSON-RPC API as the Lite (and the&amp;nbsp;desktop app) so it would be accessible directly on the network.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let's use this community thread to see how much interest this idea gets among other users.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Michal&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Dec 2019 09:55:50 GMT</pubDate>
      <guid>https://community.nxp.com/t5/FreeMASTER/Freemaster-http-IoT/m-p/1030659#M146</guid>
      <dc:creator>MichalH</dc:creator>
      <dc:date>2019-12-11T09:55:50Z</dc:date>
    </item>
    <item>
      <title>Re: Freemaster http IoT</title>
      <link>https://community.nxp.com/t5/FreeMASTER/Freemaster-http-IoT/m-p/1030660#M147</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Michal,&lt;/P&gt;&lt;P&gt;Your proposal looks like a long path - not sure if I have that amount of time &lt;IMG class="jive_emoji" src="https://community.nxp.com/images/emojis/1f60a.png" /&gt;.&lt;/P&gt;&lt;P&gt;In the mean while maybe you can give me a hint for the decoding of the freemaster http tunnel messages. I already know most of the bytes in the HTTP POST / HTTP OK communication which are relevant for the MCU - but what are the red bytes in POST and OK message? They are not forwarded to the MCU. The 03 could be the protocol version?&lt;/P&gt;&lt;P&gt;HTTP POST:&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;SPAN style="color: red; "&gt;00 00 00&lt;/SPAN&gt;&lt;SPAN style="color: black;"&gt; 26 &lt;SPAN style="color: red;"&gt;03&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="color: black;"&gt; e0 00 04 c2 0c 00 20 &lt;SPAN style="color: red;"&gt;00 01 00&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: black; "&gt;HTTP OK:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: red; "&gt;00 00 00&lt;/SPAN&gt; 00 00&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you in advance.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best regards&lt;/P&gt;&lt;P&gt;Sebastian&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Dec 2019 22:27:26 GMT</pubDate>
      <guid>https://community.nxp.com/t5/FreeMASTER/Freemaster-http-IoT/m-p/1030660#M147</guid>
      <dc:creator>Bohrfutter</dc:creator>
      <dc:date>2019-12-12T22:27:26Z</dc:date>
    </item>
    <item>
      <title>Re: Freemaster http IoT</title>
      <link>https://community.nxp.com/t5/FreeMASTER/Freemaster-http-IoT/m-p/1030661#M148</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;Dear Sebastian,&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;here are some details about the communication.&amp;nbsp;Let me know if this is enough to get you going.&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;HTTP POST:&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&lt;SPAN style="border: 0px; font-weight: inherit;"&gt;&lt;SPAN style="color: #ff0000; border: 0px; font-weight: inherit;"&gt;00 00 00&lt;/SPAN&gt;&lt;SPAN style="color: black; border: 0px; font-weight: inherit;"&gt;&lt;SPAN style="color: #ff0000;"&gt;&amp;nbsp;26&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="color: #339966; border: 0px; font-weight: inherit;"&gt;03&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="color: black; border: 0px; font-weight: inherit;"&gt;&lt;SPAN style="color: #ff00ff;"&gt;&amp;nbsp;e0 00 04 c2 0c 00 20&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="color: red; border: 0px; font-weight: inherit;"&gt;&lt;SPAN style="color: #800000;"&gt;00 01&lt;/SPAN&gt; &lt;SPAN style="color: #cc99ff;"&gt;00&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;The first four bytes (&lt;SPAN style="color: #ff0000;"&gt;00000026&lt;/SPAN&gt;) are the "client ID" assigned by the server during OPENPORT call. The client uses this number to identify all subsequent SENDRECVPACKET frames.&lt;/LI&gt;&lt;LI&gt;The &lt;SPAN style="color: #339966;"&gt;03&lt;/SPAN&gt; is an action code:&lt;PRE&gt;#define MCBHTTP_FNUM_IDENTIFY 0x00
#define MCBHTTP_FNUM_OPENPORT 0x01
#define MCBHTTP_FNUM_CLOSEPORT 0x02
&lt;SPAN style="color: #339966;"&gt;#define MCBHTTP_FNUM_SENDRECVPACKET 0x03&lt;/SPAN&gt;
#define MCBHTTP_FNUM_LOCKFEATURE 0x04
#define MCBHTTP_FNUM_UNLOCKFEATURE 0x05&lt;/PRE&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;UL&gt;&lt;LI&gt;The purple part is the command payload - this is passed to the board (or encapsulated to a nested protocol by the server).&lt;/LI&gt;&lt;LI&gt;The 00 01 is the expected response length (the old protocol&amp;nbsp;does not support variable-length responses, so the sender/caller must provide this information to transport layer).&lt;/LI&gt;&lt;LI&gt;The last 00 is the feature id (00 = no feature).&amp;nbsp;&lt;PRE&gt;#define MCB_FEATURE_SCOPE 0x01
#define MCB_FEATURE_REC 0x02
#define MCB_FEATURE_APPCMD 0x03
#define MCB_FEATURE_FPROG 0x04
#define MCB_FEATURE_SFIO 0x05
#define MCB_FEATURE_PIPES 0x06&lt;/PRE&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The server will only pass the feature-specific frames to the target if the feature has been locked before by this client. This feature locking is needed to prevent e.g. two clients to compete for a resource which needs locking. Plain reading variable is atomic so it does not need the lock. But e.g. Oscilloscope needs&amp;nbsp;multiple frames so the access needs to be locked for one client exclusively.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&lt;SPAN style="color: black; border: 0px; font-weight: inherit;"&gt;HTTP OK:&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&lt;SPAN style="color: #ff0000;"&gt;&lt;SPAN style="border: 0px; font-weight: inherit;"&gt;00 00 00&lt;/SPAN&gt;&amp;nbsp;00&lt;/SPAN&gt; 00&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;The first four bytes (&lt;SPAN style="color: #ff0000;"&gt;00000000&lt;/SPAN&gt;) is the status code (MSB bit signals success/failure)&lt;/LI&gt;&lt;LI&gt;The last 00 is the expected 1 byte of command response.&lt;/LI&gt;&lt;/UL&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Dec 2019 10:23:13 GMT</pubDate>
      <guid>https://community.nxp.com/t5/FreeMASTER/Freemaster-http-IoT/m-p/1030661#M148</guid>
      <dc:creator>MichalH</dc:creator>
      <dc:date>2019-12-13T10:23:13Z</dc:date>
    </item>
  </channel>
</rss>

