Skip to main content
CRong
Associate
July 15, 2019
Question

Windows 10 does not recognise ethernet over USB for STM32MP157C-DK2

  • July 15, 2019
  • 18 replies
  • 7203 views

I connected the board to the OTG port. In the DFU mode, the USB port can be recognised correctly. When switching to the normal mode, Windows 10 cannot recognise the device. I tried to force to install the device as "Remote NDIS Compatible Device". Windows shows device status as "This device cannot start (Code 10)".

I have stuck on this issue for more than 2 weeks. Please help!

This topic has been closed for replies.

18 replies

Olivier GALLIEN
ST Technical Moderator
July 16, 2019

Hi @CRong​ 

Could you please confirm you are following the procedure to setup ethernet over USB present in the help of SW4STM32 ?

STM32 MPU Family - MCU Support -> Tips and Tricks -> Ethernet-over-USB Windows 10 Set-up

Thx

Olivier

In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.
CRong
CRongAuthor
Associate
July 16, 2019

Hi Oliver @Community member​ 

Thanks for your reply.

Yes, I did follow that procedure. The USB0 interface is up. However, in device manager, the OTG usb device is not recognised. It shows as "Unknown device". When using "Let me pick from a list of device drivers on my computer", it does not show "Remote NDIS compatible device" as in the procedure.

Thanks

Chris

robin_elecgator
Associate III
July 16, 2019

I had the same problem on my new PC. But connecting the STM32MP via a USB2.0 HUB makes it work. I think it has something to do with OTG driver and new motherboards which supports usb C.

CRong
CRongAuthor
Associate
July 17, 2019

Thanks, Robin

Just ordered a USB hub. Will give a try ....

CRong
CRongAuthor
Associate
July 18, 2019

Hi, @robin_elecgator​ 

It works now with USB hub ... Thanks a lot.

robin_elecgator
Associate III
July 18, 2019

Good, I'm just wondering on which PC didn't it work? I have it tested only on Dell computers with a 8th gen intel processor.

I had it on both the devkit and a custom board that we designed.

Which type of PC do you use?

I currently have the following 3 options:

A) There is a problem with the drivers of intel

B) There is a problem with the USB gadget driver in the kernel

C) There is a problem in the hw usb driver

But I don't have really the time to pin point it.

Olivier GALLIEN
ST Technical Moderator
July 19, 2019

Hi @robin_elecgator​  and @CRong​ 

We are interesting to pin point the root cause of this.

Could you please both confirm that on target side during boot you have following traces :

[ 442.850073] dwc2 49000000.usb-otg: new device is high-speed

[ 442.885715] dwc2 49000000.usb-otg: new address 8

[ 442.934950] configfs-gadget gadget: high-speed config #1: c

[ 442.939395] IPv6: ADDRCONF(NETDEV_CHANGE): usb0: link 

Then can you please share as many details as possible on your PC and USB controller :

model, USB2 and USB3 controller name and type etc...

Thanks a lot,

Olivier

In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.
Olivier GALLIEN
ST Technical Moderator
July 19, 2019

Fact that USB Hub is a workaround can point a problem of power compatibility with PC USB controller.

Could you please try following change for a test :

On target :

root@stm32mp1:~# /sbin/stm32_usbotg_eth_config.sh stop # stop the USB gadget

root@stm32mp1:~# vi /sbin/stm32_usbotg_eth_config.sh #edit the script

replace echo 250 > "${d}/configs/${c}/MaxPower"

with echo 100 > "${d}/configs/${c}/MaxPower"

Save and quit

root@stm32mp1:~# /sbin/stm32_usbotg_eth_config.sh start # restart the Gadget

Check if RNDIS is now up on PC side.

Thx

Olivier

In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.
robin_elecgator
Associate III
July 19, 2019

Hi @Community member​ 

I connect my DK2 to my pcb with a Type C to Type C cable. I get the following:

[ 16.947132] dwc2 49000000.usb-otg: new device is high-speed
[ 16.981167] dwc2 49000000.usb-otg: new address 4
[ 17.027155] dwc2 49000000.usb-otg: Failed to exit L1 sleep state in 200us.
[ 17.032624] configfs-gadget gadget: high-speed config #1: c
[ 17.038284] dwc2 49000000.usb-otg: dwc2_hsotg_enqueue_setup: failed queue (-11)
[ 17.045822] dwc2 49000000.usb-otg: Failed to exit L1 sleep state in 200us.
[ 17.065150] IPv6: ADDRCONF(NETDEV_UP): usb0: link is not ready
[ 17.765371] IPv6: ADDRCONF(NETDEV_CHANGE): usb0: link becomes ready
[ 22.028030] dwc2 49000000.usb-otg: Failed to exit L1 sleep state in 200us.

The PC is a Dell Precision 3630, with a i7-8700k running on Intel C246 (Cannon lake chipset).

I also your edit. This gives me the following:

root@stm32mp1-disco:~# vi /sbin/stm32_usbotg_eth_config.sh stop
root@stm32mp1-disco:~# /sbin/stm32_usbotg_eth_config.sh start
[ 1002.974225] using random self ethernet address
[ 1002.977321] using random host ethernet address
[ 1003.018066] usb0: HOST MAC 6e:3e:60:48:19:09
[ 1003.022272] usb0: MAC ca:05:50:a6:2d:81
[ 1003.028168] dwc2 49000000.usb-otg: bound driver configfs-gadget
[ 1003.191413] dwc2 49000000.usb-otg: new device is high-speed
[ 1003.224592] dwc2 49000000.usb-otg: new address 8
[ 1003.252019] dwc2 49000000.usb-otg: Failed to exit L1 sleep state in 200us.
[ 1003.257496] configfs-gadget gadget: high-speed config #1: c
[ 1003.259257] IPv6: ADDRCONF(NETDEV_UP): usb0: link is not ready
[ 1003.263135] dwc2 49000000.usb-otg: dwc2_hsotg_enqueue_setup: failed queue (-11)
[ 1003.276536] dwc2 49000000.usb-otg: Failed to exit L1 sleep state in 200us.
[ 1003.283200] IPv6: ADDRCONF(NETDEV_CHANGE): usb0: link becomes ready
ifconfig: SIOCSIFADDR: Invalid argument
root@stm32mp1-disco:~# [ 1008.253305] dwc2 49000000.usb-otg: Failed to exit L1 sleep state in 200us.
[ 1008.259049] dwc2 49000000.usb-otg: Failed to exit L1 sleep state in 200us.

Olivier GALLIEN
ST Technical Moderator
July 19, 2019

Thanks @robin_elecgator​ 

Sorry but trace from the edit trial looks strange

root@stm32mp1-disco:~# vi /sbin/stm32_usbotg_eth_config.sh stop ?

Please confirm you properly edit the file with echo 100.

Thx

Olivier

In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.
robin_elecgator
Associate III
July 19, 2019

Hi @Community member​ 

The stop is a small mistake (vi did want to create the "stop" file) It is the second file vi wants to edit, but the changes did apply to the script

This is in my config.sh file.

 # Config
 mkdir -p "${d}/configs/${c}"
 mkdir -p "${d}/configs/${c}/strings/0x409"
 echo "Config 1: RNDIS" > "${d}/configs/${c}/strings/0x409/configuration"
 echo 100 > "${d}/configs/${c}/MaxPower"
 echo 0xC0 > "${d}/configs/${c}/bmAttributes" # self powered device
 
 mkdir -p "${d}/functions/${func_eth}"
- /sbin/stm32_usbotg_eth_config.sh 43/109 39%

Robin

robin_elecgator
Associate III
August 1, 2019

Hi @Community member​ 

Do you need more information? did you guys found the cause of the problem?

Best regards,

Robin

AntonioST
ST Employee
August 30, 2019

Still unable to replicate it.

To understand if we are looking in the right direction, would be possible for you to test this patch in the kernel of STM32MP1 ?

Of course, it would require you to recompile the kernel; no way to apply such modification at runtime in sysfs.

diff --git a/drivers/usb/gadget/composite.c b/drivers/usb/gadget/composite.c
index b8a1584..afbcbb7 100644
--- a/drivers/usb/gadget/composite.c
+++ b/drivers/usb/gadget/composite.c
@@ -629,7 +629,7 @@ static int bos_desc(struct usb_composite_dev *cdev)
 usb_ext->bLength = USB_DT_USB_EXT_CAP_SIZE;
 usb_ext->bDescriptorType = USB_DT_DEVICE_CAPABILITY;
 usb_ext->bDevCapabilityType = USB_CAP_TYPE_EXT;
- usb_ext->bmAttributes = cpu_to_le32(USB_LPM_SUPPORT | USB_BESL_SUPPORT);
+ usb_ext->bmAttributes = cpu_to_le32(USB_LPM_SUPPORT | USB_BESL_SUPPORT | 0x4118);
 
 /*
 * The Superspeed USB Capability descriptor shall be implemented by all

Bernard PUEL
ST Technical Moderator
November 20, 2019

Any update Robin ?

NGajic
Associate III
December 18, 2020

Hi,

I had this problem recently on my laptop with 4 3.1 USB ports. Two of them worked and two doesn't. I had same message - dwc2 49000000.usb-otg: Failed to exit L1 sleep state in 200us. I solved problem by applying this patch https://www.spinics.net/lists/linux-usb/msg205440.html on ecosystem v2.0 kernel. Now I managed to make RNDIS working and USB mass storage also.

Best regards,

Nenad

Dat Tran
Senior II
July 5, 2022

I have same issue, when usb hub then work, I could ping from PC.

But plugin to PC directly then usb0 shown up but can not ping. Under Device Manager PC side, unknow device shown as well.