Chat freely about anything...

User avatar
By pirks
#1123
Code: Select allimport serial

sp="/dev/ttyUSB0"

port = serial.Serial(sp)

while True:
    port.write("AT+RST")
    rcv = port.read(10)
    print rcv


dont work, please help!
User avatar
By Bert
#1145 What exactly doesn't work?

Also, you are missing a CR+LF (i.e. \r\n) at the end of your command.
User avatar
By wlinux
#1395 Hey,
The default baud rate for python is 19200, while the default baud rate for the ESP8266 is either 115200 or 57600. Try both of these lines, one of them should work.

Code: Select allport = serial.Serial(sp, 115200)


Or for version one

Code: Select allport = serial.Serial(sp, 57600)