On Linux and MacOS the serial connection handler has the DTR flag configured as ON by default.
The Windows handler has it OFF by default, which prevents a successful serial connection because the driver expects it to be ON.
This issue can be reproduced using UART over USB. The first serial connection through libiio will block while initializing due to this flag. Using a different terminal emulator for the first connection will set the DTR flag to ON. Any subsequent libiio connection (prior to a reset) will be functional.
PR Description
On Linux and MacOS the serial connection handler has the DTR flag configured as ON by default. The Windows handler has it OFF by default, which prevents a successful serial connection because the driver expects it to be ON. This issue can be reproduced using UART over USB. The first serial connection through libiio will block while initializing due to this flag. Using a different terminal emulator for the first connection will set the DTR flag to ON. Any subsequent libiio connection (prior to a reset) will be functional.
Serial connection opening is handled separately for Windows (can be checked in libserialport: https://github.com/sigrokproject/libserialport/blob/master/serialport.c#L488 and https://github.com/sigrokproject/libserialport/blob/master/serialport.c#L549 ).
PR Type
PR Checklist