<div dir="ltr">Hi Bruno,<br><br>On Thu, 28 Oct 2021 at 13:13, Bruno Antunes <<a href="mailto:baantunes@gmail.com" target="_blank">baantunes@gmail.com</a>> wrote:<br>><br>> Hi Aleksander,<br>><br>> Thank you for the prompt reply.<br>><br>> On Wed, 27 Oct 2021 at 08:30, Aleksander Morgado<br>> <<a href="mailto:aleksander@aleksander.es" target="_blank">aleksander@aleksander.es</a>> wrote:<br>> ><br>> > Hey Bruno,<br>> ><br>> > > Has anyone tried the PCIE mode on the newer 5G modems?<br>> ><br>> > Yes yes, I use one almost everyday in my laptop.<br>> ><br>> > > I have tested with both the Quectel RM500Q and the SIMCom 8202G with no success.<br>> > > The Quectel model is detected by the modemmanager but can't establish<br>> > > a connection:<br>> > ><br>> > ><br>> > > mmcli -V<br>> > > mmcli 1.17.900<br>> > ><br>> > > mmcli -L<br>> > >     /org/freedesktop/ModemManager1/Modem/1 [manufacturer unknown] model unknown<br>> > >     /org/freedesktop/ModemManager1/Modem/0 [Quectel] RM500Q-GL<br>><br>> This is the output from a single Quectel modem.<br>> We cannot fully disable the USB mode, that is why the modem manager<br>> detects 2 modems, one in USB mode and other in PCI.<br>><br>> > ><br>> > > mmcli -m 0<br>> > >   -----------------------------<br>> > >   General  |              path: /org/freedesktop/ModemManager1/Modem/0<br>> > >                  |         device id: 9490a63480fa96a9c2b519059801e65adb2a9681<br>> > >   -----------------------------<br>> > >   Hardware |      manufacturer: Quectel<br>> > >                   |             model: RM500Q-GL<br>> > >                   | firmware revision: RM500QGLABR11A03M4G<br>> > >                   |         supported: gsm-umts, lte<br>> > >                   |           current: gsm-umts, lte<br>> > >                   |      equipment id: 863305040265935<br>> > >   -----------------------------<br>> > >   System   |            device:<br>> > > /sys/devices/platform/soc/3110000.usb3/xhci-hcd.1.auto/usb4/4-1/4-1.2<br>> ><br>> > The RM500 here is being detected in USB mode, not in PCI mode.<br>> ><br>> > >                  |           drivers: option<br>> ><br>> > And only used with TTYs, not being managed in either MBIM or QMI. Is<br>> > this a custom system that doesn't have qmi_wwan or cdc_mbim support?<br>><br>> Maybe I wasn't clear but both outputs correspond to the same Quectel<br>> modem that is being detected as USB (mmcli -m 0) and PCI (mmcli -m 1).<br>> Probably that's why some ports are on one modem and others on the other.<br>><br>> ><br>> > >                  |            plugin: quectel<br>> > >                  |      primary port: ttyUSB2<br>> > >                  |             ports: ttyUSB0 (qcdm), ttyUSB1 (gps),<br>> > > ttyUSB2 (at)<br>> > >   -----------------------------<br>> > >   Status   |              lock: sim-pin<br>> > >                |    unlock retries: sim-pin (3), sim-puk (10),<br>> > > sim-pin2 (3), sim-puk2 (10)<br>> > >                |             state: locked<br>> ><br>> > Here it says the SIM-PIN is locked; did you try to unlock it before<br>> > attempting the connection?<br>> ><br>> > >                |       power state: on<br>> > >                |    signal quality: 0% (cached)<br>> > >   -----------------------------<br>> > >   Modes    |         supported: allowed: 2g, 3g, 4g; preferred: none<br>> > >                  |           current: allowed: 2g, 3g, 4g; preferred: none<br>> > >   -----------------------------<br>> > >   IP       |         supported: ipv4, ipv6, ipv4v6<br>> > >   -----------------------------<br>> > >   3GPP     |     enabled locks: sim<br>> > >   -----------------------------<br>> > >   SIM      |  primary sim path: /org/freedesktop/ModemManager1/SIM/0<br>> > ><br>> > ><br>> > > mmcli -m 1<br>> > >   -------------------------<br>> > >   General |           path: /org/freedesktop/ModemManager1/Modem/1<br>> > >   -------------------------<br>> > >   System  |         device:<br>> > > /sys/devices/platform/soc/3400000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0<br>> > >                 |        drivers: mhi_net, mhi-pci-generic<br>> ><br>> > This one is PCI, yes.<br>> ><br>> > >                 |         plugin: generic<br>> > >                 |   primary port: wwan0qmi0<br>> > >                 |          ports: mhi_hwip0 (net), wwan0mbim0 (mbim),<br>> > > wwan0qmi0 (qmi)<br>> ><br>> > And we can see both QMI and MBIM ports exposed; which is similar to the EM9191.<br><br>Output looks fine, but it seems to bind to the generic MHI configuration which may not be suitable for Quectel, AFAIK Quectel usually rely on MBIM for both control/data path and you may need to configure the driver for that. Can you check if the device has subvendor PCI IDs?<div><br></div><div>Then you can add a new entry in:</div><div><a href="https://github.com/torvalds/linux/blob/cc0356d6a02e064387c16a83cb96fe43ef33181e/drivers/bus/mhi/pci_generic.c#L406" target="_blank">https://github.com/torvalds/linux/blob/cc0356d6a02e064387c16a83cb96fe43ef33181e/drivers/bus/mhi/pci_generic.c#L406</a></div><div><br></div><div>And point to the same config as for em1xx modems (<span style="color:rgb(36,41,47);font-family:ui-monospace,SFMono-Regular,"SF Mono",Menlo,Consolas,"Liberation Mono",monospace;font-size:12px;white-space:pre-wrap">mhi_quectel_em1xx_channels).</span></div><div><br></div><div>Regards,</div><div>Loic</div></div>