How to set COM Port baud rate to 921600 on Windows? - serial-port

Problem: How to access a device whose baud rate is 921600 from Windows 7 PC.
I have an embedded device and I used to connect to this device through USB Serial Port at a baud rate of 115200.
Now, the embedded device's baud rate is changed to 921600. I cannot communicate with this device.
I have a terminal program (Teraterm) in which I can set the baud rate to 921600. But I am not able to communicate with the emb device as the maximum baud rate that can be set in Windows 7 device manager for this device is 128000.
I even tried with a Python script (changing baud rate 921600) which was working earlier (at baud rate 115200). Now it's not working.

Related

Can't connect to ESP-201 over PL2303

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.

High Speed Serial (UART) communication is failing for 3M baud rate and above with Software Flow Control

I am working on linux kernel 4.8 and have configured ttyS2 to act as HSUART as shown in the dmesg log:
[2.599632] dw-apb-uart.9: ttyS2 at MMIO 0x9232e000 (irq = 5, base_baud = 115200) is a 16550A
I am able to communicate through ttyS2 successfully till 921800 baud rate with software flow control, but for higher baud rates i.e 3M/4M there is FIFO overrun at the receiver side. The FIFO_SIZE is 16 bytes and I have tried configuring RECEIVER_FIFO_THRESHOLD to 8 and 14 bytes but still the issue persists. However there is no issue seen if I use Hardware Flow Control (CTS & RTS)
Any inputs on the maximum baud rate that can be used with software flow control for successful serial communication would definitely be of help! Thanks in advance!

Why do I need to change the Baudrate after I send a Reset to the ESP8266?

So I have succesfully attached a Esp8266 to an Arduino Due. I can communicate with it via Serial Monitor if I choose the Baudrate to be 74880. Then all the commands come to it correctly and can be read back correctly. However, when I send the command AT+RST which restarts the Esp8266 I can no longer communicate with it and need to reopen the serial connection with a Baudrate of 115200. I have to repeat this every time I load the code new to the Arduino or when I power off the Esp8266.
Any ideas where this behaviour comes from?
Here you are an explanation about where are the origins of such a behavior:
Baudrate of 74880 Bd is ESP's 'native' baud rate for sending debug messages generated automatically by the system itself during the boot in case there is 26 MHz instead of 40 MHz crystal used on board - and as we can see, mostly that is the case.
With 40 MHz crystal the baudrate would be as expected (115200) but with 26 MHz crystal instead, baudrate is 115200 * 26/40 = 74880.
Later after bootloader ends baudrate is controlled in other way so that's why you have two different baudrates - the first is the default one (74880) and the second is the one that is active later (the one you can set).
I usually set baudrate to 74880 so I can see both the messages generated automatically and the messages I send from the code.
In order to set UART baudrate persistent after a reset you should use AT+UART_DEF.
From the AT instruction :
AT+UART_DEF – default UART configuration This command sets the UART configuration and save it to flash. It is stored as the default
parameter and will also be used as the default baudrate henceforth.

Non-standard serial baud rate of 62,500 on a PC

I am looking for a way of using a baud rate of 62,500 (8N1) on a windows PC on a serial port or USB->serial adapter to communicate with an older piece of hardware that uses this speed. Can this be done via code or is it a hardware solution?
You can use Putty for open a serial port with custom speed.

Change baud rate of ESP8266

I update my esp8266-1 firmware sdk 1.5.0 AT version:0.51.0.0(Nov 27 2015 13:37:21).
Now I cant change my baud rate to 9600.
I tried AT+UART_DEF=9600,8,1,0,0 and AT+UART=9600,8,1,0,0 to change my baud rate. But after power off baud rate change to 115200. What can i do to save my default baud rate?

Resources