Added the STAtus line check on both power on and off.
Incoming SMS get stored in the SIM, maybe it is useful to clear it up or re-send it elsewhere. Probably a parametric/configurable solution is better.
if after a successful software poweroff AT+CPOWD=1 the physical power off sequence is applied, then, since the sequence is mostly identical to the power-on sequence, it power on the modem again.
It would be nice to have auto-completion on the command line.