I want to send SMSs in PDU mode. I have checked the spec for my modem, and it supports PDU mode.
I have developed a PDU encoder and decoder, but now I do not know
length of PDU string = ( PDUlength - 2 - ServiceCentreNumber length ) / 2
ServiceCentreNumber length is first byte of PDU string. (2 Hex char = 8 bit)
Command for send sms in PDU mode:
send:AT+CMGF=0 //recieved "\r\nOK\r\n"
send:AT+CMGS= //recieved "\r\n> "
send: //recieved "\r\n+CMGS: 59\r\n\r\nOK\r\n"
Another variant is to use instead +CMGS command +CMGW to write msg to memory (code same above) and then use +CMSS to send the message from memory.