Hi
You can also try the uTasker FRDM-K66F RNDIS host - there is a binary at this link:
https://www.utasker.com/kinetis/FRDM-K66F.html
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.
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.
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.
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
USB HS device detected
USB device information ready:
USB2.0 device with 64 byte pipe
Vendor/Product = 0x12d1/0x108a
Manufacturer = "HUAWEI"
Product = "POT-LX1"
Serial Number = "39V4C2061600123"
Self-powered device with 2 interface(s)
Associated Interfaces = 2
Interface 0
2 = INTERRUPT with size 8 (interval = 32ms)
CDC (RNDIS) class
Interface 1
1 = BULK IN with size 512
1 = BULK OUT with size 512
CDC (RNDIS) class
Enumerated [1]
RNDIS Init
Device notification: REMOTE_NDIS_INITIALIZE_COMPLETE
Version = 1.1
ETHERNET type
Query: Device notification: REMOTE_NDIS_QUERY_COMPLETE
OIDs
00010101 = OID_GEN_SUPPORTED_LIST
00010102 = OID_GEN_HARDWARE_STATUS
00010103 = OID_GEN_MEDIA_SUPPORTED
00010104 = OID_GEN_MEDIA_IN_USE
00010106 = OID_GEN_MAXIMUM_FRAME_SIZE
00010107 = OID_GEN_LINK_SPEED
0001010a = OID_GEN_TRANSMIT_BLOCK_SIZE
0001010b = OID_GEN_RECEIVE_BLOCK_SIZE
0001010c = OID_GEN_VENDOR_ID
0001010d = OID_GEN_VENDOR_DESCRIPTION
00010116 = OID_GEN_VENDOR_DRIVER_VERSION
0001010e = OID_GEN_CURRENT_PACKET_FILTER
00010111 = OID_GEN_MAXIMUM_TOTAL_SIZE
00010114 = OID_GEN_MEDIA_CONNECT_STATUS
00010202 = Unknown
00020101 = OID_GEN_XMIT_OK
00020102 = OID_GEN_RCV_OK
00020103 = OID_GEN_XMIT_ERROR
00020104 = OID_GEN_RCV_ERROR
00020105 = OID_GEN_RCV_NO_BUFFER
01010101 = OID_802_3_PERMANENT_ADDRESS
01010102 = OID_802_3_CURRENT_ADDRESS
01010103 = OID_802_3_MULTICAST_LIST
01010105 = OID_802_3_MAC_OPTIONS
01010104 = OID_802_3_MAXIMUM_LIST_SIZE
01020101 = OID_802_3_RCV_ERROR_ALIGNMENT
01020102 = OID_802_3_XMIT_ONE_COLLISION
01020103 = OID_802_3_XMIT_MORE_COLLISIONS
Query: Device notification: RNDIS Status: Connected
Device notification: REMOTE_NDIS_QUERY_COMPLETE
OID 00010202 = Unknown received [0x00000000]
Query: Device notification: REMOTE_NDIS_QUERY_COMPLETE
OID 00010106 = OID_GEN_MAXIMUM_FRAME_SIZE received [0x000005dc]
Query: Device notification: REMOTE_NDIS_QUERY_COMPLETE
OID 00010107 = OID_GEN_LINK_SPEED received [0x00410000]
Query: Device notification: REMOTE_NDIS_QUERY_COMPLETE
OID 00010114 = OID_GEN_MEDIA_CONNECT_STATUS received [0x00000000]
Query: Device notification: REMOTE_NDIS_QUERY_COMPLETE
OID 01010102 = OID_802_3_CURRENT_ADDRESS received [ 0x02 0x03 0x39 0x51 0x37 0x46]
Query: Device notification: REMOTE_NDIS_QUERY_COMPLETE
OID 01010101 = OID_802_3_PERMANENT_ADDRESS received [ 0x02 0x03 0x39 0x51 0x37 0x46]
Query: Device notification: Set complete
Query: RNDIS->Eth:54-98
Device notification: Set complete
Query: Device notification: Set complete
Query: Device notification: REMOTE_NDIS_QUERY_COMPLETE
OID 00010111 = OID_GEN_MAXIMUM_TOTAL_SIZE received [0x00000616]
RNDIS initialisation complete
Starting DHCP
RNDIS operating
RNDIS->Eth:89-133
RNDIS->Eth:89-133
RNDIS->Eth:150-194
RNDIS->Eth:150-194
RNDIS->Eth:170-214
RNDIS->Eth:54-98
RNDIS->Eth:170-214
RNDIS->Eth:54-98
RNDIS->Eth:123-167
RNDIS->Eth:143-187
RNDIS->Eth:123-167
RNDIS->Eth:143-187
RNDIS->Eth:123-167
RNDIS->Eth:143-187
RNDIS->Eth:90-134
RNDIS->Eth:290-334
RNDIS->Eth:310-354
RNDIS->Eth:290-334
RNDIS->Eth:310-354
RNDIS->Eth:290-334
RNDIS->Eth:310-354
Stack->RNDIS:342-386
Stack->RNDIS:342-386
RNDIS->Stack->Eth:345-389
RNDIS->Stack->Eth:354-398
DHCP successful: 192.168.42.197
Note that during the initialisation the maximum frame size that the RNSID device can handle is reported in
OID 00010106 = OID_GEN_MAXIMUM_FRAME_SIZE received [0x000005dc] <--- 1500 bytes in this case, which is equal to the MTU of Ethernet
During subsequent operation (a PCC using it as gateway via Ethernet->RNDIS) the largest frames in any direction are:
Eth->RNDIS:1494:1538
RNDIS->Eth:1494-1538
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.
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.
Regards
Mark
[uTasker project developer for Kinetis and i.MX RT]
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