如下所示: import serial import sys import os import time import re def wait_for_cmd_OK(): while True: line = ser.readline() try: print(line.decode('utf-8'),end='') except: pass if ( re.search(b'OK',line)): break def sendAT_Cmd(se