<?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>MCUXpresso SDK中的主题 Re: USB errors with LWIP USB Sample</title>
    <link>https://community.nxp.com/t5/MCUXpresso-SDK/USB-errors-with-LWIP-USB-Sample/m-p/1134448#M2735</link>
    <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&lt;EM&gt;You can also try the uTasker FRDM-K66F RNDIS host - there is a binary at this link:&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&lt;A href="https://www.utasker.com/kinetis/FRDM-K66F.html" target="_blank"&gt;https://www.utasker.com/kinetis/FRDM-K66F.html&lt;/A&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;which allows the board's HS host to be attached to memory sticks (and browse the file content) or to smart phones to use their tethered USB connections for Internet access.&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;Furthermore, devices connected on its Ethernet connection can use the Smart phone's gateway for Internet access or to communicate with the FRDM-K66s web or FTP servers, or to control the board via Telnet.&lt;BR /&gt;The application is available for any Kinetis with FS or HS USB and also on any i.MX RT part, but a HS USB is recommended.&lt;BR /&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;With respect to your question: the following is the debug output of the reference when connecting to a certain smart phone, showing enumeration, RNDIS initialisation and then DHCP frames&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;USB HS device detected&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;USB device information ready:&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;USB2.0 device with 64 byte pipe&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;Vendor/Product = 0x12d1/0x108a&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;Manufacturer = "HUAWEI"&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;Product = "POT-LX1"&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;Serial Number = "39V4C2061600123"&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;Self-powered device with 2 interface(s)&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;Associated Interfaces = 2&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;Interface 0&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;2 = INTERRUPT with size 8 (interval = 32ms)&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;CDC (RNDIS) class&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;Interface 1&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;1 = BULK IN with size 512&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;1 = BULK OUT with size 512&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;CDC (RNDIS) class&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;Enumerated [1]&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;RNDIS Init&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;Device notification: REMOTE_NDIS_INITIALIZE_COMPLETE&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;Version = 1.1&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;ETHERNET type&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;Query: Device notification: REMOTE_NDIS_QUERY_COMPLETE&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;OIDs&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;00010101 = OID_GEN_SUPPORTED_LIST&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;00010102 = OID_GEN_HARDWARE_STATUS&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;00010103 = OID_GEN_MEDIA_SUPPORTED&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;00010104 = OID_GEN_MEDIA_IN_USE&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;00010106 = OID_GEN_MAXIMUM_FRAME_SIZE&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;00010107 = OID_GEN_LINK_SPEED&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;0001010a = OID_GEN_TRANSMIT_BLOCK_SIZE&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;0001010b = OID_GEN_RECEIVE_BLOCK_SIZE&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;0001010c = OID_GEN_VENDOR_ID&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;0001010d = OID_GEN_VENDOR_DESCRIPTION&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;00010116 = OID_GEN_VENDOR_DRIVER_VERSION&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;0001010e = OID_GEN_CURRENT_PACKET_FILTER&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;00010111 = OID_GEN_MAXIMUM_TOTAL_SIZE&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;00010114 = OID_GEN_MEDIA_CONNECT_STATUS&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;00010202 = Unknown&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;00020101 = OID_GEN_XMIT_OK&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;00020102 = OID_GEN_RCV_OK&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;00020103 = OID_GEN_XMIT_ERROR&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;00020104 = OID_GEN_RCV_ERROR&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;00020105 = OID_GEN_RCV_NO_BUFFER&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;01010101 = OID_802_3_PERMANENT_ADDRESS&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;01010102 = OID_802_3_CURRENT_ADDRESS&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;01010103 = OID_802_3_MULTICAST_LIST&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;01010105 = OID_802_3_MAC_OPTIONS&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;01010104 = OID_802_3_MAXIMUM_LIST_SIZE&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;01020101 = OID_802_3_RCV_ERROR_ALIGNMENT&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;01020102 = OID_802_3_XMIT_ONE_COLLISION&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;01020103 = OID_802_3_XMIT_MORE_COLLISIONS&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;Query: Device notification: RNDIS Status: Connected&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;Device notification: REMOTE_NDIS_QUERY_COMPLETE&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;OID 00010202 = Unknown received [0x00000000]&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;Query: Device notification: REMOTE_NDIS_QUERY_COMPLETE&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;OID 00010106 = OID_GEN_MAXIMUM_FRAME_SIZE received [0x000005dc]&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;Query: Device notification: REMOTE_NDIS_QUERY_COMPLETE&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;OID 00010107 = OID_GEN_LINK_SPEED received [0x00410000]&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;Query: Device notification: REMOTE_NDIS_QUERY_COMPLETE&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;OID 00010114 = OID_GEN_MEDIA_CONNECT_STATUS received [0x00000000]&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;Query: Device notification: REMOTE_NDIS_QUERY_COMPLETE&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;OID 01010102 = OID_802_3_CURRENT_ADDRESS received [ 0x02 0x03 0x39 0x51 0x37 0x46]&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;Query: Device notification: REMOTE_NDIS_QUERY_COMPLETE&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;OID 01010101 = OID_802_3_PERMANENT_ADDRESS received [ 0x02 0x03 0x39 0x51 0x37 0x46]&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;Query: Device notification: Set complete&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;Query: RNDIS-&amp;gt;Eth:54-98&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;Device notification: Set complete&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;Query: Device notification: Set complete&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;Query: Device notification: REMOTE_NDIS_QUERY_COMPLETE&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;OID 00010111 = OID_GEN_MAXIMUM_TOTAL_SIZE received [0x00000616]&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;RNDIS initialisation complete&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;Starting DHCP&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;RNDIS operating&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;RNDIS-&amp;gt;Eth:89-133&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;RNDIS-&amp;gt;Eth:89-133&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;RNDIS-&amp;gt;Eth:150-194&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;RNDIS-&amp;gt;Eth:150-194&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;RNDIS-&amp;gt;Eth:170-214&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;RNDIS-&amp;gt;Eth:54-98&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;RNDIS-&amp;gt;Eth:170-214&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;RNDIS-&amp;gt;Eth:54-98&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;RNDIS-&amp;gt;Eth:123-167&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;RNDIS-&amp;gt;Eth:143-187&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;RNDIS-&amp;gt;Eth:123-167&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;RNDIS-&amp;gt;Eth:143-187&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;RNDIS-&amp;gt;Eth:123-167&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;RNDIS-&amp;gt;Eth:143-187&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;RNDIS-&amp;gt;Eth:90-134&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;RNDIS-&amp;gt;Eth:290-334&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;RNDIS-&amp;gt;Eth:310-354&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;RNDIS-&amp;gt;Eth:290-334&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;RNDIS-&amp;gt;Eth:310-354&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;RNDIS-&amp;gt;Eth:290-334&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;RNDIS-&amp;gt;Eth:310-354&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;Stack-&amp;gt;RNDIS:342-386&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;Stack-&amp;gt;RNDIS:342-386&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;RNDIS-&amp;gt;Stack-&amp;gt;Eth:345-389&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;RNDIS-&amp;gt;Stack-&amp;gt;Eth:354-398&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;DHCP successful: 192.168.42.197&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;Note that during the initialisation the maximum frame size that the RNSID device can handle is reported in&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;OID 00010106 = OID_GEN_MAXIMUM_FRAME_SIZE received [0x000005dc]&lt;/FONT&gt; &lt;STRONG&gt;&amp;lt;--- 1500 bytes in this case, which is equal to the MTU of Ethernet&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;During subsequent operation (a PCC using it as gateway via Ethernet-&amp;gt;RNDIS) the largest frames in any direction are:&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;Eth-&amp;gt;RNDIS:1494:1538&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;RNDIS-&amp;gt;Eth:1494-1538&lt;/FONT&gt;&lt;BR /&gt;which means that the RAW payload content is 1494 bytes in size, giving 1538 bytes on the USB bus (with the RNDIS header). This is symmetrical since the RNDIS data protocol is the same in both directions.&lt;BR /&gt;&lt;BR /&gt;I think that you need to respect the MTU value reported and fragment any IP traffic that exceeds this to be able to operate correctly. Jumbo frames, for example, may work on Ethernet but can't pass via RNDIS unless packed into multiple IP fragments according to standard IP strategy.&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Mark&lt;BR /&gt;&lt;EM&gt;[uTasker project developer for Kinetis and i.MX RT]&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;P.S: I just posted this using a PC connected to my FRDM-K66F's Ethernet interface and using the above HUAWEI smart phone as tethered connection via USB&lt;/P&gt;</description>
    <pubDate>Wed, 02 Sep 2020 16:34:02 GMT</pubDate>
    <dc:creator>mjbcswitzerland</dc:creator>
    <dc:date>2020-09-02T16:34:02Z</dc:date>
    <item>
      <title>USB errors with LWIP USB Sample</title>
      <link>https://community.nxp.com/t5/MCUXpresso-SDK/USB-errors-with-LWIP-USB-Sample/m-p/1055344#M2384</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm using MCUXpresso and an FRDMK66F board, I have imported the lwip_dhcp_usb_freertos code sample and made some alterations to suit my use case. When transferring ethernet frames via the USB RNDIS interface, I get USB errors if the frames are larger than around ~1250 bytes. I'm not sure exactly what size causes the error but frames of 1254 bytes definitely transfer OK, whereas I cannot successfully transfer frames of 1514 bytes (the typical maximum size for Ethernet, jumbo frames notwithstanding).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have established the error is in the USB code in the sample, when large packets are attempted to be sent to FRDM-K66F from the Android phone it is tethered to the RNDIS USB event handler receives an event with event code 'kStatus_USB_TransferFailed'. In the USB Host EHCI code this status is set when the transfer status is checked against the EHCI_HOST_QH_STATUS_NOSTALL_ERROR_MASK constant. I'm not a USB expert at all so I'm not sure where to proceed from here. I've already tried tweaking a few values in the USB HOST CONFIG such as increasing the value of USB_HOST_CONFIG_ENUMERATION_MAX_STALL_RETRIES, but not managed to make any difference to the issue in doing so.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Jul 2020 17:30:53 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCUXpresso-SDK/USB-errors-with-LWIP-USB-Sample/m-p/1055344#M2384</guid>
      <dc:creator>tomgibsoncsw</dc:creator>
      <dc:date>2020-07-16T17:30:53Z</dc:date>
    </item>
    <item>
      <title>Re: USB errors with LWIP USB Sample</title>
      <link>https://community.nxp.com/t5/MCUXpresso-SDK/USB-errors-with-LWIP-USB-Sample/m-p/1134208#M2729</link>
      <description>&lt;P&gt;Hi Tom:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;According to middleware/lwip/port/usb_ethernetif.h&lt;/P&gt;
&lt;P&gt;#define RNDIS_DATA_MESSAGE (RNDIS_FRAME_MAX_FRAMELEN + RNDIS_DAT_MSG_HEADER_SIZE + 1)&lt;/P&gt;
&lt;P&gt;The max frame length should be 1518.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Could you please let me know how to reproduce your issue with Frdm-k66 board?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;There is a bare metal version of lwip_dhcp_usb demo,&amp;nbsp; did you try this demo? the same result?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards&lt;/P&gt;
&lt;P&gt;Daniel&lt;/P&gt;</description>
      <pubDate>Wed, 02 Sep 2020 12:27:10 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCUXpresso-SDK/USB-errors-with-LWIP-USB-Sample/m-p/1134208#M2729</guid>
      <dc:creator>danielchen</dc:creator>
      <dc:date>2020-09-02T12:27:10Z</dc:date>
    </item>
    <item>
      <title>Re: USB errors with LWIP USB Sample</title>
      <link>https://community.nxp.com/t5/MCUXpresso-SDK/USB-errors-with-LWIP-USB-Sample/m-p/1134217#M2730</link>
      <description>&lt;P&gt;Also you should make sure the data length your device send is less than( &amp;lt;= ) 1518,&amp;nbsp; &amp;nbsp; &amp;nbsp;1518 is the real data size on the usb bus.&lt;/P&gt;</description>
      <pubDate>Wed, 02 Sep 2020 12:34:46 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCUXpresso-SDK/USB-errors-with-LWIP-USB-Sample/m-p/1134217#M2730</guid>
      <dc:creator>danielchen</dc:creator>
      <dc:date>2020-09-02T12:34:46Z</dc:date>
    </item>
    <item>
      <title>Re: USB errors with LWIP USB Sample</title>
      <link>https://community.nxp.com/t5/MCUXpresso-SDK/USB-errors-with-LWIP-USB-Sample/m-p/1134448#M2735</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&lt;EM&gt;You can also try the uTasker FRDM-K66F RNDIS host - there is a binary at this link:&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&lt;A href="https://www.utasker.com/kinetis/FRDM-K66F.html" target="_blank"&gt;https://www.utasker.com/kinetis/FRDM-K66F.html&lt;/A&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;which allows the board's HS host to be attached to memory sticks (and browse the file content) or to smart phones to use their tethered USB connections for Internet access.&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;Furthermore, devices connected on its Ethernet connection can use the Smart phone's gateway for Internet access or to communicate with the FRDM-K66s web or FTP servers, or to control the board via Telnet.&lt;BR /&gt;The application is available for any Kinetis with FS or HS USB and also on any i.MX RT part, but a HS USB is recommended.&lt;BR /&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;With respect to your question: the following is the debug output of the reference when connecting to a certain smart phone, showing enumeration, RNDIS initialisation and then DHCP frames&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;USB HS device detected&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;USB device information ready:&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;USB2.0 device with 64 byte pipe&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;Vendor/Product = 0x12d1/0x108a&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;Manufacturer = "HUAWEI"&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;Product = "POT-LX1"&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;Serial Number = "39V4C2061600123"&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;Self-powered device with 2 interface(s)&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;Associated Interfaces = 2&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;Interface 0&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;2 = INTERRUPT with size 8 (interval = 32ms)&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;CDC (RNDIS) class&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;Interface 1&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;1 = BULK IN with size 512&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;1 = BULK OUT with size 512&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;CDC (RNDIS) class&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;Enumerated [1]&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;RNDIS Init&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;Device notification: REMOTE_NDIS_INITIALIZE_COMPLETE&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;Version = 1.1&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;ETHERNET type&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;Query: Device notification: REMOTE_NDIS_QUERY_COMPLETE&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;OIDs&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;00010101 = OID_GEN_SUPPORTED_LIST&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;00010102 = OID_GEN_HARDWARE_STATUS&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;00010103 = OID_GEN_MEDIA_SUPPORTED&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;00010104 = OID_GEN_MEDIA_IN_USE&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;00010106 = OID_GEN_MAXIMUM_FRAME_SIZE&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;00010107 = OID_GEN_LINK_SPEED&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;0001010a = OID_GEN_TRANSMIT_BLOCK_SIZE&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;0001010b = OID_GEN_RECEIVE_BLOCK_SIZE&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;0001010c = OID_GEN_VENDOR_ID&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;0001010d = OID_GEN_VENDOR_DESCRIPTION&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;00010116 = OID_GEN_VENDOR_DRIVER_VERSION&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;0001010e = OID_GEN_CURRENT_PACKET_FILTER&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;00010111 = OID_GEN_MAXIMUM_TOTAL_SIZE&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;00010114 = OID_GEN_MEDIA_CONNECT_STATUS&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;00010202 = Unknown&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;00020101 = OID_GEN_XMIT_OK&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;00020102 = OID_GEN_RCV_OK&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;00020103 = OID_GEN_XMIT_ERROR&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;00020104 = OID_GEN_RCV_ERROR&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;00020105 = OID_GEN_RCV_NO_BUFFER&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;01010101 = OID_802_3_PERMANENT_ADDRESS&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;01010102 = OID_802_3_CURRENT_ADDRESS&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;01010103 = OID_802_3_MULTICAST_LIST&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;01010105 = OID_802_3_MAC_OPTIONS&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;01010104 = OID_802_3_MAXIMUM_LIST_SIZE&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;01020101 = OID_802_3_RCV_ERROR_ALIGNMENT&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;01020102 = OID_802_3_XMIT_ONE_COLLISION&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;01020103 = OID_802_3_XMIT_MORE_COLLISIONS&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;Query: Device notification: RNDIS Status: Connected&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;Device notification: REMOTE_NDIS_QUERY_COMPLETE&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;OID 00010202 = Unknown received [0x00000000]&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;Query: Device notification: REMOTE_NDIS_QUERY_COMPLETE&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;OID 00010106 = OID_GEN_MAXIMUM_FRAME_SIZE received [0x000005dc]&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;Query: Device notification: REMOTE_NDIS_QUERY_COMPLETE&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;OID 00010107 = OID_GEN_LINK_SPEED received [0x00410000]&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;Query: Device notification: REMOTE_NDIS_QUERY_COMPLETE&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;OID 00010114 = OID_GEN_MEDIA_CONNECT_STATUS received [0x00000000]&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;Query: Device notification: REMOTE_NDIS_QUERY_COMPLETE&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;OID 01010102 = OID_802_3_CURRENT_ADDRESS received [ 0x02 0x03 0x39 0x51 0x37 0x46]&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;Query: Device notification: REMOTE_NDIS_QUERY_COMPLETE&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;OID 01010101 = OID_802_3_PERMANENT_ADDRESS received [ 0x02 0x03 0x39 0x51 0x37 0x46]&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;Query: Device notification: Set complete&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;Query: RNDIS-&amp;gt;Eth:54-98&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;Device notification: Set complete&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;Query: Device notification: Set complete&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;Query: Device notification: REMOTE_NDIS_QUERY_COMPLETE&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;OID 00010111 = OID_GEN_MAXIMUM_TOTAL_SIZE received [0x00000616]&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;RNDIS initialisation complete&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;Starting DHCP&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;RNDIS operating&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;RNDIS-&amp;gt;Eth:89-133&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;RNDIS-&amp;gt;Eth:89-133&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;RNDIS-&amp;gt;Eth:150-194&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;RNDIS-&amp;gt;Eth:150-194&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;RNDIS-&amp;gt;Eth:170-214&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;RNDIS-&amp;gt;Eth:54-98&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;RNDIS-&amp;gt;Eth:170-214&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;RNDIS-&amp;gt;Eth:54-98&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;RNDIS-&amp;gt;Eth:123-167&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;RNDIS-&amp;gt;Eth:143-187&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;RNDIS-&amp;gt;Eth:123-167&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;RNDIS-&amp;gt;Eth:143-187&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;RNDIS-&amp;gt;Eth:123-167&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;RNDIS-&amp;gt;Eth:143-187&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;RNDIS-&amp;gt;Eth:90-134&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;RNDIS-&amp;gt;Eth:290-334&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;RNDIS-&amp;gt;Eth:310-354&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;RNDIS-&amp;gt;Eth:290-334&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;RNDIS-&amp;gt;Eth:310-354&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;RNDIS-&amp;gt;Eth:290-334&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;RNDIS-&amp;gt;Eth:310-354&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;Stack-&amp;gt;RNDIS:342-386&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;Stack-&amp;gt;RNDIS:342-386&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;RNDIS-&amp;gt;Stack-&amp;gt;Eth:345-389&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;RNDIS-&amp;gt;Stack-&amp;gt;Eth:354-398&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;DHCP successful: 192.168.42.197&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;Note that during the initialisation the maximum frame size that the RNSID device can handle is reported in&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;OID 00010106 = OID_GEN_MAXIMUM_FRAME_SIZE received [0x000005dc]&lt;/FONT&gt; &lt;STRONG&gt;&amp;lt;--- 1500 bytes in this case, which is equal to the MTU of Ethernet&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;During subsequent operation (a PCC using it as gateway via Ethernet-&amp;gt;RNDIS) the largest frames in any direction are:&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;Eth-&amp;gt;RNDIS:1494:1538&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;RNDIS-&amp;gt;Eth:1494-1538&lt;/FONT&gt;&lt;BR /&gt;which means that the RAW payload content is 1494 bytes in size, giving 1538 bytes on the USB bus (with the RNDIS header). This is symmetrical since the RNDIS data protocol is the same in both directions.&lt;BR /&gt;&lt;BR /&gt;I think that you need to respect the MTU value reported and fragment any IP traffic that exceeds this to be able to operate correctly. Jumbo frames, for example, may work on Ethernet but can't pass via RNDIS unless packed into multiple IP fragments according to standard IP strategy.&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Mark&lt;BR /&gt;&lt;EM&gt;[uTasker project developer for Kinetis and i.MX RT]&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;P.S: I just posted this using a PC connected to my FRDM-K66F's Ethernet interface and using the above HUAWEI smart phone as tethered connection via USB&lt;/P&gt;</description>
      <pubDate>Wed, 02 Sep 2020 16:34:02 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCUXpresso-SDK/USB-errors-with-LWIP-USB-Sample/m-p/1134448#M2735</guid>
      <dc:creator>mjbcswitzerland</dc:creator>
      <dc:date>2020-09-02T16:34:02Z</dc:date>
    </item>
  </channel>
</rss>

