libmodbus icon indicating copy to clipboard operation
libmodbus copied to clipboard

modbus_get_socket always return -1

Open audi0615 opened this issue 3 years ago • 0 comments

Hi.

I'd like to inquire the amount of data available at a serial port using "ioctl". something like this.

int nread; ioctl(Serial, FIONREAD, &nread);

this is for implementing a non-blocking RTU slave but modbus_get_socket(ctx) always return -1. how can i get socket (file descriptor) of a serial port??

audi0615 avatar Feb 23 '22 13:02 audi0615