Trouble Registering Private APN on Teltonika Rut955 with OpenWRT

I'm encountering a peculiar issue with my Teltonika Rut955 router when running OpenWRT firmware. I hope someone here can help me troubleshoot it.

Here's the problem:

When I run the stock Teltonika firmware, I can successfully connect to my private APN using the QMI protocol, and everything works perfectly. However, after flashing OpenWRT onto the Rut955, I can establish a connection, and it functions flawlessly until it occasionally drops or is forced to re-register. Once this happens, I find myself having to revert back to the stock firmware, re-establish the connection, and then flash OpenWRT again to restore proper functionality.

I would greatly appreciate any insights or suggestions on how to address this issue. Has anyone else experienced a similar problem with the Rut955 and OpenWRT?

Thank you in advance for your assistance!

What modem do you have inside your router?

I believe its a Quectel EC25-EU

If you have EC25 then you can use it in ECM mode and the modem will try to reconnect itself. Make sure you use the recent modem firmware.
Anyway, see Teltonika RUT955 - modem not detected
You may need to add a modem reset on startup and as a part of your connection monitoring routine.

My issue isn't with the modem's ability to reconnect to the network. It reconnects just fine if the connection is lost for some reason. My challenge specifically arises when the modem is forced to re-register with the network. In such cases, I get stuck with a "NETWORK_REGISTRATION_FAILED" error.

Once again - add a modem reset as a part of your connection monitoring routine.
Once it get stuck next time try various methods and find the right one, you can do this via QMI command, via USB or GPIO actions.
In ECM mode the modem should be able to handle re-registrations on its own.
If you're looking for "NETWORK_REGISTRATION_FAILED" root cause you may need to contact Quectel for assistance.
But first check the current modem firmware version and see if upgrade is available.

You could check the configured APNs with AT+CGDCONT? via picocom.

+CGDCONT: 1,"IP","omnitel","0.0.0.0",1,0,0,0

OK

Is the response, which is not the correct configuration. I checked a different(exactly same) routers modem and the APN Config was correct, but when it at some point is forced to reregister, it will fail and the APN config will be set to the above.

Set it to your private APN.
AT+CGDCONT=1,"IP","<your APN>"

I don´t think the APN configuration can be change by your service provider.
After next drop and re-registration check the APN configuration again, AT+CGDCONT?

I tried this and i get: AT+CGDCONT=1,"IP","myapn"
OK
When i check the apn config it looks correct, but doesnt work.
However, it still gives me "NETWORK_REGISTRATION_FAILED". I do not think that the provider can change my apn config, but rather that something is changing it when the provider forces me to re-register. My theory is the qmi script, but i could be way off. I dont think it has anything to do with the actual modem since the router works perfectly fine with stock teltonika firmware, just not with openwrt firmware.

Is your private APN = myapn ?
Or, did I misunderstood?

If you use a SIMcard with the normal APN, can you then make a successful registration?

I wrote myapn in the response as I don’t want to reveal my private apn. In the config its the correct address to my private apn. If I use a different sim card and use a public apn the connection works. Just not with my private one

Try to remove the APN from +CGDCONT
AT+CGDCONT=1,"IP"

Are you using IPv4 only with your private APN?

NETWORK_REGISTRATION_FAILED points to APN, SIMcard or subscription issues.
But, if the same SIMcard is working with the Teltonika SW, then the SIMcard and subscription is OK.

BTW, did you do a power reset after you change to your APN?

When i changed the APN i rebooted the router. Should i be doing something else aswell?
Yes im only using IPv4 with my private APN.
I've removed the APN now, but it did not change anything :confused:
Edit:
After removing the APN i get: Error: Network device is not present
Edit:
It happend after i removed the apn and tried the follwing: uqmi -d /dev/cdc-wdm0 --start-network --apn myapn
The response i got: Call Failed
After another reboot network devices are now present.....

Please check
AT+QMBNCFG="List"

Open picocom and run:

at+cfun=0
at+cgdcont=1,"IP","<your APN>,,0
at+cfun=1

Exit picocom

Run:

uqmi -d /dev/cdc-wdm0 --get-serving-system
uqmi -d /dev/cdc-wdm0 --get-signal-info

uqmi -d /dev/cdc-wdm0 --get-serving-system
{
"registration": "registered",
"plmn_mcc": xxx,
"plmn_mnc": x,
"plmn_description": "�2��v\u0003",
"roaming": false
}
root@OpenWRT:~# uqmi -d /dev/cdc-wdm0 --get-signal-info
{
"type": "gsm",
"signal": -51
}
the plmn mcc & mnc are correct, but i still get NETWORK_REGISTRATION_FAILED

AT+QMBNCFG="List"
+QMBNCFG: "List",0,0,0,"ROW_Generic_3GPP",0x05010824,201806201
+QMBNCFG: "List",1,0,0,"Reliance_OpnMkt",0x05011B4B,201801051
+QMBNCFG: "List",2,0,0,"TW_Mobile_China_VoLTE",0x05800301,202005121
+QMBNCFG: "List",3,0,0,"Bouygues_France_VoLTE",0x05800101,202004151
+QMBNCFG: "List",4,0,0,"Telstra-Commercial_VoLTE",0x05800716,202002061
+QMBNCFG: "List",5,0,0,"Commercial-Smartfren",0x05012509,202001041
+QMBNCFG: "List",6,0,0,"VF_Germany_VoLTE",0x05010444,202005121
+QMBNCFG: "List",7,0,0,"Swis_switzerland_VoLTE_VoWiFi",0x05010421,201712231
+QMBNCFG: "List",8,0,0,"TF_Spain_VoLTE",0x05800D43,201909301
+QMBNCFG: "List",9,0,0,"Commercial-DT-VOLTE",0x05011F27,202006291

OK
Im not firmiliar with this, is there anything specific i should look for here?

All looks good. None of the configs are selected and activated (2nd and 3rd number).

Somehow there is still an issue with your APN settings. You can not register in LTE with wrong APN settings, but in 2G and 3G you can, but you will not have any data service.