Yichen Zhao

Results 26 comments of Yichen Zhao

@wachidsusilo @lesslefou Do you have a whole project and I/O data example? I don't know why some people can't read data correctly. And other people can read proper data. It's...

@wachidsusilo Maybe due to `OVERLAPPED_IO` or win32 API. I use `OVERLAPPED_IO` to get data in async mode. Otherwise the function `WaitForSingleObject` will enter blocking mode.Then UI will be freezed. (⊙︿⊙)...

> Hi, I can't read the complete input message, in image first, I read fail, in image second, I read by app other ![image](https://user-images.githubusercontent.com/43919583/203962737-f93975d2-c0cc-4bc7-bf6e-0510de19de7d.png) ![image](https://user-images.githubusercontent.com/43919583/203962859-02ceeba1-16c7-4647-b64e-dfff6f450461.png) Does your message have '\0'...

> what can i do? If you send 10 char, read 10bytes, not 100. And try add '\n' or '\0' in your message. In C ```c char message[5] = '1234';...

> i also can't read any data. i think the read function has some serious bugs If you use `readBytesOnce` function, can you read anything? Or do you have any...

I have confirmed that `ClearCommError` and `PurgeComm` causes the read bug. `ClearCommError` will return wrong `cbInQue` in some systems if `PurgeComm` has been executed. Because `PurgeComm` may be processed after...

I think Microsoft doesn't provide a disconnection function directly. In my opinion, there are some indirect methods to detect the device connection status. 1. You can write bytes to COM...

I am very sorry to reply so late. I've been busy with my PhD project. Maybe you have fixed the problem. It looks like a stream asynchronous problem. I think...

Do you set `port.readBytesSize` and ensure that you open ture COM port? Any logs from your infoLog will help. If readOnListenFunction is still failed, you can try another function like:...

You read 8 bytes, so function returns 8 bytes. It's the right behaviour for `readOnListenFunction`. What do you want to read? In COM port/RS485/RS232/UART, data frame should be processed by...