Here are my views concerning this infamous AT+CREG? freeze.
I have several battery packs LI-ION 18650 1S3P, 3.7V 7800mAh.
I check the battery voltage before use.
But I have noticed that even if the battery voltage is correct, which means >4V, if the battery has not been charged for sometimes, the freeze can occur.
This does not happen with a new battery or a just recharged battery.
I understand that the board needs to draw much current when establishing the connection, and that requires a plugged in battery : USB power or solar power is not enough.
BUT what I dont understand is : If there is no battery connected, or if the battery cannot furnish enough current, the board should not freeze during the initial AT+CREG? loop.
Indeed, for a remote and autonomous IOT project, requiring periodic reconnexion to GSM network, it can always happen that the battery has become a bit weak.
In that case, the freeze will occur at GSM reconnexion and the whole board will freeze and need a manual or watchdog reset.
Maybe this can be adressed progammatically in the gsm.begin() or other parts pof the library
If it is a hardware limitation of SARA chip : time to look for another board ?