I am working on AWS freeRTOS where I have ported it for Ublox Sara R4 cellular module,
This ported source was working fine and communicating to AWS using MQTT,
Weirdly same source stopped working complaint about registration failure , and after some sort of debugging I found that it is replying “CELLULAR_RAT_INVALID” (detailed logs attached herewith), I am using hologram (global sim card) and has enough credit.
I tried using Cellular_SetRatPriority() manually but it has the same result.
From below logs it can be seen on invalid RAT, more logs attached in zip
>>> Cellular GetServiceStatus failed 0, ps registration status 3 <<
...
>>> Cellular module can't be registered <<<
This line indicate the Cellular_GetServiceStatus function is success and cellular modem is responding to our request. However, the packet switch registration is denied.
Since your porting is working before, I think it is more like network registration problem.
I can suggest the following steps.
Sara-R4 supports set network operators commands. We can start from checking this config.
Setting +UMNOPROF profile will automatically select suitable values for +URAT and +UBANDMASK.
Once you confirm the setting is correct, reboot the device to run the demo application again to see the result.
Check the Radio Access Technology of your network environment.
You may find the following information from hologram. Global IoT Coverage | Hologram
You can use AT command to communicate with cellular modem directly. Below is the Sara-R4 at command links.
Another method is you can get the RAT priority setting through Cellular_SetRatPriority and Cellular_GetRatPriority.
Once you confirm the RAT setting is correct, reboot the device to run the demo application again to see the result.
Use another working SIM card to help verifing. If this SIM card can be registered to network, you may contact your network service provider asking the network registration problem.