geerlingguy / raspberry-pi-pcie-devices

Raspberry Pi PCI Express device compatibility database
http://pipci.jeffgeerling.com
GNU General Public License v3.0
1.6k stars 145 forks source link

Test Sierra Wireless EM7565 4G LTE NGFF modem #366

Open geerlingguy opened 2 years ago

geerlingguy commented 2 years ago

I'm planning on testing the Sierra Wireless EM7565 4G LTE modem soon; perhaps using Waveshare's 'Dual Gigabit Ethernet 5G/4G Mini-Computer' board (see #367).

TODO: Image goes here.

The modem is a Cat-12 4G modem in the M.2 form factor (not like the mini PCIe modems I'm used to), and supposedly delivers up to 600 Mbps down, 150 Mbps up. It has GNSS and seems to be popular in more high-end industrial devices.

Shipping is insane for these cards, so I may get it anytime between now and early March.

Toomoch commented 2 years ago

This card does NOT use PCIE, in fact most M.2 or miniPCIE modems use USB. I'm not sure the board you listed provides USB over the M.2. Here you can see it says USB: https://www.sierrawireless.com/iot-solutions/products/em7565/

geerlingguy commented 2 years ago

@Toomoch - Indeed it does not, but it is still a card that I would like to validate as working (or not) and how to get it working, and since the physical connector is shared with other PCIe devices, it still has a place on this site (IMO).

It will always feel weird to plug a device into a mini PCIe or M.2 slot and it shows up as USB :P

geerlingguy commented 2 years ago
$ sudo lsusb -v
Bus 001 Device 003: ID 1199:90c3 Sierra Wireless, Inc. Sierra Wireless EM7565 with Qualcomm Snapdragon X16 LTE
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               2.00
  bDeviceClass            0 
  bDeviceSubClass         0 
  bDeviceProtocol         0 
  bMaxPacketSize0        64
  idVendor           0x1199 Sierra Wireless, Inc.
  idProduct          0x90c3 
  bcdDevice            0.06
  iManufacturer           1 Sierra Wireless, Incorporated
  iProduct                2 Sierra Wireless EM7565 with Qualcomm Snapdragon X16 LTE
  iSerial                 3 2af40a0a
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength       0x0082
    bNumInterfaces          3
    bConfigurationValue     1
    iConfiguration          0 
    bmAttributes         0xa0
      (Bus Powered)
      Remote Wakeup
    MaxPower              500mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           3
      bInterfaceClass       255 Vendor Specific Class
      bInterfaceSubClass      0 
      bInterfaceProtocol      0 
      iInterface              0 
      ** UNRECOGNIZED:  05 24 00 10 01
      ** UNRECOGNIZED:  05 24 01 00 00
      ** UNRECOGNIZED:  04 24 02 02
      ** UNRECOGNIZED:  05 24 06 00 00
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x82  EP 2 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x000a  1x 10 bytes
        bInterval               9
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x01  EP 1 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               0
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        1
      bAlternateSetting       0
      bNumEndpoints           3
      bInterfaceClass       255 Vendor Specific Class
      bInterfaceSubClass      0 
      bInterfaceProtocol      0 
      iInterface              0 
      ** UNRECOGNIZED:  05 24 00 10 01
      ** UNRECOGNIZED:  05 24 01 00 00
      ** UNRECOGNIZED:  04 24 02 02
      ** UNRECOGNIZED:  05 24 06 00 00
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x84  EP 4 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x000a  1x 10 bytes
        bInterval               9
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x83  EP 3 IN
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x02  EP 2 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               0
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        2
      bAlternateSetting       0
      bNumEndpoints           2
      bInterfaceClass       255 Vendor Specific Class
      bInterfaceSubClass    255 Vendor Specific Subclass
      bInterfaceProtocol    255 Vendor Specific Protocol
      iInterface              0 
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x85  EP 5 IN
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x03  EP 3 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               0
Device Qualifier (for other device speed):
  bLength                10
  bDescriptorType         6
  bcdUSB               2.00
  bDeviceClass            0 
  bDeviceSubClass         0 
  bDeviceProtocol         0 
  bMaxPacketSize0        64
  bNumConfigurations      1
can't get debug descriptor: Resource temporarily unavailable
Device Status:     0x0000
  (Bus Powered)
geerlingguy commented 2 years ago

Just checking; don't see anything loading in dmesg, and:

pi@pi-router:~ $ sudo apt install -y modemmanager
pi@pi-router:~ $ mmcli -L
No modems were found

It looks like I'll have to compile the driver / GobiSerial?

See:

The Sierra Wireless website MBPL downloads seems to have password-protected / login-blocked download links :/

geerlingguy commented 2 years ago

On the Waveshare board, to control the modem's power:

pi@pi-router:~ $ echo "6" > /sys/class/gpio/export
pi@pi-router:~ $ echo "out" > /sys/class/gpio/gpio6/direction
pi@pi-router:~ $ echo "1" > /sys/class/gpio/gpio6/value
pi@pi-router:~ $ echo "0" > /sys/class/gpio/gpio6/value
pi@pi-router:~ $ echo "6" > /sys/class/gpio/unexport

After setting GPIO 6 high, the red STA LED turned off. Then when I set it low, the LED turned back on.

geerlingguy commented 2 years ago

I just registered an account at https://login.sierrawireless.io/session/signup — I didn't find any way through the website itself to sign up, I had to find that by googling 'Sierra Wireless Registration'.

paulwratt commented 2 years ago

thats for the blob right? how did it go with the driver compilation mentioned above?

It seems there are a few CM4 products that use these style of modems (2 on WaveShare's site)

geerlingguy commented 2 years ago

Haven't had a chance to finish that yet, I'm going to put that off a bit. One thing I've notice is there are a lot of different Sierra modems out there with different capabilities. It seems some come preconfigured to work with USB TTY out of the box, others don't.

shayne commented 2 years ago

@geerlingguy I built out a Waveshare Dual Gigabit Ethernet 5G/4G Base Board using a SIM8200EA-M2. After a bit of work I have built and OpenWrt image with the required kernel changes. Connection over QMI and seeing great results! example speedtest running on pi!

Interested in documenting it here or somewhere else?

geerlingguy commented 2 years ago

@shayne - Could you open a new issue for it so we can track how you got it working there? I'm assuming you mean this card?

shayne commented 2 years ago

Created #442

geerlingguy commented 2 years ago

For OpenWRT, I went into menuconfig and selected:

Kernel modules
  -> USB support
    -> Support for Sierra Wireless devices (kmod-usb-net-sierrawireless)

(kmod-usb-net and kmod-usb-net-lan78xx were already selected by default, for the built-in USB-to-Ethernet adapter on my Waveshare board.)

geerlingguy commented 2 years ago

Built an OpenWRT image using these instructions:

make -j $(nproc) kernel_menuconfig
make -j $(nproc) defconfig download clean world
geerlingguy commented 2 years ago

Working further on this in https://github.com/geerlingguy/pi-router