PhysicsUofRAUI,
Are you saying you didn't have any antenna connected?
As a general rule, always has a load like an an antenna connected to an RF system, else all power is reflected back to the chip and may fry it.
Concerning this hanging issue, I did also a lot of troubleshooting, and noticed I was always stuck at:
gsmAccess.begin(PINNUMBER)
By default, it is in sychronous mode, meaning that ones we enter this method, it will wait for a connection to the carrier. If none happens, it wil indefinitely stay in there.
If you want to have control on this or eventually execute something else while it is loking at the carrier, then go in asynchronous mode, and methos will return after every check.
This is documented
here.
LTE-M and NB-IoT coverage in my area is bad, I was hitting my head on the walls before realizing this, and though I was having SW or HW issues...