geerlingguy / raspberry-pi-pcie-devices

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

Testing SIMCOM SIM8200EA_M2 (Multi-Band 5G module) in Waveshare CM4-DUAL-ETH-4G/5G-BASE #442

Closed shayne closed 2 years ago

shayne commented 2 years ago

I've pulled together the hardware and software required to run the SIM8200EA (8200) modem on a CM4 platform using the Waveshare CM4-DUAL-ETH-4G/5G-BASE (Base Board).

FWIW I've been running the following setup since June and everything has worked great! If you're looking to build an RPi router and have ideas or suggestions feel free to submit them here or tag me 😄

Steps:

Hardware:

Software:

Results:

shayne commented 2 years ago

Debug info:

❯ uname -a ``` Linux open5g 5.4.188 #0 SMP Sat Apr 16 12:59:34 2022 aarch64 GNU/Linux ```
❯ ls -l /dev/cdc* ``` crw------- 1 root root 180, 176 May 8 22:20 /dev/cdc-wdm0 ```
❯ ls /dev/tty* ``` /dev/tty /dev/tty16 /dev/tty24 /dev/tty32 /dev/tty40 /dev/tty49 /dev/tty57 /dev/tty8 /dev/tty0 /dev/tty17 /dev/tty25 /dev/tty33 /dev/tty41 /dev/tty5 /dev/tty58 /dev/tty9 /dev/tty1 /dev/tty18 /dev/tty26 /dev/tty34 /dev/tty42 /dev/tty50 /dev/tty59 /dev/ttyAMA0 /dev/tty10 /dev/tty19 /dev/tty27 /dev/tty35 /dev/tty43 /dev/tty51 /dev/tty6 /dev/ttyS0 /dev/tty11 /dev/tty2 /dev/tty28 /dev/tty36 /dev/tty44 /dev/tty52 /dev/tty60 /dev/ttyUSB0 /dev/tty12 /dev/tty20 /dev/tty29 /dev/tty37 /dev/tty45 /dev/tty53 /dev/tty61 /dev/ttyUSB1 /dev/tty13 /dev/tty21 /dev/tty3 /dev/tty38 /dev/tty46 /dev/tty54 /dev/tty62 /dev/ttyUSB2 /dev/tty14 /dev/tty22 /dev/tty30 /dev/tty39 /dev/tty47 /dev/tty55 /dev/tty63 /dev/ttyUSB3 /dev/tty15 /dev/tty23 /dev/tty31 /dev/tty4 /dev/tty48 /dev/tty56 /dev/tty7 /dev/ttyUSB4 ```
❯ lspci -vv ``` 00:00.0 PCI bridge: Broadcom Inc. and subsidiaries BCM2711 PCIe Bridge (rev 20) (prog-if 00 [Normal decode]) Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx- Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- SERR- TAbort- Reset- FastB2B- PriDiscTmr- SecDiscTmr- DiscTmrStat- DiscTmrSERREn- Capabilities: [48] Power Management version 3 Flags: PMEClk- DSI- D1- D2- AuxCurrent=0mA PME(D0+,D1-,D2-,D3hot+,D3cold-) Status: D0 NoSoftRst+ PME-Enable- DSel=0 DScale=1 PME- Capabilities: [ac] Express (v2) Root Port (Slot-), MSI 00 DevCap: MaxPayload 512 bytes, PhantFunc 0 ExtTag- RBE+ DevCtl: CorrErr+ NonFatalErr+ FatalErr+ UnsupReq+ RlxdOrd+ ExtTag- PhantFunc- AuxPwr+ NoSnoop+ MaxPayload 128 bytes, MaxReadReq 512 bytes DevSta: CorrErr- NonFatalErr- FatalErr- UnsupReq- AuxPwr- TransPend- LnkCap: Port #0, Speed 5GT/s, Width x1, ASPM L0s L1, Exit Latency L0s <2us, L1 <4us ClockPM+ Surprise- LLActRep- BwNot+ ASPMOptComp+ LnkCtl: ASPM Disabled; RCB 64 bytes, Disabled- CommClk- ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt- LnkSta: Speed 5GT/s (ok), Width x1 (ok) TrErr- Train- SlotClk+ DLActive- BWMgmt- ABWMgmt+ RootCap: CRSVisible+ RootCtl: ErrCorrectable- ErrNon-Fatal- ErrFatal- PMEIntEna+ CRSVisible+ RootSta: PME ReqID 0000, PMEStatus- PMEPending- DevCap2: Completion Timeout: Range ABCD, TimeoutDis+ NROPrPrP- LTR+ 10BitTagComp- 10BitTagReq- OBFF Via WAKE#, ExtFmt- EETLPPrefix- EmergencyPowerReduction Not Supported, EmergencyPowerReductionInit- FRS- LN System CLS Not Supported, TPHComp- ExtTPHComp- ARIFwd- AtomicOpsCap: Routing- 32bit- 64bit- 128bitCAS- DevCtl2: Completion Timeout: 50us to 50ms, TimeoutDis- LTR- OBFF Disabled, ARIFwd- AtomicOpsCtl: ReqEn- EgressBlck- LnkCap2: Supported Link Speeds: 2.5-5GT/s, Crosslink- Retimer- 2Retimers- DRS+ LnkCtl2: Target Link Speed: 5GT/s, EnterCompliance- SpeedDis- Transmit Margin: Normal Operating Range, EnterModifiedCompliance- ComplianceSOS- Compliance De-emphasis: -6dB LnkSta2: Current De-emphasis Level: -6dB, EqualizationComplete- EqualizationPhase1- EqualizationPhase2- EqualizationPhase3- LinkEqualizationRequest- Retimer- 2Retimers- CrosslinkRes: unsupported, DRS- DownstreamComp: Link Down - Not Determined Capabilities: [100 v1] Advanced Error Reporting UESta: DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq- ACSViol- UEMsk: DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq- ACSViol- UESvrt: DLP+ SDES+ TLP- FCP+ CmpltTO- CmpltAbrt- UnxCmplt- RxOF+ MalfTLP+ ECRC- UnsupReq- ACSViol- CESta: RxErr- BadTLP- BadDLLP- Rollover- Timeout- AdvNonFatalErr- CEMsk: RxErr- BadTLP- BadDLLP- Rollover- Timeout- AdvNonFatalErr+ AERCap: First Error Pointer: 00, ECRCGenCap- ECRCGenEn- ECRCChkCap- ECRCChkEn- MultHdrRecCap- MultHdrRecEn- TLPPfxPres- HdrLogCap- HeaderLog: 00000000 00000000 00000000 00000000 RootCmd: CERptEn+ NFERptEn+ FERptEn+ RootSta: CERcvd- MultCERcvd- UERcvd- MultUERcvd- FirstFatal- NonFatalMsg- FatalMsg- IntMsg 0 ErrorSrc: ERR_COR: 0000 ERR_FATAL/NONFATAL: 0000 Capabilities: [180 v1] Vendor Specific Information: ID=0000 Rev=0 Len=028 Capabilities: [240 v1] L1 PM Substates L1SubCap: PCI-PM_L1.2+ PCI-PM_L1.1+ ASPM_L1.2+ ASPM_L1.1+ L1_PM_Substates+ PortCommonModeRestoreTime=8us PortTPowerOnTime=10us L1SubCtl1: PCI-PM_L1.2- PCI-PM_L1.1- ASPM_L1.2- ASPM_L1.1- T_CommonMode=1us LTR1.2_Threshold=0ns L1SubCtl2: T_PwrOn=10us Kernel driver in use: pcieport lspci: Unable to load libkmod resources: error -12 01:00.0 USB controller: VIA Technologies, Inc. VL805/806 xHCI USB 3.0 Controller (rev 01) (prog-if 30 [XHCI]) Subsystem: VIA Technologies, Inc. VL805/806 xHCI USB 3.0 Controller Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx+ Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- SERR-
❯ lsusb -v ``` Bus 002 Device 003: ID 0bda:8153 Realtek USB 10/100/1000 LAN Device Descriptor: bLength 18 bDescriptorType 1 bcdUSB 3.00 bDeviceClass 0 bDeviceSubClass 0 bDeviceProtocol 0 bMaxPacketSize0 9 idVendor 0x0bda idProduct 0x8153 bcdDevice 31.00 iManufacturer 1 Realtek iProduct 2 USB 10/100/1000 LAN iSerial 6 001000001 bNumConfigurations 2 Configuration Descriptor: bLength 9 bDescriptorType 2 wTotalLength 0x0039 bNumInterfaces 1 bConfigurationValue 1 iConfiguration 0 bmAttributes 0x80 (Bus Powered) MaxPower 288mA Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 0 bAlternateSetting 0 bNumEndpoints 3 bInterfaceClass 255 bInterfaceSubClass 255 bInterfaceProtocol 0 iInterface 0 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x81 EP 1 IN bmAttributes 2 Transfer Type Bulk Synch Type None Usage Type Data wMaxPacketSize 0x0400 1x 1024 bytes bInterval 0 bMaxBurst 3 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x02 EP 2 OUT bmAttributes 2 Transfer Type Bulk Synch Type None Usage Type Data wMaxPacketSize 0x0400 1x 1024 bytes bInterval 0 bMaxBurst 3 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x83 EP 3 IN bmAttributes 3 Transfer Type Interrupt Synch Type None Usage Type Data wMaxPacketSize 0x0002 1x 2 bytes bInterval 8 bMaxBurst 0 Configuration Descriptor: bLength 9 bDescriptorType 2 wTotalLength 0x0062 bNumInterfaces 2 bConfigurationValue 2 iConfiguration 0 bmAttributes 0x80 (Bus Powered) MaxPower 288mA Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 0 bAlternateSetting 0 bNumEndpoints 1 bInterfaceClass 2 bInterfaceSubClass 6 bInterfaceProtocol 0 iInterface 5 CDC Communications Control CDC Header: bcdCDC 1.10 CDC Union: bMasterInterface 0 bSlaveInterface 1 CDC Ethernet: iMacAddress 3 00E04C6802B3 bmEthernetStatistics 0x00000000 wMaxSegmentSize 1514 wNumberMCFilters 0x0000 bNumberPowerFilters 0 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x83 EP 3 IN bmAttributes 3 Transfer Type Interrupt Synch Type None Usage Type Data wMaxPacketSize 0x0010 1x 16 bytes bInterval 8 bMaxBurst 0 Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 1 bAlternateSetting 0 bNumEndpoints 0 bInterfaceClass 10 bInterfaceSubClass 0 bInterfaceProtocol 0 iInterface 0 Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 1 bAlternateSetting 1 bNumEndpoints 2 bInterfaceClass 10 bInterfaceSubClass 0 bInterfaceProtocol 0 iInterface 4 Ethernet Data Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x81 EP 1 IN bmAttributes 2 Transfer Type Bulk Synch Type None Usage Type Data wMaxPacketSize 0x0400 1x 1024 bytes bInterval 0 bMaxBurst 3 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x02 EP 2 OUT bmAttributes 2 Transfer Type Bulk Synch Type None Usage Type Data wMaxPacketSize 0x0400 1x 1024 bytes bInterval 0 bMaxBurst 3 Binary Object Store Descriptor: bLength 5 bDescriptorType 15 wTotalLength 0x0016 bNumDeviceCaps 2 USB 2.0 Extension Device Capability: bLength 7 bDescriptorType 16 bDevCapabilityType 2 bmAttributes 0x00000002 HIRD Link Power Management (LPM) Supported SuperSpeed USB Device Capability: bLength 10 bDescriptorType 16 bDevCapabilityType 3 bmAttributes 0x02 Latency Tolerance Messages (LTM) Supported wSpeedsSupported 0x000e Device can operate at Full Speed (12Mbps) Device can operate at High Speed (480Mbps) Device can operate at SuperSpeed (5Gbps) bFunctionalitySupport 2 Lowest fully-functional device speed is High Speed (480Mbps) bU1DevExitLat 10 micro seconds bU2DevExitLat 2047 micro seconds can't get debug descriptor: Resource temporarily unavailable Device Status: 0x0010 (Bus Powered) Latency Tolerance Messaging (LTM) Enabled Bus 001 Device 002: ID 2109:3431 USB2.0 Hub Device Descriptor: bLength 18 bDescriptorType 1 bcdUSB 2.10 bDeviceClass 9 bDeviceSubClass 0 bDeviceProtocol 1 bMaxPacketSize0 64 idVendor 0x2109 idProduct 0x3431 bcdDevice 4.20 iManufacturer 0 iProduct 1 USB2.0 Hub iSerial 0 bNumConfigurations 1 Configuration Descriptor: bLength 9 bDescriptorType 2 wTotalLength 0x0019 bNumInterfaces 1 bConfigurationValue 1 iConfiguration 0 bmAttributes 0xe0 Self Powered Remote Wakeup MaxPower 100mA Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 0 bAlternateSetting 0 bNumEndpoints 1 bInterfaceClass 9 bInterfaceSubClass 0 bInterfaceProtocol 0 iInterface 0 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x81 EP 1 IN bmAttributes 3 Transfer Type Interrupt Synch Type None Usage Type Data wMaxPacketSize 0x0001 1x 1 bytes bInterval 12 Hub Descriptor: bLength 9 bDescriptorType 41 nNbrPorts 4 wHubCharacteristic 0x00e0 Ganged power switching Ganged overcurrent protection TT think time 32 FS bits Port indicators bPwrOn2PwrGood 50 * 2 milli seconds bHubContrCurrent 100 milli Ampere DeviceRemovable 0x00 PortPwrCtrlMask 0xff Hub Port Status: Port 1: 0000.0100 power Port 2: 0000.0100 power Port 3: 0000.0100 power Port 4: 0000.0100 power Binary Object Store Descriptor: bLength 5 bDescriptorType 15 wTotalLength 0x002a bNumDeviceCaps 3 USB 2.0 Extension Device Capability: bLength 7 bDescriptorType 16 bDevCapabilityType 2 bmAttributes 0x00000002 HIRD Link Power Management (LPM) Supported SuperSpeed USB Device Capability: bLength 10 bDescriptorType 16 bDevCapabilityType 3 bmAttributes 0x00 wSpeedsSupported 0x000e Device can operate at Full Speed (12Mbps) Device can operate at High Speed (480Mbps) Device can operate at SuperSpeed (5Gbps) bFunctionalitySupport 1 Lowest fully-functional device speed is Full Speed (12Mbps) bU1DevExitLat 4 micro seconds bU2DevExitLat 231 micro seconds Container ID Device Capability: bLength 20 bDescriptorType 16 bDevCapabilityType 4 bReserved 0 ContainerID {30eef35c-07d5-2549-b001-802d79434c30} can't get debug descriptor: Resource temporarily unavailable Device Status: 0x0001 Self Powered Bus 001 Device 001: ID 1d6b:0002 Linux 5.4.188 xhci-hcd xHCI Host Controller Device Descriptor: bLength 18 bDescriptorType 1 bcdUSB 2.00 bDeviceClass 9 bDeviceSubClass 0 bDeviceProtocol 1 bMaxPacketSize0 64 idVendor 0x1d6b idProduct 0x0002 bcdDevice 5.04 iManufacturer 3 Linux 5.4.188 xhci-hcd iProduct 2 xHCI Host Controller iSerial 1 0000:01:00.0 bNumConfigurations 1 Configuration Descriptor: bLength 9 bDescriptorType 2 wTotalLength 0x0019 bNumInterfaces 1 bConfigurationValue 1 iConfiguration 0 bmAttributes 0xe0 Self Powered Remote Wakeup MaxPower 0mA Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 0 bAlternateSetting 0 bNumEndpoints 1 bInterfaceClass 9 bInterfaceSubClass 0 bInterfaceProtocol 0 iInterface 0 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x81 EP 1 IN bmAttributes 3 Transfer Type Interrupt Synch Type None Usage Type Data wMaxPacketSize 0x0004 1x 4 bytes bInterval 12 Hub Descriptor: bLength 9 bDescriptorType 41 nNbrPorts 1 wHubCharacteristic 0x0009 Per-port power switching Per-port overcurrent protection TT think time 8 FS bits bPwrOn2PwrGood 10 * 2 milli seconds bHubContrCurrent 0 milli Ampere DeviceRemovable 0x02 PortPwrCtrlMask 0xff Hub Port Status: Port 1: 0000.0507 highspeed power suspend enable connect can't get device qualifier: Resource temporarily unavailable can't get debug descriptor: Resource temporarily unavailable Device Status: 0x0001 Self Powered Bus 002 Device 002: ID 1e0e:9001 QCOM SDXPRAIRIE-MTP _SN:0AE1567C Device Descriptor: bLength 18 bDescriptorType 1 bcdUSB 3.20 bDeviceClass 0 bDeviceSubClass 0 bDeviceProtocol 0 bMaxPacketSize0 9 idVendor 0x1e0e idProduct 0x9001 bcdDevice 4.14 iManufacturer 1 QCOM iProduct 2 SDXPRAIRIE-MTP _SN:0AE1567C iSerial 3 0123456789ABCDEF bNumConfigurations 1 Configuration Descriptor: bLength 9 bDescriptorType 2 wTotalLength 0x0168 bNumInterfaces 6 bConfigurationValue 1 iConfiguration 4 DIAG_NMEA_SER_SER_SER_RMNET bmAttributes 0xa0 (Bus Powered) Remote Wakeup MaxPower 896mA Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 0 bAlternateSetting 0 bNumEndpoints 2 bInterfaceClass 255 bInterfaceSubClass 255 bInterfaceProtocol 48 iInterface 0 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x81 EP 1 IN bmAttributes 2 Transfer Type Bulk Synch Type None Usage Type Data wMaxPacketSize 0x0400 1x 1024 bytes bInterval 0 bMaxBurst 0 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x01 EP 1 OUT bmAttributes 2 Transfer Type Bulk Synch Type None Usage Type Data wMaxPacketSize 0x0400 1x 1024 bytes bInterval 0 bMaxBurst 0 Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 1 bAlternateSetting 0 bNumEndpoints 3 bInterfaceClass 255 bInterfaceSubClass 255 bInterfaceProtocol 96 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 0x83 EP 3 IN bmAttributes 3 Transfer Type Interrupt Synch Type None Usage Type Data wMaxPacketSize 0x000a 1x 10 bytes bInterval 9 bMaxBurst 0 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x82 EP 2 IN bmAttributes 2 Transfer Type Bulk Synch Type None Usage Type Data wMaxPacketSize 0x0400 1x 1024 bytes bInterval 0 bMaxBurst 0 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x02 EP 2 OUT bmAttributes 2 Transfer Type Bulk Synch Type None Usage Type Data wMaxPacketSize 0x0400 1x 1024 bytes bInterval 0 bMaxBurst 0 Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 2 bAlternateSetting 0 bNumEndpoints 3 bInterfaceClass 255 bInterfaceSubClass 255 bInterfaceProtocol 64 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 0x85 EP 5 IN bmAttributes 3 Transfer Type Interrupt Synch Type None Usage Type Data wMaxPacketSize 0x000a 1x 10 bytes bInterval 9 bMaxBurst 0 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x84 EP 4 IN bmAttributes 2 Transfer Type Bulk Synch Type None Usage Type Data wMaxPacketSize 0x0400 1x 1024 bytes bInterval 0 bMaxBurst 0 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x03 EP 3 OUT bmAttributes 2 Transfer Type Bulk Synch Type None Usage Type Data wMaxPacketSize 0x0400 1x 1024 bytes bInterval 0 bMaxBurst 0 Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 3 bAlternateSetting 0 bNumEndpoints 3 bInterfaceClass 255 bInterfaceSubClass 255 bInterfaceProtocol 64 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 0x87 EP 7 IN bmAttributes 3 Transfer Type Interrupt Synch Type None Usage Type Data wMaxPacketSize 0x000a 1x 10 bytes bInterval 9 bMaxBurst 0 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x86 EP 6 IN bmAttributes 2 Transfer Type Bulk Synch Type None Usage Type Data wMaxPacketSize 0x0400 1x 1024 bytes bInterval 0 bMaxBurst 0 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x04 EP 4 OUT bmAttributes 2 Transfer Type Bulk Synch Type None Usage Type Data wMaxPacketSize 0x0400 1x 1024 bytes bInterval 0 bMaxBurst 0 Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 4 bAlternateSetting 0 bNumEndpoints 3 bInterfaceClass 255 bInterfaceSubClass 255 bInterfaceProtocol 64 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 0x89 EP 9 IN bmAttributes 3 Transfer Type Interrupt Synch Type None Usage Type Data wMaxPacketSize 0x000a 1x 10 bytes bInterval 9 bMaxBurst 0 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x88 EP 8 IN bmAttributes 2 Transfer Type Bulk Synch Type None Usage Type Data wMaxPacketSize 0x0400 1x 1024 bytes bInterval 0 bMaxBurst 0 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x05 EP 5 OUT bmAttributes 2 Transfer Type Bulk Synch Type None Usage Type Data wMaxPacketSize 0x0400 1x 1024 bytes bInterval 0 bMaxBurst 0 Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 5 bAlternateSetting 0 bNumEndpoints 3 bInterfaceClass 255 bInterfaceSubClass 255 bInterfaceProtocol 80 iInterface 6 RmNet Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x8a EP 10 IN bmAttributes 3 Transfer Type Interrupt Synch Type None Usage Type Data wMaxPacketSize 0x0008 1x 8 bytes bInterval 9 bMaxBurst 0 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x8e EP 14 IN bmAttributes 2 Transfer Type Bulk Synch Type None Usage Type Data wMaxPacketSize 0x0400 1x 1024 bytes bInterval 0 bMaxBurst 6 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x0f EP 15 OUT bmAttributes 2 Transfer Type Bulk Synch Type None Usage Type Data wMaxPacketSize 0x0400 1x 1024 bytes bInterval 0 bMaxBurst 2 Binary Object Store Descriptor: bLength 5 bDescriptorType 15 wTotalLength 0x002a bNumDeviceCaps 3 USB 2.0 Extension Device Capability: bLength 7 bDescriptorType 16 bDevCapabilityType 2 bmAttributes 0x00000006 BESL Link Power Management (LPM) Supported SuperSpeed USB Device Capability: bLength 10 bDescriptorType 16 bDevCapabilityType 3 bmAttributes 0x00 wSpeedsSupported 0x000f Device can operate at Low Speed (1Mbps) Device can operate at Full Speed (12Mbps) Device can operate at High Speed (480Mbps) Device can operate at SuperSpeed (5Gbps) bFunctionalitySupport 1 Lowest fully-functional device speed is Full Speed (12Mbps) bU1DevExitLat 1 micro seconds bU2DevExitLat 500 micro seconds SuperSpeedPlus USB Device Capability: bLength 20 bDescriptorType 16 bDevCapabilityType 10 bmAttributes 0x00000001 Sublink Speed Attribute count 1 Sublink Speed ID count 0 wFunctionalitySupport 0x1100 bmSublinkSpeedAttr[0] 0x000a4030 Speed Attribute ID: 0 10Gb/s Symmetric RX SuperSpeedPlus bmSublinkSpeedAttr[1] 0x000a40b0 Speed Attribute ID: 0 10Gb/s Symmetric TX SuperSpeedPlus can't get debug descriptor: Resource temporarily unavailable Device Status: 0x0000 (Bus Powered) Bus 002 Device 001: ID 1d6b:0003 Linux 5.4.188 xhci-hcd xHCI Host Controller Device Descriptor: bLength 18 bDescriptorType 1 bcdUSB 3.00 bDeviceClass 9 bDeviceSubClass 0 bDeviceProtocol 3 bMaxPacketSize0 9 idVendor 0x1d6b idProduct 0x0003 bcdDevice 5.04 iManufacturer 3 Linux 5.4.188 xhci-hcd iProduct 2 xHCI Host Controller iSerial 1 0000:01:00.0 bNumConfigurations 1 Configuration Descriptor: bLength 9 bDescriptorType 2 wTotalLength 0x001f bNumInterfaces 1 bConfigurationValue 1 iConfiguration 0 bmAttributes 0xe0 Self Powered Remote Wakeup MaxPower 0mA Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 0 bAlternateSetting 0 bNumEndpoints 1 bInterfaceClass 9 bInterfaceSubClass 0 bInterfaceProtocol 0 iInterface 0 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x81 EP 1 IN bmAttributes 3 Transfer Type Interrupt Synch Type None Usage Type Data wMaxPacketSize 0x0004 1x 4 bytes bInterval 12 bMaxBurst 0 Hub Descriptor: bLength 12 bDescriptorType 42 nNbrPorts 4 wHubCharacteristic 0x0009 Per-port power switching Per-port overcurrent protection bPwrOn2PwrGood 50 * 2 milli seconds bHubContrCurrent 0 milli Ampere bHubDecLat 0.0 micro seconds wHubDelay 0 nano seconds DeviceRemovable 0x00 Hub Port Status: Port 1: 0000.02a0 5Gbps power Rx.Detect Port 2: 0000.02a0 5Gbps power Rx.Detect Port 3: 0000.0203 5Gbps power U0 enable connect Port 4: 0000.0203 5Gbps power U0 enable connect Binary Object Store Descriptor: bLength 5 bDescriptorType 15 wTotalLength 0x000f bNumDeviceCaps 1 SuperSpeed USB Device Capability: bLength 10 bDescriptorType 16 bDevCapabilityType 3 bmAttributes 0x02 Latency Tolerance Messages (LTM) Supported wSpeedsSupported 0x0008 Device can operate at SuperSpeed (5Gbps) bFunctionalitySupport 3 Lowest fully-functional device speed is SuperSpeed (5Gbps) bU1DevExitLat 4 micro seconds bU2DevExitLat 231 micro seconds can't get debug descriptor: Resource temporarily unavailable Device Status: 0x0001 Self Powered ```
geerlingguy commented 2 years ago

Thanks for posting this info—I also put an image in your original comment for visual reference. Excited to see 5G working here... without getting too much detail of course, what region of the world are you in, and can you share your carrier?

I also noticed Waveshare is selling the module here: https://www.waveshare.com/sim8200-m2.htm — did you buy from them or from another vendor? The price puts it out of the range for hobby projects and most IoT devices (4G is still the best fit there), but if you can sustain those speeds this could be a great Internet connection / backup connection, or be useful for other mobile applications where you need bandwidth.

shayne commented 2 years ago

Sure thing! Greater New York City area, T-Mobile

Bought one on Amazon and a second is on its way from Wave Share directly. It's pricey, but compared to other 5G cards it's relatively reasonable. See below...

(edit below)

5G modems and current prices:

geerlingguy commented 2 years ago

Thanks for all the info—I'm going to close this issue out now, but feel free to post any other relevant updates as you continue using it! The card is up on the site now: https://pipci.jeffgeerling.com/cards_network/simcom-sim8200ea.html

shayne commented 2 years ago

@geerlingguy I saw you started work along these lines. I went ahead and updated the issue with my latest setup. It's been running great for me since June and the patch is done in a way where I can do a fresh clone and be up and running pretty quick!

geerlingguy commented 2 years ago

Excellent, thanks for updating—I'm stuck in the hospital for some period of time and I decided my 'try to not be bored when not in pain' thing is trying to get everything working :)

shayne commented 2 years ago

I'm so sorry Jeff. I hope your health improves soon and I wish you well. Hopefully you find some of it interesting or even helpful in my patch.

shayne commented 2 years ago

Will do! I do have updates and a diff that can be applied to the latest release to add support. Will post when I’m able. 

UnEndingDesign commented 1 year ago

Hi shayne, was wondering if you could help me out with a clone of your compiled version of OpenWrt, ive been trying for weeks and still cant get a version to work. Any help would be really appreciated.

shayne commented 1 year ago

What version are you working with and what issues are you hitting?

UnEndingDesign commented 1 year ago

openwrt-22.03.3. My system is insanely slow, it took over 24 hours for make to compile an image to flash, and a lot of the time my system is freezing while it does this or crashes. I have complied a few but openwrt wont even load.

Found a modified version of openwrt that with a little tweaking ive got to connect, but it drops out and speeds are very low.

I'm going to have another attempt to make my own, just thought if you had the image to hand, i could give it a go before i pull any more hair out. :D Also thank you for answering so quickly!

shayne commented 1 year ago

Here's the latest build I had lying around. I haven't built it in a while (It works, so I don't touch it, 🤷‍♀️)

openwrt-22.03.0-rc4-bcm27xx-bcm2711-rpi-4-ext4-factory.img.gz

somu1795 commented 1 year ago

Hi @geerlingguy , It's wonderful and so nice of you to contribute for these modules and everything.

I just got a SIM8262E-M2 module (https://www.waveshare.com/wiki/SIM8262E-M2_5G_HAT) (https://www.simcom.com/product/SIM8262X-M2.html)

However I'm not able to get it work with raspberrypi 3 Model B v1.2 , the drivers mentioned in the waveshare page do not work.

pi@raspberrypi:~/src $ lsusb Bus 001 Device 004: ID 1e0e:9001 Qualcomm / Option SDXLEMUR-LITE-MTP _SN:1505A7A0 My Kernel version: pi@raspberrypi:~/src $ uname -a Linux raspberrypi 5.15.84-v8+ #1613 SMP PREEMPT Thu Jan 5 12:03:08 GMT 2023 aarch64 GNU/Linux OS version:

pi@raspberrypi:~/src $ lsb_release -a
No LSB modules are available.
Distributor ID: Debian
Description:    Debian GNU/Linux 11 (bullseye)
Release:        11
Codename:       bullseye

Output from dmesg:
```shell
[504984.108862] usb 1-1.4: new high-speed USB device number 4 using dwc_otg
[504984.211356] usb 1-1.4: New USB device found, idVendor=1e0e, idProduct=9001, bcdDevice= 5.04
[504984.211405] usb 1-1.4: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[504984.211429] usb 1-1.4: Product: SDXLEMUR-LITE-MTP _SN:1505A7A0
[504984.211451] usb 1-1.4: Manufacturer: SIMCOM
[504984.211471] usb 1-1.4: SerialNumber: 0123456789ABCDEF
[506044.752757] usb 1-1.4: USB disconnect, device number 4
[506897.968885] usb 1-1.2: new high-speed USB device number 5 using dwc_otg
[506898.071265] usb 1-1.2: New USB device found, idVendor=1e0e, idProduct=9001, bcdDevice= 5.04
[506898.071313] usb 1-1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[506898.071338] usb 1-1.2: Product: SDXLEMUR-LITE-MTP _SN:1505A7A0
[506898.071359] usb 1-1.2: Manufacturer: SIMCOM
[506898.071380] usb 1-1.2: SerialNumber: 0123456789ABCDEF

I'm also not able to see the /dev/ttyUSB : image

Is there any way to get it working ? This is a cool modem based on Snapdragon X62. Kindly let me know your thoughts on this.

EDIT:
This is fixed now, I changed the raspberrypi kernel to latest via (rpi-update).

pi@raspberrypi:~ $ uname -a
Linux raspberrypi 6.1.21-v8+ #1639 SMP PREEMPT Fri Mar 24 17:02:53 GMT 2023 aarch64 GNU/Linux

Installed the following:
sudo apt install libmbim-utils udhcpc
How to connect to internet:
Create network conf file:

pi@raspberrypi:~ $ cat /etc/mbim-network.conf
APN=<your_apn>
PROXY=yes

sudo mbimcli --device=/dev/cdc-wdm0  --query-device-caps \\ Checks device capabilites
sudo mbim-network /dev/cdc-wdm0 start  \\ Starts the internet connection
sudo mbimcli -d /dev/cdc-wdm0 -p --query-ip-configuration   \\ check IP address
sudo udhcpc -i wwan0    \\ Add default routes to access internet via wwan0
route -n  \\ check the route priority
# Stopping connection:
sudo mbim-network /dev/cdc-wdm0 stop
sudo ifmetric wwan0 50 (it'll change the route priority so that internet can be accessed by existing connection such as eth0)
route -n \\ check route priority again
duckartes commented 1 year ago

How do you configure the modem to work in OpenWRT? I'm just using a simple USB adapter to test with I gave up on trying to compile for the time being. I can see the device in OpenWRT but QMI isn't the correct way to configure it? Any help would be appreciated. Can't seem to find much information about this device.

Is mbim the only way to connect?

This guy gives great advice about setting up a modem on the Pi but it's not a 1:1 and I'm not familiar enough with this space to adapt the information.

Also, don't buy the router WaveShare sells this with module. It has some ancient hacked version of OpenWRT which works mostly, but is buggy and sometimes requires a hard reset and they refuse to release information about how to apply your own custom firmware (I would also be interested in learning how to hack this device, I tried messing around with binwalk but no success.)

Forgive the ramble but I'm annoyed as this modem is the only way I have of connecting to the internet at the moment and having to switch these devices back and forth has me ready to use the hammer solution (:

EDIT: I was able to send a text message with AT commands through minicom so I know the device has connection out, at least for text but no luck on configuring it for sharing internet.

"Waiting for SIM initialization" is where I'm stuck at in the log files.

duckartes commented 1 year ago

Works fine on current Pop!_OS out of the box no fiddling or anything just right click connect in the status bar. I could get it to work a little bit with modemmanager and rarely with qmi using the supplied image above but nothing stable or steady. Could I get a visual guide / configuration files of how you have this set up? @shayne

EDIT: Just got a successful build going. modemmanager is the winner for me. I'll do a write up later after sleep :)

shayne commented 1 year ago

Quick update: I've since switched to a Turris Omnia and am using modemmanager. I am not even using a custom version of OpenWRT. I enabled their LTE support package, and to my surprise, everything has been working.

duckartes commented 1 year ago

Come to find out, it's already baked into OpenWRT!

bmork

I took a quick look at the hack from SIMCom and I don't think there is anything of actual value in there.

This modem should work fine with the mainline qmi_wwan driver after commit 102cd9096356 ("qmi_wwan: apply SET_DTR quirk to the SIMCOM shared device ID"), which was added in Linux v4.18.

https://forum.openwrt.org/t/sim8200ea-m2-being-natively-supported/167428/6?u=duckartes

michalisk13 commented 1 year ago

Hello,

Very nice. Can I use this for the Tofu base board?

Thanks, Mic

dr-ni commented 1 year ago

qmi was not starting but my fix has now beeing merged and should be released soon: https://github.com/openwrt/openwrt/pull/13324 I've now a running 5G Hat integrated into my system. It's running very good with qmi IMG_2358 IMG_2360

davibrilhante commented 2 months ago

Hi @somu1795, I hope you are well. Have you applied any patch to the RASP OS kernel to get this working?

I am using the same module and hat but in an RPI 4 model B.

Thanks, Davi

LuRoskosch commented 2 months ago

Hello,

We are using the same combination of hardware in our IoT sensor build:

We are experiencing issues dialing up the modem via the standard kernel methods (RNDIS or ECM). When setting the modem to these modes, the LED indicator blinks, indicating that the modem itself has a network connection. Additionally, we see the usb0 interface on our Raspberry Pi with a valid IP-address, and the modem itself is pingable. However, using this network interface to ping through does not work - traffic is not forwarded to our Raspberry Pi.

Instead, we tried using the driver provided by Waveshare (NDIS dial-up), which works but sometimes fails to reconnect. It also interferes with port-forwarding along with an access point on our Raspberry Pi, as the driver conflicts with the network manager.

The OS on our RPi is: Debian GNU/Linux 11 (bullseye). Kernel Version: 6.1.21-v8+

Waveshare support has not been helpful so far. Does anyone here know how to address this issue? Any information can be helpful!

CrashenX commented 2 months ago

Setup: Board: Compute Module 4 (CM4) PoE 4G Board OS: Both the latest vanilla RPI OS and OpenWRT should both work without any special configuration Modem: SIM8200-EA

Hope this helps!

I could not for the life of me figure out why /dev/ttyUSB* devices would not show up in either RPI OS or OpenWRT. I reached out to waveshare support, and they replied:

engineer said Pull down GPIO6

Being a newb I didn't know what that meant, so I replied for clarification and got:

The 4G module pulls down the GPIO6 and it can be started

Still confused, but with enough information to now dig, I was able to piece together instructions to get the /dev/ttyUSB* devices to show up and talk to the modem.

Python3 Setup (Python Setup Reference)

sudo apt-get update
sudo apt-get install python3-pip python3-pil python3-numpy  # Install likely requirements
python3 -m venv venv                                        # Create venv to work in
venv/bin/pip install -U pip                                 # Update pip
venv/bin/pip install RPi.GPIO                               # Install Python rpi GPIO library
venv/bin/python                                             # Start Python Shell

Python3 Commands

import RPi.GPIO as GPIO       # import library
GPIO.BCM                      # Print Mode Number
GPIO.setmode(GPIO.BCM)        # Set Mode Number
GPIO.getmode()                # Check Mode Number
GPIO.setup(6, GPIO.OUT)       # Enable Modem (GPIO6)
GPIO.cleanup()                # Cleanup when done (this will disable modem)

Minicom Commands (Common AT Commands)

sudo apt-get install minicom  # Intall minicom
sudo minicom -D /dev/ttyUSB2  # Connect to modem (while modem is active); Why ttyUSB2, specifically? No idea
AT                            # AT Test

What's Next

QSM7 commented 1 month ago

Hi @geerlingguy , It's wonderful and so nice of you to contribute for these modules and everything.

I just got a SIM8262E-M2 module (https://www.waveshare.com/wiki/SIM8262E-M2_5G_HAT) (https://www.simcom.com/product/SIM8262X-M2.html)

However I'm not able to get it work with raspberrypi 3 Model B v1.2 , the drivers mentioned in the waveshare page do not work.

pi@raspberrypi:~/src $ lsusb Bus 001 Device 004: ID 1e0e:9001 Qualcomm / Option SDXLEMUR-LITE-MTP _SN:1505A7A0 My Kernel version: pi@raspberrypi:~/src $ uname -a Linux raspberrypi 5.15.84-v8+ #1613 SMP PREEMPT Thu Jan 5 12:03:08 GMT 2023 aarch64 GNU/Linux OS version:

pi@raspberrypi:~/src $ lsb_release -a
No LSB modules are available.
Distributor ID: Debian
Description:    Debian GNU/Linux 11 (bullseye)
Release:        11
Codename:       bullseye

Output from dmesg:
```shell
[504984.108862] usb 1-1.4: new high-speed USB device number 4 using dwc_otg
[504984.211356] usb 1-1.4: New USB device found, idVendor=1e0e, idProduct=9001, bcdDevice= 5.04
[504984.211405] usb 1-1.4: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[504984.211429] usb 1-1.4: Product: SDXLEMUR-LITE-MTP _SN:1505A7A0
[504984.211451] usb 1-1.4: Manufacturer: SIMCOM
[504984.211471] usb 1-1.4: SerialNumber: 0123456789ABCDEF
[506044.752757] usb 1-1.4: USB disconnect, device number 4
[506897.968885] usb 1-1.2: new high-speed USB device number 5 using dwc_otg
[506898.071265] usb 1-1.2: New USB device found, idVendor=1e0e, idProduct=9001, bcdDevice= 5.04
[506898.071313] usb 1-1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[506898.071338] usb 1-1.2: Product: SDXLEMUR-LITE-MTP _SN:1505A7A0
[506898.071359] usb 1-1.2: Manufacturer: SIMCOM
[506898.071380] usb 1-1.2: SerialNumber: 0123456789ABCDEF

I'm also not able to see the /dev/ttyUSB : image

Is there any way to get it working ? This is a cool modem based on Snapdragon X62. Kindly let me know your thoughts on this.

EDIT: This is fixed now, I changed the raspberrypi kernel to latest via (rpi-update).

pi@raspberrypi:~ $ uname -a
Linux raspberrypi 6.1.21-v8+ #1639 SMP PREEMPT Fri Mar 24 17:02:53 GMT 2023 aarch64 GNU/Linux

Installed the following: sudo apt install libmbim-utils udhcpc How to connect to internet: Create network conf file:

pi@raspberrypi:~ $ cat /etc/mbim-network.conf
APN=<your_apn>
PROXY=yes
sudo mbimcli --device=/dev/cdc-wdm0  --query-device-caps \\ Checks device capabilites
sudo mbim-network /dev/cdc-wdm0 start  \\ Starts the internet connection
sudo mbimcli -d /dev/cdc-wdm0 -p --query-ip-configuration   \\ check IP address
sudo udhcpc -i wwan0    \\ Add default routes to access internet via wwan0
route -n  \\ check the route priority
# Stopping connection:
sudo mbim-network /dev/cdc-wdm0 stop
sudo ifmetric wwan0 50 (it'll change the route priority so that internet can be accessed by existing connection such as eth0)
route -n \\ check route priority again

did you find any firmware for this module ?

sinkingfund commented 1 month ago

@QSM7 you will find the firmware and instructions in the link below.

Be careful while updating the firmware it can turn your device into brick

https://drive.google.com/drive/folders/1Ha2-fP3HoJa_0GnW-bnakgmZaGKgtmXy

https://forum.xda-developers.com/t/video-tutorial-how-to-enable-5g-for-unlisted-countries-on-pixel-4a-5g-and-pixel-5-using-qpst.4243129

QSM7 commented 1 month ago

thank you so much, is there any other firmwares i can try? ‫في الخميس، 19 سبتمبر 2024 في 10:45 م تمت كتابة ما يلي بواسطة ‪sinkingfund‬‏ @.***‬‏>:‬

@QSM7 https://github.com/QSM7 you will find the firmware and instructions in the link below.

Be careful while updating the firmware it can turn your device into brick

https://drive.google.com/drive/folders/1Ha2-fP3HoJa_0GnW-bnakgmZaGKgtmXy

https://forum.xda-developers.com/t/video-tutorial-how-to-enable-5g-for-unlisted-countries-on-pixel-4a-5g-and-pixel-5-using-qpst.4243129

— Reply to this email directly, view it on GitHub https://github.com/geerlingguy/raspberry-pi-pcie-devices/issues/442#issuecomment-2362044979, or unsubscribe https://github.com/notifications/unsubscribe-auth/AKMCV7QSZUZBH63FY3QKZW3ZXMSUPAVCNFSM6AAAAABLM6U3DCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGNRSGA2DIOJXHE . You are receiving this because you were mentioned.Message ID: @.***>