It seems that HMD global has changed the USB interface that they use for tethering on new devices. While if_urndis works with devices from other manufacturers, enabling tethering on a Nokia 7 Plus is not get picked up by my system. I've found some ([1],[2]) resources on the project that ships the tethering drivers for OS X, which highlight the changes that they had to implement. However, it's not clear to me how easy it would be to port here. Let me know what logs I can provide regarding this issue, as i can't find anything useful in dmesg; the only thing that gets written there after turning on tethering is "ugen1.3: <HMD Global Nokia 7 plus> at usbus1". [1] https://github.com/jwise/HoRNDIS/issues/88 [2] https://github.com/jwise/HoRNDIS/commit/f5dcecf9ce3a3a69d6a2f9d1e66e24d5241b5d0b
Hi, if_urndis likely needs some new device match-entries it looks like: https://github.com/jwise/HoRNDIS/commit/f4ac3df2c7fc477b7a8e635b7d4aaa06c603b27a What does usbconfig say about your device, when you add: dump_device_desc dump_curr_config_desc --HPS
Created attachment 206123 [details] dump_device_desc dump_curr_config_desc
You need to modify this table in if_urndis.c to make it attach: static const STRUCT_USB_HOST_ID urndis_host_devs[] = { /* Generic RNDIS class match */ {USB_IFACE_CLASS(UICLASS_CDC), USB_IFACE_SUBCLASS(UISUBCLASS_ABSTRACT_CONTROL_MODEL), USB_IFACE_PROTOCOL(0xff)}, {USB_IFACE_CLASS(UICLASS_WIRELESS), USB_IFACE_SUBCLASS(UISUBCLASS_RF), USB_IFACE_PROTOCOL(UIPROTO_RNDIS)}, {USB_IFACE_CLASS(UICLASS_IAD), USB_IFACE_SUBCLASS(UISUBCLASS_SYNC), USB_IFACE_PROTOCOL(UIPROTO_ACTIVESYNC)}, /* HP-WebOS */ {USB_VENDOR(USB_VENDOR_PALM), USB_IFACE_CLASS(UICLASS_CDC), USB_IFACE_SUBCLASS(UISUBCLASS_ABSTRACT_CONTROL_MODEL), USB_IFACE_PROTOCOL(0xff)}, }; Using these values: bInterfaceClass = 0x00ef <Miscellaneous device> bInterfaceSubClass = 0x0004 bInterfaceProtocol = 0x0001 Can you try the attached patch? --HPS
Created attachment 206130 [details] Patch
Applying the patch, rebuilding /usr/src/sys/modules/usb/urndis and reloading if_urndis.ko was not enough. Is there some other part of base that would need to be rebuilt?
Is anything printed in dmesg? When you re-built the module, did you specify KMODDIR=/boot/kernel , else it will be installed in /boot/modules which won't work. --HPS
Ah, you are right. I forgot that there was still the module in /boot/kernel. kldload /boot/modules/if_urndis.ko did the job.
Can you show the resulting dmesg? Does the network device work? --HPS
These are the corresponding dmesg lines from when I turned on the USB tethering: ugen0.6: <HMD Global Nokia 7 plus> at usbus0 (disconnected) umass0: at uhub2, port 2, addr 6 (disconnected) cd0 at umass-sim0 bus 0 scbus4 target 0 lun 0 cd0: <Linux File-CD Gadget 0404> detached (cd0:umass-sim0:0:0:0): Periph destroyed umass0: detached ugen0.6: <HMD Global Nokia 7 plus> at usbus0 urndis0 on uhub2 urndis0: <RNDIS Communications Control> on usbus0 ue0: <USB Ethernet> on urndis0 ue0: Ethernet address: c6:4d:fa:1d:97:b9 The device indeed works. As a matter of fact, my last comment was submitted over that network interface.
A commit references this bug: Author: hselasky Date: Sun Jul 28 21:47:05 UTC 2019 New revision: 350396 URL: https://svnweb.freebsd.org/changeset/base/350396 Log: Add support for tethering with Nokia 7 plus and the alike. PR: 239495 MFC after: 1 week Sponsored by: Mellanox Technologies Changes: head/sys/dev/usb/net/if_urndis.c
A commit references this bug: Author: hselasky Date: Wed Aug 14 09:40:12 UTC 2019 New revision: 351013 URL: https://svnweb.freebsd.org/changeset/base/351013 Log: MFC r350396: Add support for tethering with Nokia 7 plus and the alike. PR: 239495 Sponsored by: Mellanox Technologies Changes: _U stable/12/ stable/12/sys/dev/usb/net/if_urndis.c
A commit references this bug: Author: hselasky Date: Wed Aug 14 09:41:31 UTC 2019 New revision: 351015 URL: https://svnweb.freebsd.org/changeset/base/351015 Log: MFC r350396: Add support for tethering with Nokia 7 plus and the alike. PR: 239495 Sponsored by: Mellanox Technologies Changes: _U stable/11/ stable/11/sys/dev/usb/net/if_urndis.c
A commit references this bug: Author: hselasky Date: Wed Aug 14 09:42:27 UTC 2019 New revision: 351017 URL: https://svnweb.freebsd.org/changeset/base/351017 Log: MFC r350396: Add support for tethering with Nokia 7 plus and the alike. PR: 239495 Sponsored by: Mellanox Technologies Changes: _U stable/10/ stable/10/sys/dev/usb/net/if_urndis.c