zabsalahid / serialport-gsm

SerialPort-GSM is a simplified plugin for communicating with gsm modems. (Primarily for sms) (Focused in PDU mode)
MIT License
90 stars 47 forks source link

Receiving a MMS PUSH make unresponsive the modem #60

Closed BartaG512 closed 4 years ago

BartaG512 commented 4 years ago

If my sim card receive a CMTI for a MMS PUSH, it sends a CMGR and my modem will be unresponsive, and only restart solve this problem. Maybe i should handle differently these messages? What could be the problem?

2|service- | Modem Received: 2|service- | Modem Received: +CMTI: "SM",1,"MMS PUSH",2,1 2|service- | Ignore Data: +CMTI: "SM",1,"MMS PUSH",2,1 2|service- | Modem Write: AT+CMGR=1 2|service- | Modem Received: AT+CMGR=1 2|service- | Activate Message Processing for: AT+CMGR=1 2|service- | Modem Received: 2|service- | Modem Received: +CMTI: "SM",2,"MMS PUSH",2,2 2|service- | Modem Received: 2|service- | Modem Received: +CMTI: "SM",1,"MMS PUSH" 2|service- | Modem Write: AT+CMGR=2 2|service- | Modem Write: AT+CMGR=1

BartaG512 commented 4 years ago

Found a documentation: https://simcom.ee/documents/SIM900/SIM900_MMS_AT%20Command%20Manual_V1.04.pdf

It includes “MMS PUSH” in “+CMTI: …” when the received short message is a MMS push message. If the current received MMS push message is a concatenated message, it will include“,,” after “MMS PUSH”. is the total number of the parts of the concatenated message and is the index of the current part in the whole concatenated message. For example: +CMTI: "SM",1,"MMS PUSH",2,1. In the URC, 2 means the concatenated push message include two parts and 1 means the current message is the first part.

When all the parts of the concatenated push message have been received, it will prompt “+CMTI: …” URC with “MMS PUSH” and without “,,”.

For example: +CMTI: "SM",1,"MMS PUSH"

stale[bot] commented 4 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.