Lua PDU SMS encoder/decoder Currently only barebones functionality and some bugs.
To see the structure of the decoding, check out the SMS Objects section
require("luapdu")
decodedSMSObj = luapdu.decode(pduString)
To see the fields available for editing, check out the SMS Objects section
require("luapdu")
smsObj = luapdu.newTx()
smsObj.msg.content = "Some text"
smsObj.sender.num = "Some phone number"
pduString = smsObj:encode()
SMS objects for RX and TX are basically the same deal, only difference is the "recipient" and "sender" subtables. If required, one can add an "smsc" subtable with a "num" value for the SMS Center number.
TXsmsobj={ -- This is what luapdu.newTx() returns
msgReference=0,
recipient={
num = ""
},
protocol = 0, -- Currently ignored
decoding = 0, -- Currently ignored
msg={
content = ""
}
}
RXsmsobj={ -- This is what luapdu.newRx() returns
sender={
num = ""
},
protocol = 0, -- Currently ignored
decoding = 0, -- Currently ignored
timestamp = ("00"):rep(7),
msg={
content = ""
}
}