Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FS#3085 - RNDIS USB Guest Breaks When Switched to Kernel 5.4 #8841

Closed
openwrt-bot opened this issue May 9, 2020 · 1 comment
Closed

FS#3085 - RNDIS USB Guest Breaks When Switched to Kernel 5.4 #8841

openwrt-bot opened this issue May 9, 2020 · 1 comment
Labels

Comments

@openwrt-bot
Copy link

kyli:

====Device problem occurs on====

Raspberry Pi 4 Model B

====Software versions of OpenWrt release, packages, etc.====

OpenWrt version: master branch
Packages installed: //kmod-usb-dwc2//, //kmod-usb-gadget-eth// (//g_ether//)

====Problem description====

USB-C port of Pi 4 is capable of running in device/guest mode (USB OTG) just like Pi Zero.

[[https://www.factoryforward.com/pi-zero-w-headless-setup-windows10-rndis-driver-issue-resolved/|Raspberry Pi Zero W Headless setup – Windows 10 RNDIS Driver issue resolved - FactoryForward]]

It used to work with OpenWrt and Linux kernel 4.19, but it breaks when switched to 5.4.

In //dmesg//, you get errors like

[ 1759.419106] g_ether gadget: high-speed config #1: CDC Ethernet (ECM) [ 1770.559826] g_ether gadget: high-speed config #2: RNDIS [ 1783.798053] rndis_msg_parser: unknown RNDIS message 0x00520328 len 4456526 [ 1783.804934] RNDIS command error -524, 24/24 [ 2259.991384] rndis_msg_parser: unknown RNDIS message 0x00520328 len 4456526 [ 2259.998275] RNDIS command error -524, 24/24

====Steps to reproduce====

  • Modify KERNEL_PATCHVER=5.4 in target/linux/bcm27xx/Makefile to KERNEL_PATCHVER=4.19
  • Append dtoverlay=dwc2 to target/linux/bcm27xx/image/config.txt
  • Build the image with kernel module package //kmod-usb-dwc2// and //kmod-usb-gadget-eth// selected
  • Flash the image to SD card for Pi
  • Connect Pi's USB-C to a Windows computer (or VM)
  • Connect to Pi's console through Ethernet or UART
  • Run following commands
    modprobe g_ether
    uci set network.lan.ifname='eth0 usb0'
    uci commit network
    /etc/init.d/network restart
  • Install [[http://web1.moddevices.com/shared/mod-duo-rndis.zip|RNDIS driver]] provided in headless Pi Zero tutorial
  • You should now have a working USB Pi network adapter
  • Now revert the change from step 1 and run the whole thing again, instead of a working network adapter, Windows will report error initializing the interface.

====Note====

//g_ether// will run CDC-ECM when connected to Linux/macOS, not RNDIS.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant