From: Bryan Vyhmeister Subject: Re: [PATCH] umb(4) support for new DW5821e variant To: tech@openbsd.org Date: Sun, 4 Aug 2024 22:44:08 -0700 On Mon, Jul 29, 2024 at 02:12:49AM -0700, Bryan Vyhmeister wrote: > Gerhard Roth helped add support for the original (non-eSIM) Dell DW5821e > device to umb(4) years ago on a Dell Latitude 7300. The Dell Latitude > Rugged 5430 can also be ordered with a Dell DW5821e Snapdragon X20 LTE > card but this one comes with a different USB ID (0x81e0 instead of > 0x81d7) and has the eSIM selected as the default SIM out of the box. The > patch below adds support to usbdevs and if_umb.c for this new variant. > If you have this card in a system and want to use a physical SIM like I > do, you have to boot into a recent Ubuntu (I used 24.04 LTS on a USB > drive) or other Linux distro with good mmcli support and run: > > sudo mmcli -m 0 --set-primary-sim-slot=1 > > Once this is done, Ubuntu or OpenBSD will happily connect using a SIM > card in the physical SIM card slot. Your modem could be at slot 1 > instead of 0 as above and the physical SIM slot can be 0 in some cases > that people have posted online but, in my case, slot 1 is the physical > SIM and slot 2 is the eSIM. If someone could ok and commit, I would > greatly appreciate it. Thank you. I am reposting this patch with a slight change. I noticed with some other USB devices that have multiple USB ID variants (i.e. Prism GT) that the first had an added _1 and the second _2. With that in mind, I changed the patch to provide DW5821E_1 and DW5821E_2 to replace only having DW5821E. I then updated if_umb.c to match. Bryan Index: sys/dev/usb/if_umb.c =================================================================== RCS file: /cvs/src/sys/dev/usb/if_umb.c,v diff -u -p -u -r1.58 if_umb.c --- sys/dev/usb/if_umb.c 23 May 2024 03:21:09 -0000 1.58 +++ sys/dev/usb/if_umb.c 5 Aug 2024 05:09:57 -0000 @@ -241,7 +241,13 @@ struct umb_quirk { int umb_match; }; const struct umb_quirk umb_quirks[] = { - { { USB_VENDOR_DELL, USB_PRODUCT_DELL_DW5821E }, + { { USB_VENDOR_DELL, USB_PRODUCT_DELL_DW5821E_1 }, + 0, + 2, + UMATCH_VENDOR_PRODUCT + }, + + { { USB_VENDOR_DELL, USB_PRODUCT_DELL_DW5821E_2 }, 0, 2, UMATCH_VENDOR_PRODUCT Index: sys/dev/usb/usbdevs =================================================================== RCS file: /cvs/src/sys/dev/usb/usbdevs,v diff -u -p -u -r1.766 usbdevs --- sys/dev/usb/usbdevs 29 May 2024 06:48:43 -0000 1.766 +++ sys/dev/usb/usbdevs 5 Aug 2024 05:09:40 -0000 @@ -1537,7 +1537,8 @@ product DELL PRISM_GT_2 0x8104 PrismGT product DELL W5500 0x8115 W5500 HSDPA product DELL U740 0x8135 U740 CDMA product DELL EU870D 0x8138 EU870D HSDPA -product DELL DW5821E 0x81d7 DW5821e LTE +product DELL DW5821E_1 0x81d7 DW5821e LTE +product DELL DW5821E_2 0x81e0 DW5821e LTE product DELL DW700 0x9500 DW700 GPS product DELL2 UPS 0xffff UPS