Skip to content
Advertisement

Why cannot I read data from a serial port?

I have faced the following problem: I wish to read data comming to my serial port on linux. Data are send from an external device with standard serial settings. I’m sure that the external device sends them, that has been already checked. However, on linux all i can read is an empty byte. What am I setting wrong?

My settings looks like that:

JavaScript

my read function looks like that:

JavaScript

Advertisement

Answer

I’m not sure what has happened but the following settings finally worked. I will share it with you as I got a lot of help here on Stackoverflow:

JavaScript
User contributions licensed under: CC BY-SA
8 People found this is helpful
Advertisement