How to install the driver under the Ubuntu 24.04 with Rasberry PI5

I install ubuntu 24.04 on the Rasberry Pi5 with RM530n-GL, now can recognize the module with command “lspci”

however, can’t see any related network interface in the system

I guesss we need to manually install driver on the Ubuntu system.
Now I got the Quectel_QConnectManager_Linux_V1.6.7.zip/QFirehose_Linux_and_Android_V1.5.zip/Quectel_Linux_PCIE_MHI_Driver_V1.3.8.zip/Quectel_Linux_Android_GobiNet_Driver_V1.6.5.zip/Quectel_Linux_Android_QMI_WWAN_Driver_V1.2.9.zip, but I don’t know how to install that driver.

Could someone help to ensure which driver need to be install, and how to install?

Finally, i need to use QconnectManager to dial the 5G services.
Thanks!

Could you tell the the Linux kernel version?
Normal if the RM530N is already working in PCIe EP mode, it should be working with the quectel-CM and the pcie_mhi driver.
But for the latest kernel version, the pcie_mhi_generic is already there and the pcie_mhi might fail to be installed.
If the driver is already in PCIe EP, you don’t need the USB driver such as GobiNet or QMI_WWAN.
Please show
lspci -vvv
and show the /dev/.
I am not sure whether the ModemManager is already there. The ModemManager is conflict with the quectel-CM.

@Bean.Wang-Q the kernel is Linux pi5 6.8.0-1036-raspi, and i had installed the pcie_mhi_generic and ModemManager, however, when install pcie_mhi, it is failed, below is the info

-----lsmod | grep pci----
root@pi5:/home/lab/pcie_mhi# lsmod | grep pci
mhi_pci_generic 32768 0
mhi 98304 1 mhi_pci_generic

------ lspci -vvv info -----
0000:01:00.0 Unassigned class [ff00]: Qualcomm Technologies, Inc Device 0308
Subsystem: Qualcomm Technologies, Inc Device 5301
Control: I/O- Mem+ BusMaster- SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- SERR- <PERR- INTx-
Region 0: Memory at 1b00000000 (64-bit, non-prefetchable) [size=4K]
Region 2: Memory at 1b00001000 (64-bit, non-prefetchable) [size=4K]
Capabilities: [40] 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=0 PME-
Capabilities: [50] MSI: Enable- Count=1/32 Maskable+ 64bit+
Address: 0000000000000000 Data: 0000
Masking: 00000000 Pending: 00000000
Capabilities: [70] Express (v2) Endpoint, MSI 00
DevCap: MaxPayload 256 bytes, PhantFunc 0, Latency L0s unlimited, L1 unlimited
ExtTag- AttnBtn- AttnInd- PwrInd- RBE+ FLReset- SlotPowerLimit 0W
DevCtl: CorrErr+ NonFatalErr+ FatalErr+ UnsupReq+
RlxdOrd+ ExtTag- PhantFunc- AuxPwr- NoSnoop+
MaxPayload 256 bytes, MaxReadReq 512 bytes
DevSta: CorrErr- NonFatalErr- FatalErr- UnsupReq- AuxPwr+ TransPend-
LnkCap: Port #0, Speed 16GT/s, Width x2, ASPM L0s L1, Exit Latency L0s <1us, L1 <64us
ClockPM+ Surprise- LLActRep- BwNot- ASPMOptComp+
LnkCtl: ASPM Disabled; RCB 64 bytes, Disabled- CommClk+
ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-
LnkSta: Speed 5GT/s (downgraded), Width x1 (downgraded)
TrErr- Train- SlotClk+ DLActive- BWMgmt- ABWMgmt-
DevCap2: Completion Timeout: Range ABCD, TimeoutDis+ NROPrPrP- LTR+
10BitTagComp+ 10BitTagReq- OBFF Not Supported, ExtFmt- EETLPPrefix-
EmergencyPowerReduction Not Supported, EmergencyPowerReductionInit-
FRS- TPHComp+ ExtTPHComp-
AtomicOpsCap: 32bit- 64bit- 128bitCAS-
DevCtl2: Completion Timeout: 50us to 50ms, TimeoutDis- LTR+ 10BitTagReq- OBFF Disabled,
AtomicOpsCtl: ReqEn-
LnkCap2: Supported Link Speeds: 2.5-16GT/s, Crosslink- Retimer+ 2Retimers+ DRS-
LnkCtl2: Target Link Speed: 8GT/s, EnterCompliance- SpeedDis-
Transmit Margin: Normal Operating Range, EnterModifiedCompliance- ComplianceSOS-
Compliance Preset/De-emphasis: -6dB de-emphasis, 0dB preshoot
LnkSta2: Current De-emphasis Level: -6dB, EqualizationComplete- EqualizationPhase1-
EqualizationPhase2- EqualizationPhase3- LinkEqualizationRequest-
Retimer- 2Retimers- CrosslinkRes: Upstream Port
Capabilities: [100 v2] 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
Capabilities: [148 v1] Secondary PCI Express
LnkCtl3: LnkEquIntrruptEn- PerformEqu-
LaneErrStat: 0
Capabilities: [168 v1] Physical Layer 16.0 GT/s <?> Capabilities: [18c v1] Lane Margining at the Receiver <?>
Capabilities: [19c v1] Transaction Processing Hints
No steering table available
Capabilities: [228 v1] Latency Tolerance Reporting
Max snoop latency: 0ns
Max no snoop latency: 0ns
Capabilities: [230 v1] L1 PM Substates
L1SubCap: PCI-PM_L1.2+ PCI-PM_L1.1+ ASPM_L1.2+ ASPM_L1.1+ L1_PM_Substates+
PortCommonModeRestoreTime=70us PortTPowerOnTime=0us
L1SubCtl1: PCI-PM_L1.2- PCI-PM_L1.1- ASPM_L1.2- ASPM_L1.1-
T_CommonMode=0us LTR1.2_Threshold=86016ns
L1SubCtl2: T_PwrOn=10us
Capabilities: [240 v1] Data Link Feature <?>
Kernel modules: mhi_pci_generic


root@pi5:/home/lab/pcie_mhi# make ARCH=arm64
make -C /lib/modules/6.8.0-1036-raspi/build M=/home/lab/pcie_mhi modules
make[1]: Entering directory ‘/usr/src/linux-headers-6.8.0-1036-raspi’
warning: the compiler differs from the one used to build the kernel
The kernel was built by: aarch64-linux-gnu-gcc-13 (Ubuntu 13.3.0-6ubuntu2~24.04) 13.3.0
You are using: gcc-13 (Ubuntu 13.3.0-6ubuntu2~24.04) 13.3.0
CC [M] /home/lab/pcie_mhi/devices/mhi_netdev_quectel.o
/home/lab/pcie_mhi/devices/mhi_netdev_quectel.c:79:5: warning: no previous declaration for ‘mhi_netdev_use_xfer_type_dma’ [-Wmissing-declarations]
79 | int mhi_netdev_use_xfer_type_dma(unsigned chan)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/lab/pcie_mhi/devices/mhi_netdev_quectel.c:213:5: warning: no previous declaration for ‘mhi_netdev_mbin_enabled’ [-Wmissing-declarations]
213 | int mhi_netdev_mbin_enabled(void) { return mhi_mbim_enabled; }
| ^~~~~~~~~~~~~~~~~~~~~~~
/home/lab/pcie_mhi/devices/mhi_netdev_quectel.c:3393:12: warning: no previous declaration for ‘mhi_device_netdev_init’ [-Wmissing-declarations]
3393 | int __init mhi_device_netdev_init(struct dentry *parent)
| ^~~~~~~~~~~~~~~~~~~~~~
/home/lab/pcie_mhi/devices/mhi_netdev_quectel.c:3407:6: warning: no previous declaration for ‘mhi_device_netdev_exit’ [-Wmissing-declarations]
3407 | void mhi_device_netdev_exit(void)
| ^~~~~~~~~~~~~~~~~~~~~~
/home/lab/pcie_mhi/devices/mhi_netdev_quectel.c:3415:2: error: #else without #if
3415 | #else
| ^~~~
/home/lab/pcie_mhi/devices/mhi_netdev_quectel.c:3416:2: error: #endif without #if
3416 | #endif
| ^~~~~
/home/lab/pcie_mhi/devices/mhi_netdev_quectel.c:3417:1: error: expected identifier or ‘(’ before ‘}’ token
3417 | }
| ^
make[3]: *** [scripts/Makefile.build:243: /home/lab/pcie_mhi/devices/mhi_netdev_quectel.o] Error 1
make[2]: *** [/usr/src/linux-headers-6.8.0-1036-raspi/Makefile:1920: /home/lab/pcie_mhi] Error 2
make[1]: *** [Makefile:240: __sub-make] Error 2
make[1]: Leaving directory ‘/usr/src/linux-headers-6.8.0-1036-raspi’
make: *** [Makefile:18: all] Error 2

It already match the driver Kernel modules: mhi_pci_generic.
The pcie_mhi and pcie_mhi_generic cannot work at the same time.

It seems that the build env is not correct.

Your guys sent me five driver file, i firstly install the mhi_pci_generic, currently for these two questions:

  1. pcie_mhi and pcie_mhi_generic can’t work at the same time
    – as I can’t see the interface info, whether i need to uninstall the pcie_mhi_generic, then install pcie_mhi?
  2. It seems that the build env is not correct.
    – how i need to fix the env issue?

Thanks!

pcie_mhi_generic is not the driver provided by Quectel. It is the native driver from the Linux kernel.
Quectel just provide the pcie_mhi driver.

It looks like the code is asymmetrical. I don’t know if you’ve modified the code.

i didn’t modified any file, in order to recover the original env, i reinstall the ubuntu 24.04 via Rasberry PI5, now the Quectel can be recognize under the USB, even if i add the “dtparam=pciex1” and change the AT command,

OK

+QCFG: “data_interface”,1,0

OK

+QCFG: “pcie/mode”,0

OK

+QCFG: “usbnet”,2

OK

root@pi5:~# lsusb
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 003 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 004 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 004 Device 004: ID 2c7c:0801 Quectel Wireless Solutions Co., Ltd. RM530N-GL
Bus 005 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
root@pi5:~# lspci
00:00.0 PCI bridge: Broadcom Inc. and subsidiaries BCM2712 PCIe Bridge (rev 21)
01:00.0 Ethernet controller: Raspberry Pi Ltd RP1 PCIe 2.0 South Bridge

As that is the pure env, could you share some guide for me, to step by step complete the setup?

Env is below:
root@pi5:~# uname -a
Linux pi5 6.8.0-1031-raspi #35-Ubuntu SMP PREEMPT_DYNAMIC Thu Jul 3 15:00:20 UTC 2025 aarch64 aarch64 aarch64 GNU/Linux

USB 3.0 is much easier than PCIe.

It seems that PCIe is not recognized now.

Maybe you can try
dos2unix *
Make sure all the files are Unix like.
I don’t have the Rpi5 and I am sorry that I cannot show you how to compile it on your device.
I can try test it with cross compiler.

cd linux-rpi-6.8.y
wget https://releases.linaro.org/components/toolchain/binaries/7.4-2019.02/aarch64-linux-gnu/gcc-linaro-7.4.1-2019.02-x86_64_aarch64-linux-gnu.tar.xz
tar xvf gcc-linaro-7.4.1-2019.02-x86_64_aarch64-linux-gnu.tar.xz -C /opt
export PATH=$PATH:/opt/gcc-linaro-7.4.1-2019.02-x86_64_aarch64-linux-gnu/bin/
make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- bcm2712_defconfig
make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- prepare
make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- modules_prepare

cd pcie_mhi
make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- KDIR=/kernel/rp-kernel/6.8.y

/bw/workfiles/kernel/native_q/pcie_mhi/devices/mhi_netdev_quectel.c:2593:2: error: implicit declaration of function ‘strlcpy’; did you mean ‘strscpy’? [-Werror=implicit-function-declaration]
  strlcpy (info->driver, "pcie_mhi", sizeof info->driver);
  ^~~~~~~
  strscpy

And just change the strlcpy to scrscpy.
Then we can get the pcie_mhi.ko.
But I think it might not work for you.

For Ubuntu 24.04 we is difficult for us to change the vmlinux.