UPDATE:
I figured the problem was with the connection over the PL2303. I reduced the BAUD rate of ESP to 9600 bps with help of an Arduino. Contacted the manufacturer of PL2303 and will update the post with the instructions when I receive them.
I'm trying to get an ESP-201 (variant of ESP8255) to work on Windows host. My aim is to configure the setup correctly and valitade by geting an OK response for AT command.
I've read that PL2303 PC-side default baud rate is 9600 and ESP-201's baud rate is 115200. I've suspected that data I'm sending isn't received correctly by ESP so I tried to configure the BAUD rates. I tried do it with Python because PuTTY connects to the device but doesn't let me give any input to the terminal. So I've tried to run this Python code, without the ESP connected to the PL2303.
import serial
esp = serial.Serial(port="COM5", baudrate=9600, timeout=1)
esp.write(b"PLBAUD 115200")
time.sleep(500)
print(esp.readline())
esp.write(b"BAUD 115200")
time.sleep(500)
print(esp.readline())
This should first set the ESP side BAUD rate of PL2303 to 115200 then set the PC side BAUD rate to 115200. But sending the AT command with the following code doesn't yield the expected OK response after changing BAUD rate setting in Windows device manager BAUD settings and plugging in the ESP module.
import serial
esp = serial.Serial(port="COM5", baudrate=115200, timeout=1)
esp.write(b"AT\r\n")
print(esp.readline())
Incase the strings sent are in UTF-8, I encoded them to hex manually and sent them again and result didn't change.
I've contacted Waveshare, maker of this module, and learned that the host PC and the device on the TTL side of this adapter must have the same BAUD rate in order to work. Set them both back to 115200 and it is solved.
This is due to the adapter not having a buffer that adapts the BAUD rate, rather than it being a pass-through device.