Automatically detect serial port configuration?

I am developing software around an existing hardware product. I have full control over the communications protocol, but I'm not sure how to facilitate device discovery.

A device may have a number of possible configurations (i.e., baud rate, data bit, parity bits, stop bits) that must be detected at runtime. What is the easiest and most reliable way for software to determine which configuration it uses? Again, I have full control over the communication protocol, so I can determine any mechanism I want.

+3
source share
1 answer

? ? "-" (, RS-232) multi-drop (, RS-485)? ( ) , , .

, , , , , "ack" . "let talk", .

. , . , 70- . 8 , , . CRC .

+3
source

Source: https://habr.com/ru/post/1705847/


All Articles