vshymanskyy / TinyGSM

A small Arduino library for GSM modules, that just works
GNU Lesser General Public License v3.0
1.96k stars 726 forks source link

use CEREG first to check registration status for BG96 #467

Closed j3tm0t0 closed 3 years ago

j3tm0t0 commented 3 years ago

We have some issue with BG96 used in Japan. We do not have 2G here and some operator provides SIM without SMS, another operator does not provide 3G, which causes CREG returns 0,2 (searching) or 0,3 (denied) even though PS attach succeeded.

To check registration status in such situation, we could use CEREG like it is done for "u-blox SARA-R4" module. I referred TinyGsmClientSaraR4.h for this patch.

Could you consider to merge this, please?

Many thanks to @SRGDamia1 !

SRGDamia1 commented 3 years ago

Looks good. Merged.

j3tm0t0 commented 3 years ago

Thank you for the quick action. I appreciate it! 😄