Bug 263700

Summary: Support for Sierra Wireless EM74xx USB 3G Modem Family & Dell OEM versions
Product: Base System Reporter: malavon <benny.goemans>
Component: usbAssignee: freebsd-usb (Nobody) <usb>
Status: Closed FIXED    
Severity: Affects Some People CC: alex, benny.goemans, emaste, hselasky
Priority: ---    
Version: 13.1-RELEASE   
Hardware: amd64   
OS: Any   
See Also: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=234578
Attachments:
Description Flags
usbdevs patch
none
u3g.c patch
none
patch against -CURRENT none

Description malavon 2022-05-01 12:40:32 UTC
Created attachment 233626 [details]
usbdevs patch

Adds support for USB devs:
DELL DW5809
DELL DW5811
DELL DW5816
DELL DW5818
SIERRA EM7430
SIERRA EM7455
SIERRA EM7565

It's not the entire family, but it's all those that I could add using the USB id's found in the Dell driver packages and on various websites. Tested with the DW5811e (a EM7455 device). If anyone has a device not supported by these I'll be more than happy to send a patch as well.

2 patches are included (created against 13.0-RELEASE source, if they don't apply cleanly on -CURRENT I'll be more than happy to update them):
- sys/dev/usb/usbdevs 
- sys/dev/usb/serial/u3g.c 

All patches are to be applied in the root of the src dir.

Note that there is another bug (?id=234578) that adds a single device, but that has resulted in a lot of discussions and went nowhere. This bug supersedes that bug and adds everything needed to use the modems in all of its OEM variances.
Comment 1 malavon 2022-05-01 12:41:08 UTC
Created attachment 233627 [details]
u3g.c patch
Comment 2 malavon 2022-05-01 12:55:29 UTC
Probably good to add that I did not get the GPS detected (with the usbslcom driver) on FreeBSD (it works on Windows). If I ever do I'll be sure to create another ticket. This is the LTE modem part only.
Comment 3 Aleks Michajlow 2022-05-04 10:08:48 UTC
Please add support for Sierra EM7345 also
Comment 4 malavon 2022-05-05 10:39:02 UTC
(In reply to Aleks Michajlow from comment #3)
If you can do a "usbconfig dump_device_desc" on a system that contains that card and post the output here (the part for the EM7345 only of course) I'll be more than happy to add it as well.
Comment 5 Aleks Michajlow 2022-05-05 10:42:20 UTC
(In reply to malavon from comment #4)
ugen0.7: <Sierra Wireless Inc. Sierra Wireless EM7345 4G LTE> at usbus0, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=ON (100mA)

  bLength = 0x0012 
  bDescriptorType = 0x0001 
  bcdUSB = 0x0200 
  bDeviceClass = 0x00ef  <Miscellaneous device>
  bDeviceSubClass = 0x0002 
  bDeviceProtocol = 0x0001 
  bMaxPacketSize0 = 0x0040 
  idVendor = 0x1199 
  idProduct = 0xa001 
  bcdDevice = 0x1729 
  iManufacturer = 0x0001  <Sierra Wireless Inc.>
  iProduct = 0x0002  <Sierra Wireless EM7345 4G LTE>
  iSerialNumber = 0x0003  <013937009553015>
  bNumConfigurations = 0x0001
Comment 6 malavon 2022-05-05 11:07:33 UTC
(In reply to Aleks Michajlow from comment #5)
Thanks, that was quick :)
I've been looking up a bit about these devices and I'm not sure they actually support serial commands. All I can find is it supports MBIM (which AFAIK FreeBSD doesn't support).
This may be related to the fact that they're Intel chipsets as opposed to Qualcomm like the rest are. The patch I have here is for the (Qualcomm) X7 Snapdragon family, which I can test.

Does the kernel recognize them if you add the product id yourself? If afterwards you have a serial port which you can commect to you should be good to go.
In that case I'd say create a patch for them separately.

I'm sorry I couldn't be of more help, I really would have loved for FreeBSD to support more devices.
Comment 7 malavon 2022-05-05 11:11:30 UTC
Created attachment 233741 [details]
patch against -CURRENT

Added an extra patch (both files combined) against -CURRENT just in case it makes merging easier
Comment 8 malavon 2022-08-22 16:57:07 UTC
Quick bump, can this get some attention? It's just a bunch of USB id's.
Comment 9 Hans Petter Selasky freebsd_committer freebsd_triage 2022-08-22 17:19:43 UTC
Hi,

I'll have a look tomorrow.

Thank you!
Comment 10 malavon 2022-08-26 19:37:04 UTC
Thanks!
Comment 11 commit-hook freebsd_committer freebsd_triage 2022-08-26 20:03:25 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/src/commit/?id=0b01a13b8a6e926f6dc5ca8ec782f730b9fe8af5

commit 0b01a13b8a6e926f6dc5ca8ec782f730b9fe8af5
Author:     Hans Petter Selasky <hselasky@FreeBSD.org>
AuthorDate: 2022-08-26 20:01:41 +0000
Commit:     Hans Petter Selasky <hselasky@FreeBSD.org>
CommitDate: 2022-08-26 20:02:35 +0000

    u3g(4): Add more USB IDs.

    Submitted by:   malavon <benny.goemans@gmail.com>
    MFC after:      1 week
    PR:             263700
    Sponsored by:   NVIDIA Networking

 sys/dev/usb/serial/u3g.c | 14 ++++++++++++++
 sys/dev/usb/usbdevs      | 14 ++++++++++++++
 2 files changed, 28 insertions(+)
Comment 12 Hans Petter Selasky freebsd_committer freebsd_triage 2022-08-26 20:04:11 UTC
Thank you for the patience!
Comment 13 commit-hook freebsd_committer freebsd_triage 2022-09-02 09:08:18 UTC
A commit in branch stable/13 references this bug:

URL: https://cgit.FreeBSD.org/src/commit/?id=89d98b9b003e63dfdf182fa3144a3e809019fcd4

commit 89d98b9b003e63dfdf182fa3144a3e809019fcd4
Author:     Hans Petter Selasky <hselasky@FreeBSD.org>
AuthorDate: 2022-08-26 20:01:41 +0000
Commit:     Hans Petter Selasky <hselasky@FreeBSD.org>
CommitDate: 2022-09-02 09:07:01 +0000

    u3g(4): Add more USB IDs.

    Submitted by:   malavon <benny.goemans@gmail.com>
    PR:             263700
    Sponsored by:   NVIDIA Networking

    (cherry picked from commit 0b01a13b8a6e926f6dc5ca8ec782f730b9fe8af5)

 sys/dev/usb/serial/u3g.c | 14 ++++++++++++++
 sys/dev/usb/usbdevs      | 14 ++++++++++++++
 2 files changed, 28 insertions(+)
Comment 14 commit-hook freebsd_committer freebsd_triage 2022-09-02 09:09:20 UTC
A commit in branch stable/12 references this bug:

URL: https://cgit.FreeBSD.org/src/commit/?id=f8134ff6e65708cc05b6d7308e0647d44c22a258

commit f8134ff6e65708cc05b6d7308e0647d44c22a258
Author:     Hans Petter Selasky <hselasky@FreeBSD.org>
AuthorDate: 2022-08-26 20:01:41 +0000
Commit:     Hans Petter Selasky <hselasky@FreeBSD.org>
CommitDate: 2022-09-02 09:08:30 +0000

    u3g(4): Add more USB IDs.

    Submitted by:   malavon <benny.goemans@gmail.com>
    PR:             263700
    Sponsored by:   NVIDIA Networking

    (cherry picked from commit 0b01a13b8a6e926f6dc5ca8ec782f730b9fe8af5)

 sys/dev/usb/serial/u3g.c | 14 ++++++++++++++
 sys/dev/usb/usbdevs      | 14 ++++++++++++++
 2 files changed, 28 insertions(+)