Python 使用漫游SIM卡发送SMS的Sim7600(4g帽子设置)

Python 使用漫游SIM卡发送SMS的Sim7600(4g帽子设置),python,raspberry-pi,sms,pyserial,at-command,Python,Raspberry Pi,Sms,Pyserial,At Command,此代码在本地SIM卡上工作正常,但如果插入国际SIM卡,则无法发送 国际SIM卡具有移动数据余额,可以通过'AT+CSCA?查询其正确的SMSC import serial import os import time import subprocess from datetime import date port = serial.Serial("/dev/ttyUSB2", baudrate=9600, timeout=1) port.write('AT' + '\r

此代码在本地SIM卡上工作正常,但如果插入国际SIM卡,则无法发送

国际SIM卡具有移动数据余额,可以通过
'AT+CSCA?
查询其正确的SMSC

import serial
import os
import time
import subprocess
from datetime import date

port = serial.Serial("/dev/ttyUSB2", baudrate=9600, timeout=1)


port.write('AT' + '\r\n')
rcv = port.read(10)

port.write('AT+CMGF=1' + '\r\n')  # Set to text mode
rcv = port.read(10)

port.write('AT+CMGS="+xxxxxxxxxx"' + '\r\n')  # Area code and local number

port.write('AT+CMSS=1' + '\r\n')
rcv = port.read(10)
print(rcv)

today = date.today()
hr = time.localtime().tm_hour
mins = time.localtime().tm_min
secs = time.localtime().tm_sec


text_body = 'Operating mode set successfully ' + str(today) + " " + str(hr) + ":" + str(mins) + ":" + str(secs)
port.write(text_body + '\r\n')
rcv = port.read(10)
print(rcv)

port.write("\x1A")
for i in range(10):
    rcv = port.read(10)
    print(rcv)
什么是“Sim7600”?