Esempio n. 1
0
 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
Esempio n. 2
0
 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
Esempio n. 3
0
 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
Esempio n. 4
0
 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