Module will respond error when sending some SMS commands if SIM card initialization is not finished, so it is necessary to finish the SIM card initialization before operating SMS commands. In general, SIM card initialization will be finished in about 20s after powering on. However, for some SIM cards, it will take about 40s to finish the initialization due to different electrical characteristics. You can use AT+QINISTAT to check the status of SMS initialization. +QINISTAT:3 means the SMS initialization is finished and then you can operate the SMS commands.
Note: Before SIM card initialization is finished, executing the following commands will respond error.
QMGDA /CGSMS /CSMS/ CMGL / CSAS/CRES/ CMSS /CSCB/ CMGW /CMGD/ CMGR /CPMS