def _monitoring(self): print("DEBUG___SimManager monitoring") #for SMS sms = SMS.SMSManager() # anyone want to read # are there any problem while True: if not self.listenerQueue.empty(): value = self.listenerQueue.get() print(value) if value == "+CPIN: READY": #self._onInsertedSim() #break print("DEBUG___+CPIN: ready----------------") pass elif value == "+CPIN: NOT READY": print("DEBUG___+CPIN: NOT ready----------------") self._onEjectSim() break #SMS check elif value.find("CMTI") != -1: print("DEBUG___Received new Message") smsindex = sms.read_index(value) smscontent = self.read_SMS(smsindex[1]) if "\"$\"" in smscontent: #finish receive SMS print("DEBUG___finish read SMS") else: #wait for finish print("DEBUG___read next SMS") else: print("DEBUG___no such command : ", value)