<?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: Sending ethernet messages to 2 destinations faults code... in MQX Software Solutions</title>
    <link>https://community.nxp.com/t5/MQX-Software-Solutions/Sending-ethernet-messages-to-2-destinations-faults-code/m-p/353886#M11525</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you for additional information.&lt;/P&gt;&lt;P&gt;For now I suppose that you received concatenated Ethernet frame from USB. &lt;/P&gt;&lt;P&gt;Yes, there isn’t any structure type IP_IF_PTR directly for USB-CDC. You will need creating new one.&lt;/P&gt;&lt;P&gt;I suppose that best way will be creating new interface on ENET driver level:&lt;/P&gt;&lt;OL style="list-style-type: decimal;"&gt;&lt;LI&gt;functions like MACNET_initialize, MACNET_shutdown, MACNET_send, … but for USB. These functions will be adaptation layer between USB and RTCS.&lt;/LI&gt;&lt;LI&gt;structure with pointers to these function like MACNET_IF.&lt;/LI&gt;&lt;LI&gt;configuration in init_enet.c file (BSP code).&lt;/LI&gt;&lt;LI&gt;an application at some of RTCS layers (IP/IP-E) which will handle messages between interfaces.&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;As second inspiration for new interface you can use for example AR4100 WIFI patch (it uses communication trough SPI). &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 03 Feb 2015 15:51:59 GMT</pubDate>
    <dc:creator>RadekS</dc:creator>
    <dc:date>2015-02-03T15:51:59Z</dc:date>
    <item>
      <title>Sending ethernet messages to 2 destinations faults code...</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/Sending-ethernet-messages-to-2-destinations-faults-code/m-p/353881#M11520</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;When I am sending Ethernet messages to 2 destinations, I am fairly sure that I am un-allocating (freeing up) the memory containing the Ethernet message twice.&amp;nbsp; And this is causing the code to stop working.&amp;nbsp; Unfortunately, the code that frees up the memory is buried deep into the MQX code.&amp;nbsp; Not in my application.&amp;nbsp; I would rather not touch the MQX code if possible.&amp;nbsp; Is there a known way to prevent the (I think) "&lt;SPAN style="font-size: 10pt;"&gt;RTCSPCB_free_internal(PCB_PTR)" function from freeing up the memory on the first go-around and not on the second?&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;Reading the code hints that I might make use of a "duplication" concept.&amp;nbsp; But I am not familiar with this feature and do not understand the real purpose of this feature.&amp;nbsp; So I am hesitant on using it.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;-thanks&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 17 Jan 2015 21:31:48 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/Sending-ethernet-messages-to-2-destinations-faults-code/m-p/353881#M11520</guid>
      <dc:creator>rickstuart</dc:creator>
      <dc:date>2015-01-17T21:31:48Z</dc:date>
    </item>
    <item>
      <title>Re: Sending ethernet messages to 2 destinations faults code...</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/Sending-ethernet-messages-to-2-destinations-faults-code/m-p/353882#M11521</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I haven't figured it out yet - but there does appears to be a well known "programming pattern" for what I want to do.&amp;nbsp; For instance, broadcasting involves sending Ethernet messages to multiple locations.&amp;nbsp; There is a function called RTCS_alloc_dup() that appears to help with this.&amp;nbsp; However, this function appears to only work on Ethernet messages of the "PCB send structure" (type RTCSPCB_PTR).&amp;nbsp; I believe I am working with the Ethernet messages of the "PCB receive structure" (type PCB_PTR).&amp;nbsp; And I do not see a RTCS_alloc_dup() function that can work on the receive structures.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So, what are my best options?&amp;nbsp; I'm thinking of copying the RTCSPCB_alloc_dup() function, putting it in my application and re-writing it to work with the type PCB_PTR.&amp;nbsp; Thoughts?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 17 Jan 2015 22:39:41 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/Sending-ethernet-messages-to-2-destinations-faults-code/m-p/353882#M11521</guid>
      <dc:creator>rickstuart</dc:creator>
      <dc:date>2015-01-17T22:39:41Z</dc:date>
    </item>
    <item>
      <title>Re: Sending ethernet messages to 2 destinations faults code...</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/Sending-ethernet-messages-to-2-destinations-faults-code/m-p/353883#M11522</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It looks like the RTCSPCB type structure is for transmission out of the board and PCB is fore receiving into the board.&amp;nbsp; That somewhat explains why there is no support for duplicating the PCB structure as broadcasting is usually done on the way out of the board.&amp;nbsp; But using the already existing PCB structures is the easiest path in my case.&amp;nbsp; So I settled on allocating memory for the PCB and for the FRAGMENT it was pointing to.and copying the Ethernet message so each destination had its own copy.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If any here see this differently please speak up.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 18 Jan 2015 16:33:32 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/Sending-ethernet-messages-to-2-destinations-faults-code/m-p/353883#M11522</guid>
      <dc:creator>rickstuart</dc:creator>
      <dc:date>2015-01-18T16:33:32Z</dc:date>
    </item>
    <item>
      <title>Re: Sending ethernet messages to 2 destinations faults code...</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/Sending-ethernet-messages-to-2-destinations-faults-code/m-p/353884#M11523</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Unfortunately I am a little bit confused.&lt;/P&gt;&lt;P&gt;If I understood correctly, you wants send the same message (probably UDP) to two different IPs.&lt;/P&gt;&lt;P&gt;For some reason (why?) you want to do that somewhere in middle of RTCS stack (at PCB).&lt;/P&gt;&lt;P&gt;I am right?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you have allocated just one message, why you want freeing up twice?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could you please describe your task more widely, that we can understand what you really want to do?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Unfortunately I do not see difference between RTCSPCB and PCB like you (RTCSPCB type structure is for transmission out of the board and PCB is fore receiving into the board).&lt;/P&gt;&lt;P&gt;PCB structure belongs to RTCSPCB structure, see rtcspcb.h and pcb.h files.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Have a great day,&lt;BR /&gt;RadekS&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-----------------------------------------------------------------------------------------------------------------------&lt;BR /&gt;Note: If this post answers your question, please click the Correct Answer button. Thank you!&lt;BR /&gt;-----------------------------------------------------------------------------------------------------------------------&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Jan 2015 16:06:33 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/Sending-ethernet-messages-to-2-destinations-faults-code/m-p/353884#M11523</guid>
      <dc:creator>RadekS</dc:creator>
      <dc:date>2015-01-21T16:06:33Z</dc:date>
    </item>
    <item>
      <title>Re: Sending ethernet messages to 2 destinations faults code...</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/Sending-ethernet-messages-to-2-destinations-faults-code/m-p/353885#M11524</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi RadekS,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to combine the RTCS example with the USB/CDC example.&amp;nbsp; I want to make a hub between the stack and both ports.&amp;nbsp; Copying the message looked like the easiest way to do this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It works in all directions except USB to RTCS.&amp;nbsp; The RTCS stack needs a structure of type IP_IF_PTR.&amp;nbsp; This is provided for messages from the Ethernet port.&amp;nbsp; But I can not find a similar structure for messages from the USB/CDC port!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The reason why the code faulted is because I had set the IP_IF_PTR pointer to NULL for messages from the USB port to the RTCS stack.&amp;nbsp; I did this because the pointer was used for messages from the Ethernet port to the RTCS stack.&amp;nbsp; And I did not want the RTCS stack confusing the Ethernet port with the USB/CDC port.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Since I am changing my question from faulting to connecting the USB/CDC port to the RTCS stack I will start a new thread here: &lt;A href="https://community.nxp.com/message/476209"&gt;How to connect USB/CDC port with RTCS stack?&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-thanks&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;H5 class="simple"&gt;&lt;/H5&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 31 Jan 2015 19:07:03 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/Sending-ethernet-messages-to-2-destinations-faults-code/m-p/353885#M11524</guid>
      <dc:creator>rickstuart</dc:creator>
      <dc:date>2015-01-31T19:07:03Z</dc:date>
    </item>
    <item>
      <title>Re: Sending ethernet messages to 2 destinations faults code...</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/Sending-ethernet-messages-to-2-destinations-faults-code/m-p/353886#M11525</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you for additional information.&lt;/P&gt;&lt;P&gt;For now I suppose that you received concatenated Ethernet frame from USB. &lt;/P&gt;&lt;P&gt;Yes, there isn’t any structure type IP_IF_PTR directly for USB-CDC. You will need creating new one.&lt;/P&gt;&lt;P&gt;I suppose that best way will be creating new interface on ENET driver level:&lt;/P&gt;&lt;OL style="list-style-type: decimal;"&gt;&lt;LI&gt;functions like MACNET_initialize, MACNET_shutdown, MACNET_send, … but for USB. These functions will be adaptation layer between USB and RTCS.&lt;/LI&gt;&lt;LI&gt;structure with pointers to these function like MACNET_IF.&lt;/LI&gt;&lt;LI&gt;configuration in init_enet.c file (BSP code).&lt;/LI&gt;&lt;LI&gt;an application at some of RTCS layers (IP/IP-E) which will handle messages between interfaces.&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;As second inspiration for new interface you can use for example AR4100 WIFI patch (it uses communication trough SPI). &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Feb 2015 15:51:59 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/Sending-ethernet-messages-to-2-destinations-faults-code/m-p/353886#M11525</guid>
      <dc:creator>RadekS</dc:creator>
      <dc:date>2015-02-03T15:51:59Z</dc:date>
    </item>
  </channel>
</rss>

