[Ovmsdev] SIM7600 Registration Denied

Mark Webb-Johnson mark at webb-johnson.net
Fri Aug 26 14:34:03 HKT 2022


I’ve been fighting a problem for the past few months with registration getting denied on T-Mobile in USA using Hologram and our new 4G SIM7600G modem. Without cellular connectivity at home, it hasn’t been easy to recreate this, but I found a solution:



Finally, with a good high gain antenna on my external wall facing the nearest cellular tower a couple of km away, I can get cellular (and even GPS with the little black puck) connectivity.

So back to the two issues we are having:

The FPLMN blacklist in the modem lists a bunch of cellular networks we are blocked from connecting to (including the ones we need).

There have been reports that the connection to hologram works and is maintained, but the OVMS never connects to the v2 server.

To address #1, I have extended the “cellular cmd” command to try to capture the output from the modem. There is no simple way of knowing when the command has completed, so for the moment I just look at data returned from the modem on the command channel, and stop when it hasn’t changed for a second or so. That now works like this:

OVMS# cellular cmd AT+CRSM=176,28539,0,0,12
+CRSM: 144,0,"FFFFFFFFFFFFFFFFFFFFFFFF"
OK

OVMS# cellular cmd ATI
Manufacturer: SIMCOM INCORPORATED
Model: SIMCOM_SIM7600G
Revision: SIM7600M21-A_V2.0.1
SVN: 01
IMEI: (redacted)
+GCAP: +CGSM
OK

If required, we can send a relatively simple command to clear the FPLMN blacklist. It seems to work well, but I still need to test it wider (especially over v2 protocol commands, where I think we might have a recursion problem).

So on to issue #2 that has been much harder to find. Finally, working with Hologram, I discovered that the problem seems to be in our handling of CREG network registration messages. I found a module with this problem, and manually issuing commands I found:

AT+CREG?    Registration Denied
AT+CGREG?    Registration Denied
AT+CEREG?     Registered Roaming

It seems that the E-UTRANS (some 4G LTE carriers) won’t show the registration status correctly in AT+CREG. I guess they are refusing GSM (3G) connections from us (aka ‘Registration Denied’) while allowing 4G LTE. But as we only use the AT+CREG status to know whether we are connected to the network, the result is we can’t detect the E-UTRANS LTE connection and think registration has been denied. Connected to Hologram, but no data (or v2 server) connection.

I did some research, and can’t find a definitive answer to how best to do this (especially as we have both 3G and 4G options, still support 2G, and a lot seems to depend on the individual cellular carrier options). So I implemented it as best I could. I re-ordered the registration statuses to be in lowest priority order, then created m_netreg_d[3] to store the registration status for each of the three types. Finally, I changed it so that m_netreg reflects the highest registration status. That way if CREG says RegistrationDenied, and CEREG says RegisteredRoaming, I treat it as RegisteredRoaming.

This seems to work (on my test bench at least), and I now plan to deploy for wider testing. Code is committed and built as 3.3.002-45-g42546636 on the main firmware site.

I would gratefully appreciate feedback on this.

Regards, Mark.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openvehicles.com/pipermail/ovmsdev/attachments/20220826/78718f49/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: PastedGraphic-13.tiff
Type: image/tiff
Size: 173702 bytes
Desc: not available
URL: <http://lists.openvehicles.com/pipermail/ovmsdev/attachments/20220826/78718f49/attachment-0001.tiff>


More information about the OvmsDev mailing list