The issue with the write method on Windows is that it's trying to use self.sync_serial.fileno(), which doesn't work on Windows because the pySerial library doesn't provide a valid file descriptor.
To fix this, you can modify the write method to directly write to the serial port without using asyncio's add_writer method.
The issue with the write method on Windows is that it's trying to use self.sync_serial.fileno(), which doesn't work on Windows because the pySerial library doesn't provide a valid file descriptor.
To fix this, you can modify the write method to directly write to the serial port without using asyncio's add_writer method.