Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Receiving Flash SMS #116

Open
nitram2342 opened this issue Dec 14, 2024 · 0 comments
Open

Receiving Flash SMS #116

nitram2342 opened this issue Dec 14, 2024 · 0 comments

Comments

@nitram2342
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant