[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: serial port trouble on Win10
- From: Ulrich Schmidt <u.sch.zw@...>
- Date: Sat, 10 Oct 2020 10:55:59 +0200
Am 10.10.2020 um 08:51 schrieb Sean Conner:
It was thus said that the Great Ulrich Schmidt once stated:
I can open the serial port via io.open() but this approach works in
buffered mode and my short messages get stuck in the transmit buffer.
Two possible solutions:
1. use file:flush() after writing data to ensure the buffer is written.
2. use file:setvbuf('no') immediately after opening the serial port to avoid
all buffering of data.
-spc (And that's all the ideas I have)
Solution 2. worked so far as i can send short commands to my hardware.
Thank You. For doing so, i had to open the file in write mode.
Unfortunately i cant read this port. To read, i need to open the file in
read mode but cant send anymore.
Thats probably the reason Steve Donovan did a lot of magic behind the
scene in his winapi module.