Home > Mobile >  Python USES pyserial module to a serial port input CTRL + z
Python USES pyserial module to a serial port input CTRL + z

Time:09-29


The program code
The import serial
S=serial. Serial (0, '115200')
S. rite (' at + CMGS=13912341234 \ r \ n ')
S. rite (' only test & lt; CTRL + z> ') # here must end with CTRL + z to send a text message

Add: the execution of s. rite (' at + CMGS=13912341234 \ r \ n ')
afterThere will be a & gt; Prompt
Only the test & lt; Ctrl + z>
Complete text messages

CodePudding user response:

I also met the same problem, ha ha, TD - 8311 phone SMS cat, SMS can only send the ASCII character set, can't send Chinese characters,
  • Related