def getSMSList(self,new=True,debug=None): sms_list = [] if new: cmd = '+CMGL=0' else: cmd = '+CMGL=4' try: self.pduMode() for header,tpdu in pairs(self.sendAT(cmd)): try: sms = SMSDeliver(debug) sms.parse(header,tpdu) sms_list.append(sms) except SMSException, e: print >>sys.stdout, "Invalid SMS Message:" + header return sms_list
def getSMSList(self, new=True, debug=None): sms_list = [] if new: cmd = '+CMGL=0' else: cmd = '+CMGL=4' try: self.pduMode() for header, tpdu in pairs(self.sendAT(cmd)): try: sms = SMSDeliver(debug) sms.parse(header, tpdu) sms_list.append(sms) except SMSException, e: print >> sys.stdout, "Invalid SMS Message:" + header return sms_list
def getSMS(self,n,debug=None): self.pduMode() header,tpdu = self.sendAT('+CMGR=%d' % n) sms = SMSDeliver(debug) sms.parse(header,tpdu,n) return sms
def getSMS(self, n, debug=None): self.pduMode() header, tpdu = self.sendAT('+CMGR=%d' % n) sms = SMSDeliver(debug) sms.parse(header, tpdu, n) return sms