print cmd

This commit is contained in:
2022-03-19 10:32:55 +01:00
parent b59f858b96
commit a7b6f8af06
3 changed files with 32 additions and 15 deletions
+8 -2
View File
@@ -15,10 +15,16 @@ class SerialModem():
self.ccid = ccid
def get_ccid(self):
cmd = "AT+CCID\r"
cmd = "AT+CCID"
self.modem.connect("0000")
print("try to get ccid")
response = self.modem.write(cmd, True)
self.ccid = response[0].split(" ")[1].replace("\"", "")
print("The SIM card ccid is:" + self.ccid)
print("The SIM phone number is:" + str(self.modem.ownNumber))
# print("try to get phone number")
# cmd_phone_number = "AT+CPBS=ON"
# openBook = self.modem.write(cmd_phone_number, True)
# print("response is :" + str(openBook))
# cmd_phone_number = "AT+CNUM"
# response2 = self.modem.write(cmd_phone_number, True)
# print("The SIM phone number is:" + str(response2))