From 7c4cb13bbcfc7869e0ac7f5c623ecf2f7eea76d7 Mon Sep 17 00:00:00 2001 From: Stéphane Raimbault Date: Mon, 10 Jan 2011 19:30:47 +0100 Subject: [PATCH] Add comment to explain the complex naming scheme of COMs on Win32 --- src/modbus-rtu.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/modbus-rtu.c b/src/modbus-rtu.c index f80de59..e813842 100644 --- a/src/modbus-rtu.c +++ b/src/modbus-rtu.c @@ -805,7 +805,10 @@ const modbus_backend_t _modbus_rtu_backend = { /* Allocate and initialize the modbus_t structure for RTU - device: "/dev/ttyS0" - - baud: 9600, 19200, 57600, 115200, etc + On Win32, it's necessary to prepend COM name with "\\.\" for COM number + greater than 9, eg. "\\\\.\\COM10". See + http://msdn.microsoft.com/en-us/library/aa365247(v=vs.85).aspx for details. + - baud: 9600, 19200, 57600, 115200, etc - parity: 'N' stands for None, 'E' for Even and 'O' for odd - data_bits: 5, 6, 7, 8 - stop_bits: 1, 2 -- libgit2 0.21.4