Multipart SMS with Huawei e220
AlexisLeC opened this issue · 3 comments
AlexisLeC commented
Hi everyone,
I failed to send a multipart SMS. Is that a still supported feature ?
I did :
import serial
from messaging.sms import SmsSubmit
sms = SmsSubmit("+44123231231", "hey " * 50)
ser = serial.Serial('/dev/ttyUSB1', timeout=1)
for pdu in sms.to_pdu():
ser.write('AT+CMGS=%d\r' % pdu.length)
ser.write('%s\x1a' % pdu.pdu)
andrewbird commented
Hi there,
If sounds like you didn't put the modem in PDU mode. Make sure you set AT+CMGF=0 before trying to send pre-encoded PDUs rather than plain text.
Hope it helps,
Andrew
andrewbird commented
Timeout!
AlexisLeC commented
Hi Andrew,
a bit too late but I solved the issue by (simply) adding a time.sleep(2)
after ser.write('%s\x1a' % pdu.pdu)