def send_sms(self, pdu, pdu_len): """Sends the given pdu and returns the index""" cmd = ATCmd('AT+CMGS=%d' % pdu_len, name='send_sms', eol='\r') cmd.splitcmd = '%s\x1a' % pdu return self.queue_at_cmd(cmd)
def add_sms(self, pdu_len, pdu): """Adds C{sms} to the SIM and returns the index""" atstr = 'AT+CMGW=%d' % pdu_len cmd = ATCmd(atstr, name='add_sms', eol='\r') cmd.splitcmd = '%s\x1a' % pdu return self.queue_at_cmd(cmd)