-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
Description
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:
- Online converter: https://www.diafaan.com/sms-tutorials/gsm-modem-tutorial/online-sms-submit-pdu-decoder/
- Useful doc: https://www.developershome.com/sms/operatingMode.asp#20.1
- Handling PDUs with python3: https://pypi.org/project/pdusms/
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