Requirements for Ethernet via USB device to be recognized by iOS

Dear developer community, I hope someone can help me out with an USB-related issue. Specifically, we are developing a device which, among other USB interfaces, should support Ethernet over USB. You can imagine the device as a box that connects via USB to a computer and, among other services, has a TCP/IP stack and a web server running inside the box. So our device assigns an IP to the connected computer via DHCP, and takes HTTP requests. Since our hardware is an STM32F4, we started from the following demo project: https://github.com/fetisov/lrndis Now the problem: When we connect our device to a Windows machine, everything works as expected. The device is recognized as a network interface, and the Windows machine can access the web server running on the device. However, when we connect our device to an iPhone through the Camera Connection Kit, nothing happens. Unfortunately that's all we know---really nothing happens. Especially, the Ethernet entry within Preferences does not appear, the web server is inaccessible, and all in all we get no indication that the device was even recognized. I'm pretty sure this has to do with the USB descriptor, as the iPhone speaks Ethernet via USB in theory, and we've got some adapters that work, at least to some degree. We tried imitating one of those by making the descriptor match as much as felt comfortable, but still the device was not recognized. Could anyone please offer some advice as to what iOS is looking for in an Ethernet via USB device? Is there any documentation on this, except for the official USB specs which I'm sure the library's author has studied? Any help is appreciated. Best regards, Felix Grützmacher

Our descriptor currently looks like this:

Device Descriptor:

0x12 bLength 0x01 bDescriptorType 0x0200 bcdUSB 0xE0 bDeviceClass (Wireless Controller) 0x00 bDeviceSubClass
0x00 bDeviceProtocol
0x40 bMaxPacketSize0 (64 bytes) 0x1FE4 idVendor 0x4143 idProduct 0x0318 bcdDevice 0x01 iManufacturer "Help Tech" 0x02 iProduct "STM32F4 RNDIS" 0x03 iSerialNumber "00000000123C" 0x01 bNumConfigurations


Configuration Descriptor:

0x09 bLength 0x02 bDescriptorType 0x004B wTotalLength (75 bytes) 0x02 bNumInterfaces 0x01 bConfigurationValue 0x00 iConfiguration 0xA0 bmAttributes (Bus-powered Device, Remote-Wakeup) 0x01 bMaxPower (2 mA)

Interface Association Descriptor:

0x08 bLength 0x0B bDescriptorType 0x00 bFirstInterface 0x02 bInterfaceCount 0xE0 bFunctionClass (Wireless Controller) 0x01 bFunctionSubClass
0x03 bFunctionProtocol
0x08 iFunction

Interface Descriptor:

0x09 bLength 0x04 bDescriptorType 0x00 bInterfaceNumber 0x00 bAlternateSetting 0x01 bNumEndPoints 0xE0 bInterfaceClass (Wireless Controller) 0x01 bInterfaceSubClass
0x03 bInterfaceProtocol
0x06 iInterface

Unknown Descriptor:

0x05 bLength 0x24 bDescriptorType Hex dump: 0x05 0x24 0x00 0x10 0x01

Unknown Descriptor:

0x05 bLength 0x24 bDescriptorType Hex dump: 0x05 0x24 0x01 0x00 0x01

Unknown Descriptor:

0x04 bLength 0x24 bDescriptorType Hex dump: 0x04 0x24 0x02 0x00

Unknown Descriptor:

0x05 bLength 0x24 bDescriptorType Hex dump: 0x05 0x24 0x06 0x00 0x01

Endpoint Descriptor:

0x07 bLength 0x05 bDescriptorType 0x81 bEndpointAddress (IN endpoint 1) 0x03 bmAttributes (Transfer: Interrupt / Synch: None / Usage: Data) 0x0008 wMaxPacketSize (1 x 8 bytes) 0x09 bInterval (9 frames)

Interface Descriptor:

0x09 bLength 0x04 bDescriptorType 0x01 bInterfaceNumber 0x00 bAlternateSetting 0x02 bNumEndPoints 0x0A bInterfaceClass (CDC Data) 0x00 bInterfaceSubClass
0x00 bInterfaceProtocol
0x07 iInterface

Endpoint Descriptor:

0x07 bLength 0x05 bDescriptorType 0x82 bEndpointAddress (IN endpoint 2) 0x02 bmAttributes (Transfer: Bulk / Synch: None / Usage: Data) 0x0040 wMaxPacketSize (64 bytes) 0x00 bInterval

Endpoint Descriptor:

0x07 bLength 0x05 bDescriptorType 0x03 bEndpointAddress (OUT endpoint 3) 0x02 bmAttributes (Transfer: Bulk / Synch: None / Usage: Data) 0x0040 wMaxPacketSize (64 bytes) 0x00 bInterval

Microsoft OS Descriptor is not available. Error code: 0x0000001F


String Descriptor Table

Index LANGID String 0x00 0x0000 0x0409 0x01 0x0409 "Help Tech" 0x02 0x0409 "STM32F4 RNDIS" 0x03 0x0409 "00000000123C" 0x06 0x0409 Request failed with 0x0000001F 0x07 0x0409 Request failed with 0x0000001F 0x08 0x0409 Request failed with 0x0000001F


Connection path for device: USB-xHCI-kompatibler Hostcontroller Root Hub STM32F4 RNDIS (VID=0x1FE4 PID=0x4143) Port: 5

Running on: Windows 10 or greater (Build Version 19043)

Brought to you by TDD v2.17.0, Feb 23 2021, 14:04:02

Requirements for Ethernet via USB device to be recognized by iOS
 
 
Q