As specified in the ETSI standards (e.g. ETSI TS 127 001), CREG and
CEREG responses can contain optional parameters:
+CEREG: <n>,<stat>[,<tac>,<ci>[,<AcT>]]
For example, the Monarch GMS01Q returns the following response:
+CEREG: 2,1,"3982","00DF3B03",7
This results in TinyGSM setting state as '7' instead of 1 preventing
any connection.
Fix this by picking the next integer after the first ',' which will
always works (with or without optional parameters)
Signed-off-by: Fabrice Fontaine <fabrice.fontaine@orange.com>