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

Implement PDU mode for sim800 module #2

Open
cbosdo opened this issue Jan 2, 2024 · 0 comments
Open

Implement PDU mode for sim800 module #2

cbosdo opened this issue Jan 2, 2024 · 0 comments
Labels
enhancement New feature or request sim

Comments

@cbosdo
Copy link
Owner

cbosdo commented Jan 2, 2024

Sending long SMSes is only possible using the PDU mode. This would be useful for the help command since this generates several messages for now: concatenated SMS would make this more readable for the user.

Useful resources:

Reading a received SMS PDU:

import smspdu
from io import StringIO
sms_data = smspdu.fields.SMSDeliver.decode(StringIO(the_pdu_from_cmgr))

Preparing the PDU to send an SMS:

import smspdu
pdu = smspdu.SMS_SUBMIT.create(_, 'recipient', 'The message should not exceed 140 characters.')

To send longer messages cut them and play with the user data headers.
See https://en.wikipedia.org/wiki/Concatenated_SMS

@cbosdo cbosdo added enhancement New feature or request sim labels Jan 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request sim
Projects
None yet
Development

No branches or pull requests

1 participant