Javaxtreme
Javaxtreme

Reputation: 373

Windows 7/8 cannot connect to g_ether in Linux 3.4

I have an embedded computer that is running Linux 3.4, and there is not a way for me to upgrade to 4.x.y at the moment unfortunately.

I have compiled g_ether as a kernel module using the following configuration options:

CONFIG_USB_ETH=m
CONFIG_USB_ETH_RNDIS=y

The module compiles fine and I can load it once the system has booted with no issues:

[    7.160000] DWC_otg: dwc_udc_start: g_ether
[    7.168000] DWC_otg: bind to driver g_ether
[    7.176000] DWC_otg: dwc_otg_pcd_alloc_request(e30171a4,208)
[    7.184000] g_ether gadget: using random self ethernet address
[    7.196000] usb0: MAC 52:e9:07:c2:0f:23
[    7.204000] usb0: HOST MAC 82:cf:ce:fa:44:18
[    7.212000] rndis_bind
[    7.224000] DWC_otg: dwc_otg_pcd_alloc_request(e30171ec,208)
[    7.232000] rndis_register: configNr = 0
[    7.236000] rndis_set_param_medium: 0 0
[    7.244000] DWC_otg: dwc_otg_pcd_alloc_request(e30171ec,208)
[    7.252000] g_ether gadget: Ethernet Gadget, version: Memorial Day 2008
[    7.264000] g_ether gadget: g_ether ready
[    7.268000] DWC_otg: dwc_udc_start: registered gadget driver 'g_ether'

My goal is to connect this embedded computer to a Windows computer. When I connect the embedded computer, Windows initially shows the "device" in the Device Manager as working properly and then updates to show that it is not working with the error:

This device cannot start. (Code 10)

FWIW I have tried several different drivers on the Windows side, including the linux.inf referenced in the Linux USG Gadget documentation, several of the built-in drivers, and one driver I found on a forum.

From the Linux side, when I plug in the USB cord, I see the following output:

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

This corresponds on the Windows side (via USBPcap):

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

The rndis req21 on the Linux side corresponds to the SEND ENCAPSULATED COMMAND on the Windows side, and the same is true for the rndis reqa1 and GET ENCAPSULATED RESPONSE.

There is no other output on either after those last response/requests.

I understand that Linux 3.4 is very out of date, but I don't have the option to upgrade since this is an embedded computer and thus I am beholden to the chip-maker to provide an update.

Has anyone successfully used the g_ether kernel module with Windows 7/8 and Linux 3.4, or know why these request/responses seem to just stop after that last GET ENCAPSULATED RESPONSE?

Upvotes: 0

Views: 489

Answers (0)

Related Questions