I am using RM500Q-GL 5G HAT module connected into PI 4 and PI 5. For my conditions I only need LTE signal, because it has better and more stable connection for my use. So I worked with this.
There is difference between setup RNDIS on PI 4 and PI 5. On PI 5 I have Kernel 16.6 and I find some major differences.
I have found many conflicts between RNDIS and GNSS. GNSS never worked if the RNDIS start before it. So it's important setup it correctly.
Before the connection the HAT, you need install following modules
sudo apt-get install minicom
sudo apt-get install udhcpc
Now you can set the HAT.
sudo minicom -D /dev/ttyUSB2
AT+QENG="servingcell"
AT+QCFG="usbnet",1
AT+CFUN=1,1
Set DNS by this command
sudo dhclient -v usb0 sudo udhcpc -i usb0 sudo route add -net 0.0.0.0 usb0
sudo nano /usr/local/bin/hat_autorun.sh
#!/bin/bash /sbin/dhclient -v eth1 /sbin/udhcpc -i eth1 /sbin/route add -net 0.0.0.0 eth1
sudo chmod +x /usr/local/bin/hat_autorun.sh
sudo nano /etc/systemd/system/init-hat.service
[Unit] Description=Initialize LTE connection After=network-online.target [Service] ExecStart=/usr/local/bin/hat_autorun.sh RemainAfterExit=true [Install] WantedBy=multi-user.target
sudo systemctl daemon-reexec sudo systemctl enable init-hat.service
AT+QGPSCFG="autogps",1