+CNMI command: how to receive notification and save to SIM Card incoming SMS

前端 未结 1 1844
北海茫月
北海茫月 2021-01-26 07:03

I need to get notification success delivery. I read so many and tried. I have GSM modem ZTE K4510Z. I don\'t get any notification or save to sim card. In my tes

相关标签:
1条回答
  • 2021-01-26 07:29

    You are sending AT+CNMI=2,2,0,0,0 command, with the goal to have in SM either incoming SMS or the SMS delivery report, along with URCs notifications for them. I'll try to explain how to enable both of these features.

    According to the spec, syntax the syntax of that command is:

    AT+CNMI=[mode[,mt[,bm[,ds[,bfr]]]]]

    • mode: unsolicited result codes buffering option. mode=2 means that URCs are buffered in case of busy modem.
    • mt: result code indication reporting for SMS-DELIVER. mt=2 means that incoming messages are shown directly with a +CMT: ... URC. No storing!!!
    • bm: broadcast reporting option. Unrelevant for us.
    • ds: SMS-STATUS-REPORTs reporting option. ds=0 means that status report receiving is not reported and is not stored! That's not what you want!
    • bfr: buffered result codes handling method. Unrelevant for us.

    Instead, you probably want:

    • mt=2, meaning that incoming SMS is stored and a +CMTI: <mem>,<idx> URC is shown, stating that is has been stored in memory=mem at index=idx.
    • ds=2, meaning that if a status report is stored, then a +CDSI: <mem>,<idx> URC is shown, stating that is has been stored in memory=mem at index=idx.

    This might help you, but be aware that

    1. You have to make sure that your modem model do supports these features (verify it in its AT user guide) and they are not dummy.
    2. You have to make sure that your operator supports status delivery reports, and that they have been enabled for your SIM.
    3. The SMS storage class affects the storing action performed by the modem, and this is true expecially for status delivery reports. In this case you can use ds=1 setting, which at least makes the modem show a report with the URC +CDS: ....

    Note: be also aware that +CNMI settings are volatile, so if you reboot you lose them unless you save them in the default profile (by issuing AT&W&P).

    0 讨论(0)
提交回复
热议问题