forked from faucamp/python-gsmmodem
-
Notifications
You must be signed in to change notification settings - Fork 115
Open
Description
I noticed that the code seems not to handle flash SMS reception. For my purpose, I messed around with subclassing and overwriting _handleModemNotification, basically like this:
def _handleModemNotification(self, lines):
[...]
elif line.startswith('+CMT'):
# PDU is in next line
next_line_is_sms_pdu = True
elif next_line_is_sms_pdu:
_sms = decodeSmsPdu(line)
sms = ReceivedSms(self, Sms.STATUS_RECEIVED_UNREAD,
number=_sms['number'] if 'number' in _sms else None,
time=_sms['time'] if 'time' in _sms else None,
text=sms['text'] if 'text' in _sms else None)
self.smsReceivedCallback(sms)
return
[...]
Does it make sense to integrate it into the main code? If yes, I could make a pull request.
Metadata
Metadata
Assignees
Labels
No labels