<?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: i.MX RT1060 RNDIS (AN13940SW) in i.MX RT Crossover MCUs</title>
    <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/i-MX-RT1060-RNDIS-AN13940SW/m-p/1778046#M28121</link>
    <description>&lt;P&gt;Hi&lt;BR /&gt;&lt;BR /&gt;See section 2 of &lt;A href="https://www.utasker.com/docs/uTasker/uTaskerRNDIS.pdf" target="_blank"&gt;https://www.utasker.com/docs/uTasker/uTaskerRNDIS.pdf&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Interface Association descriptors are used when there are multiple USB-CDC interfaces but can also be used when there is just one and so there are various ways that the same can be achieved. I also use the Interface Association as standard since it keeps all cases following the same pattern (whether one, two or up to 7 CDCs). &lt;EM&gt;In fact it simplifies installing drivers on Windows if I remember correctly, although such details change with new Windows versions.&lt;/EM&gt;&lt;BR /&gt;&lt;BR /&gt;Essentially you just have a CDC interface which has a bi-directional bulk endpoint (used by Ethernet-type data by RNDIS) and an interrupt endpoint [like any CDC].&lt;BR /&gt;The RNDIS layer "chooses" to use the bulk endpoints to send and receive Ethernet type data. It uses the interrupt endpoint to signal to the host when it has messages to exchange and it uses the (always there) control endpoint 0 for the RNDIS messaging itself&lt;BR /&gt;&lt;BR /&gt;Therefore RNDIS just uses/or abuses a CDC interface as transport/signalling pipes to do its work. For RNDIS CDC is just the medium to exchange data and it could (if Microsoft has specified it differently when they invented it) butchered CDC in a different way or even done similar on various other USB class transport layers - but CDC matches fine.&lt;BR /&gt;&lt;BR /&gt;&lt;EM&gt;Some notes:&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;- the RNDIS interface type is optional - often a vendor specific one (0xff) is specified instead&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;- I see the interrupt endpoint is only 8 bytes in size, whereby typically it is 16 but this is probably not really relevant since 8 is presumably large enough&lt;/EM&gt;&lt;BR /&gt;&lt;BR /&gt;It is interesting to compare how typical tethered devices (like Android phones, modems etc.) configure the interfaces and I tend to use what is commonly seen there, but some deviations are quite normal since such things can be specified in different ways. If you have a working configuration accepted by MAC, Windows and Linux there is probably no reason to change anything.&lt;BR /&gt;&lt;BR /&gt;Regards&lt;BR /&gt;&lt;BR /&gt;Mark&lt;/P&gt;</description>
    <pubDate>Wed, 20 Dec 2023 15:08:04 GMT</pubDate>
    <dc:creator>mjbcswitzerland</dc:creator>
    <dc:date>2023-12-20T15:08:04Z</dc:date>
    <item>
      <title>i.MX RT1060 RNDIS (AN13940SW)</title>
      <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/i-MX-RT1060-RNDIS-AN13940SW/m-p/1777196#M28089</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I'm looking at the&amp;nbsp;AN13940SW application note for iMX RT1050 and accompanying sample code (I have it for 1060, but I think it's identical), and I'm struggling to understand what the code in &lt;SPAN&gt;&lt;EM&gt;init_ec200a&lt;/EM&gt; is doing. In particular, what kind of commands are being written over the data interface?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Also, I'm a bit confused about how the RNDIS interface is used. Originally I thought the RNDIS interface would be used to send/receive data, but it seems like it's a CDC data interface that's used for sending/receiving data, and that the RNDIS interface is only used as an interrupt, signaling that the device has data for the host. Am I correct in my last explanation?&lt;/P&gt;</description>
      <pubDate>Tue, 19 Dec 2023 13:28:12 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/i-MX-RT1060-RNDIS-AN13940SW/m-p/1777196#M28089</guid>
      <dc:creator>dafela</dc:creator>
      <dc:date>2023-12-19T13:28:12Z</dc:date>
    </item>
    <item>
      <title>Re: i.MX RT1060 RNDIS (AN13940SW)</title>
      <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/i-MX-RT1060-RNDIS-AN13940SW/m-p/1777341#M28096</link>
      <description>&lt;P&gt;Hi&lt;BR /&gt;&lt;BR /&gt;The original Microsoft RNDIS spec. can be found at &lt;A href="https://learn.microsoft.com/en-us/openspecs/windows_protocols/MS-WINPROTLP/df36f95e-6a6b-48d6-a3ae-35a17674f546?redirectedfrom=MSDN" target="_blank"&gt;https://learn.microsoft.com/en-us/openspecs/windows_protocols/MS-WINPROTLP/df36f95e-6a6b-48d6-a3ae-35a17674f546?redirectedfrom=MSDN&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;The uTasker project module also describes the USB endpoint operations in detail at &lt;A href="https://www.utasker.com/docs/uTasker/uTaskerRNDIS.pdf" target="_blank"&gt;https://www.utasker.com/docs/uTasker/uTaskerRNDIS.pdf&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;The project includes turn-key RNDIS device and/or host operation on all i.MX RT 10xx parts as well as complete emulation in its i.MX RT simulation that allows the complete code (and RNDIS operation, including USB interrupts and DMA) to be run (and studied) in Visual Studio.&lt;BR /&gt;&lt;BR /&gt;Regards&lt;BR /&gt;&lt;BR /&gt;Mark&lt;BR /&gt;&lt;BR /&gt;&lt;A href="https://www.utasker.com/index.html" target="_blank"&gt;https://www.utasker.com/index.html&lt;/A&gt;&lt;BR /&gt;&lt;A href="https://www.utasker.com/iMX/RT1050.html" target="_blank"&gt;https://www.utasker.com/iMX/RT1050.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;For our discounted i.MX and Kinetis stock availability see &lt;A href="https://www.utasker.com/Shop/semi.html" target="_blank" rel="nofollow noopener noreferrer"&gt;https://www.utasker.com/Shop/semi.html&lt;/A&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 19 Dec 2023 18:02:39 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/i-MX-RT1060-RNDIS-AN13940SW/m-p/1777341#M28096</guid>
      <dc:creator>mjbcswitzerland</dc:creator>
      <dc:date>2023-12-19T18:02:39Z</dc:date>
    </item>
    <item>
      <title>Re: i.MX RT1060 RNDIS (AN13940SW)</title>
      <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/i-MX-RT1060-RNDIS-AN13940SW/m-p/1777812#M28111</link>
      <description>&lt;P&gt;Thanks for sharing the uTasker document!&lt;/P&gt;&lt;P&gt;Chapter 4 in that document seems to indicate that the commands in &lt;EM&gt;init_ec200a &lt;/EM&gt;are&amp;nbsp;initialization commands, but I'm struggling to decipher the commands being sent by the sample. Here's the first command:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="c"&gt;const char command[] = {0x21,0x22,0x00,0x00,0x04,0x00,0x00,0x00};&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The 1st byte is OK, that's a &lt;EM&gt;HostToDevice-Class-Interface&lt;/EM&gt; request type, but the 2nd byte confuses me. Through some searching I've been able to determine it's a&amp;nbsp;&lt;EM&gt;SetControlLineState&lt;/EM&gt; request, but I've not found a definitive specification for it (I've tried looking in the CDC 1.2 spec, but it's not there it seems).&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Wed, 20 Dec 2023 08:50:35 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/i-MX-RT1060-RNDIS-AN13940SW/m-p/1777812#M28111</guid>
      <dc:creator>dafela</dc:creator>
      <dc:date>2023-12-20T08:50:35Z</dc:date>
    </item>
    <item>
      <title>Re: i.MX RT1060 RNDIS (AN13940SW)</title>
      <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/i-MX-RT1060-RNDIS-AN13940SW/m-p/1777840#M28113</link>
      <description>&lt;P&gt;I think I've misunderstood how to match chapter 4 up to the sample code. The details in chapter 4 only replicate what the actual&amp;nbsp;sending of e.g.&amp;nbsp;&lt;EM&gt;REMOTE_NDIS_INITIALIZE_MSG&lt;/EM&gt; does. The sample does perform this setup, but then in&amp;nbsp;&lt;EM&gt;init_ec200a()&lt;/EM&gt; it does some extra configuration.&lt;/P&gt;</description>
      <pubDate>Wed, 20 Dec 2023 09:24:19 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/i-MX-RT1060-RNDIS-AN13940SW/m-p/1777840#M28113</guid>
      <dc:creator>dafela</dc:creator>
      <dc:date>2023-12-20T09:24:19Z</dc:date>
    </item>
    <item>
      <title>Re: i.MX RT1060 RNDIS (AN13940SW)</title>
      <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/i-MX-RT1060-RNDIS-AN13940SW/m-p/1777975#M28116</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;RNDIS operates over USB-CDC class but it looks like your code is mixing the USB-CDC and RNDIS rather than having the RNDIS layer as a separate module above the USB-CDC.&lt;BR /&gt;&lt;BR /&gt;The 0x22 is a "set control line state" request (to set RTS and DTR on interface number 4) and so is USB-CDC specific (usually set to default during the USB-CDC enumeration) and doesn't have anything to do with the RNDIS layer.&lt;BR /&gt;&lt;EM&gt;The first bit in wValue contols the RTS state and the second bit controls the DTS state. However this is irrelevant since the CDC class in not actually being used to control any modem lines but only as a data transport method.&lt;BR /&gt;Since this control also belongs to the CDC PSTN sub-class it is defined in the CDC PSTN sub-class specification and not in the general CDC class one.&lt;/EM&gt;&lt;BR /&gt;&lt;BR /&gt;Regards&lt;BR /&gt;&lt;BR /&gt;Mark&lt;/P&gt;</description>
      <pubDate>Wed, 20 Dec 2023 12:57:45 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/i-MX-RT1060-RNDIS-AN13940SW/m-p/1777975#M28116</guid>
      <dc:creator>mjbcswitzerland</dc:creator>
      <dc:date>2023-12-20T12:57:45Z</dc:date>
    </item>
    <item>
      <title>Re: i.MX RT1060 RNDIS (AN13940SW)</title>
      <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/i-MX-RT1060-RNDIS-AN13940SW/m-p/1777979#M28117</link>
      <description>&lt;P&gt;Hi&lt;BR /&gt;&lt;BR /&gt;As noted in the other post I think your reference code is performing both CDC enumeration and RNDIS initialisation, which are in fact two different layers, rather than being separated into 2 individual layer modules.&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Mark&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 20 Dec 2023 13:00:57 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/i-MX-RT1060-RNDIS-AN13940SW/m-p/1777979#M28117</guid>
      <dc:creator>mjbcswitzerland</dc:creator>
      <dc:date>2023-12-20T13:00:57Z</dc:date>
    </item>
    <item>
      <title>Re: i.MX RT1060 RNDIS (AN13940SW)</title>
      <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/i-MX-RT1060-RNDIS-AN13940SW/m-p/1777983#M28118</link>
      <description>&lt;P&gt;Hi Mark,&lt;/P&gt;&lt;P&gt;Right, that explains why I was so confused. I thought the additional commands were trying to do the same thing as the RNDIS initialization, but as you say, it's working directly on the CDC interface. I've now mapped out what all the additional commands do, and there's a combination of CDC and Standard Setup commands.&lt;/P&gt;&lt;P&gt;Thanks,&lt;BR /&gt;Daniel&lt;/P&gt;</description>
      <pubDate>Wed, 20 Dec 2023 13:06:32 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/i-MX-RT1060-RNDIS-AN13940SW/m-p/1777983#M28118</guid>
      <dc:creator>dafela</dc:creator>
      <dc:date>2023-12-20T13:06:32Z</dc:date>
    </item>
    <item>
      <title>Re: i.MX RT1060 RNDIS (AN13940SW)</title>
      <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/i-MX-RT1060-RNDIS-AN13940SW/m-p/1777987#M28119</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Thanks for your replies, Mark!&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;There's still one thing that confuses me. You write:&lt;/SPAN&gt;&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;P&gt;&lt;SPAN&gt;RNDIS operates over USB-CDC class [...]&lt;/SPAN&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;SPAN&gt;Is this specified somewhere, is this always the case, or can the RNDIS interface have Bulk IN/OUT endpoints where data is transmitted? This is part of my original confusion about RNDIS, and it's still not quite clear to me &lt;LI-EMOJI id="lia_slightly-smiling-face" title=":slightly_smiling_face:"&gt;&lt;/LI-EMOJI&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;For reference, here's a part of the output from&amp;nbsp;&lt;EM&gt;lsusb&lt;/EM&gt; on the device, showing the RNDIS and CDC interfaces that are associated with RNDIS:&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;    Interface Association:
      bLength                 8
      bDescriptorType        11
      bFirstInterface         0
      bInterfaceCount         2
      bFunctionClass        224 Wireless
      bFunctionSubClass       1 Radio Frequency
      bFunctionProtocol       3 RNDIS
      iFunction               6 
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           1
      bInterfaceClass       224 Wireless
      bInterfaceSubClass      1 Radio Frequency
      bInterfaceProtocol      3 RNDIS
      iInterface              4 
      ** UNRECOGNIZED:  05 24 00 10 01
      ** UNRECOGNIZED:  05 24 01 00 01
      ** UNRECOGNIZED:  04 24 02 00
      ** UNRECOGNIZED:  05 24 06 00 01
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x82  EP 2 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0008  1x 8 bytes
        bInterval              16
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        1
      bAlternateSetting       0
      bNumEndpoints           2
      bInterfaceClass        10 CDC Data
      bInterfaceSubClass      0 
      bInterfaceProtocol      0 
      iInterface              5 
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x01  EP 1 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               0&lt;/LI-CODE&gt;&lt;P&gt;&lt;SPAN&gt;Is it the association that specifies which CDC interface is used for RNDIS (e.g. in the case there are multiple ones)?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Again, thanks for your time!&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Daniel&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 20 Dec 2023 13:15:19 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/i-MX-RT1060-RNDIS-AN13940SW/m-p/1777987#M28119</guid>
      <dc:creator>dafela</dc:creator>
      <dc:date>2023-12-20T13:15:19Z</dc:date>
    </item>
    <item>
      <title>Re: i.MX RT1060 RNDIS (AN13940SW)</title>
      <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/i-MX-RT1060-RNDIS-AN13940SW/m-p/1778046#M28121</link>
      <description>&lt;P&gt;Hi&lt;BR /&gt;&lt;BR /&gt;See section 2 of &lt;A href="https://www.utasker.com/docs/uTasker/uTaskerRNDIS.pdf" target="_blank"&gt;https://www.utasker.com/docs/uTasker/uTaskerRNDIS.pdf&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Interface Association descriptors are used when there are multiple USB-CDC interfaces but can also be used when there is just one and so there are various ways that the same can be achieved. I also use the Interface Association as standard since it keeps all cases following the same pattern (whether one, two or up to 7 CDCs). &lt;EM&gt;In fact it simplifies installing drivers on Windows if I remember correctly, although such details change with new Windows versions.&lt;/EM&gt;&lt;BR /&gt;&lt;BR /&gt;Essentially you just have a CDC interface which has a bi-directional bulk endpoint (used by Ethernet-type data by RNDIS) and an interrupt endpoint [like any CDC].&lt;BR /&gt;The RNDIS layer "chooses" to use the bulk endpoints to send and receive Ethernet type data. It uses the interrupt endpoint to signal to the host when it has messages to exchange and it uses the (always there) control endpoint 0 for the RNDIS messaging itself&lt;BR /&gt;&lt;BR /&gt;Therefore RNDIS just uses/or abuses a CDC interface as transport/signalling pipes to do its work. For RNDIS CDC is just the medium to exchange data and it could (if Microsoft has specified it differently when they invented it) butchered CDC in a different way or even done similar on various other USB class transport layers - but CDC matches fine.&lt;BR /&gt;&lt;BR /&gt;&lt;EM&gt;Some notes:&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;- the RNDIS interface type is optional - often a vendor specific one (0xff) is specified instead&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;- I see the interrupt endpoint is only 8 bytes in size, whereby typically it is 16 but this is probably not really relevant since 8 is presumably large enough&lt;/EM&gt;&lt;BR /&gt;&lt;BR /&gt;It is interesting to compare how typical tethered devices (like Android phones, modems etc.) configure the interfaces and I tend to use what is commonly seen there, but some deviations are quite normal since such things can be specified in different ways. If you have a working configuration accepted by MAC, Windows and Linux there is probably no reason to change anything.&lt;BR /&gt;&lt;BR /&gt;Regards&lt;BR /&gt;&lt;BR /&gt;Mark&lt;/P&gt;</description>
      <pubDate>Wed, 20 Dec 2023 15:08:04 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/i-MX-RT1060-RNDIS-AN13940SW/m-p/1778046#M28121</guid>
      <dc:creator>mjbcswitzerland</dc:creator>
      <dc:date>2023-12-20T15:08:04Z</dc:date>
    </item>
    <item>
      <title>Re: i.MX RT1060 RNDIS (AN13940SW)</title>
      <link>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/i-MX-RT1060-RNDIS-AN13940SW/m-p/1778503#M28142</link>
      <description>&lt;P&gt;Thanks for the clarification, Mark!&lt;/P&gt;</description>
      <pubDate>Thu, 21 Dec 2023 07:51:01 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-RT-Crossover-MCUs/i-MX-RT1060-RNDIS-AN13940SW/m-p/1778503#M28142</guid>
      <dc:creator>dafela</dc:creator>
      <dc:date>2023-12-21T07:51:01Z</dc:date>
    </item>
  </channel>
</rss>

