Modbus RTU Master Connect me 9210

I am trying to implement Modbus RTU Master in Digi connect me 9210 device. For this purpose I am using libmodbus library.

What would be device name I have to give in NetOs to connect with my local Computer.?

Now I am using

ctx = modbus_new_rtu(“COM3”, 19200, ‘N’, 8, 1);
modbus_set_slave(ctx, SERVER_ID);

/* TCP */
// ctx = modbus_new_tcp(“10.0.0.66”, 502);

modbus_set_debug(ctx, TRUE);

if (modbus_connect(ctx) == -1) {
fprintf(stderr, "Connection failed: %s
",
modbus_strerror(errno));
modbus_free(ctx);
return -1;
}

But its keep saying connection failed. I have also tried “/dev/USB0” and “/dev/ttyS0”. I have Modbus Slave in my local computer to test with the Module client.

I’m not for sure on this, but if you take a look at
etos75\src\examples\uart you can the use of a format like this:

#define RX_PORT_NAME “/com/0”

Worth a try…

Thanks for the reply. But I have sorted out this issue. It was related to the flags used in libmodbus (Not supported by Digi). So I changed the flags to open the device (serial port “/com/0 (default port)”).

Thanks. I have already sorted this issue.