g_ether does not work with Windows
Posted: Tue Aug 30, 2016 2:02 am
I have spent a lot of time researching this problem so I have left out anything pertinent, please let me know and I will fill in the detail.
Scenario
Compile the linux-3.4.y kernel with the config options:
This will result in the g_ether kernel module being built.
Turn on the NanoPC TC-2. Connect the USB OTG port (micro USB B) to the windows machine. Windows will attempt to load a driver, which will succeed at first and then fail with:
This device cannot start (Code 10)
On the Linux side, the following is output to /var/log/debug:
I have installed USBPcap on the Windows machine to inspect the traffic flowing out of the Windows machine to the Linux machine. Here are the relevant parts:
Note that the SEND ENCAPSULATED COMMAND sequence corresponds to the rndis req21.00 v0000 i0000 l24 from the Linux side and the GET ENCAPSULATED RESPONSE corresponds to the rndis reqa1.01 v0000 i0000 l4096 line.
So it appears that the g_ether module is unable to satisfy the GET ENCAPSULATED RESPONSE request from the Windows machine.
Now I know this is likely not something that FriendlyARM is directly responsible for, but since this is a FriendlyARM computer I figured I would start asking questions here first.
Has anyone seen this issue or had issues connecting the FriendlyARM boards to Windows machines via Ethernet over USB OTG?
Scenario
Compile the linux-3.4.y kernel with the config options:
Code: Select all
CONFIG_USB_ETH=m
CONFIG_USB_ETH_RNDIS=y
This will result in the g_ether kernel module being built.
Turn on the NanoPC TC-2. Connect the USB OTG port (micro USB B) to the windows machine. Windows will attempt to load a driver, which will succeed at first and then fail with:
This device cannot start (Code 10)
On the Linux side, the following is output to /var/log/debug:
Code: Select all
Aug 29 05:13:45 dot-8f2wktlxah kernel: [ 22.616000] g_ether gadget: suspend
Aug 29 05:13:54 dot-8f2wktlxah kernel: [ 31.840000] g_ether gadget: init rndis
Aug 29 05:13:54 dot-8f2wktlxah kernel: [ 31.840000] g_ether gadget: RNDIS RX/TX early activation ...
Aug 29 05:13:54 dot-8f2wktlxah kernel: [ 32.116000] usb0: qlen 10
Aug 29 05:13:56 dot-8f2wktlxah kernel: [ 34.128000] g_ether gadget: rndis req21.00 v0000 i0000 l24
Aug 29 05:13:56 dot-8f2wktlxah kernel: [ 34.540000] g_ether gadget: rndis reqa1.01 v0000 i0000 l4096
I have installed USBPcap on the Windows machine to inspect the traffic flowing out of the Windows machine to the Linux machine. Here are the relevant parts:
Code: Select all
1226 29734.081932 host 2.1.0 USBCOM 36 SEND ENCAPSULATED COMMAND Request
1227 29735.362932 2.1.0 host USBCOM 52 SEND ENCAPSULATED COMMAND Response
1228 29735.362932 2.1.0 host USB 28 GET STATUS Status
1229 29735.810932 2.1.2 host USBCOM 35 NETWORK CONNECTION
1230 29735.810932 host 2.1.0 USBCOM 36 GET ENCAPSULATED RESPONSE Request
Note that the SEND ENCAPSULATED COMMAND sequence corresponds to the rndis req21.00 v0000 i0000 l24 from the Linux side and the GET ENCAPSULATED RESPONSE corresponds to the rndis reqa1.01 v0000 i0000 l4096 line.
So it appears that the g_ether module is unable to satisfy the GET ENCAPSULATED RESPONSE request from the Windows machine.
Now I know this is likely not something that FriendlyARM is directly responsible for, but since this is a FriendlyARM computer I figured I would start asking questions here first.
Has anyone seen this issue or had issues connecting the FriendlyARM boards to Windows machines via Ethernet over USB OTG?