Skip to content

Commit 614bacd

Browse files
committed
Allow non standard modbus ports
1 parent 3470f40 commit 614bacd

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

minicps/pymodbus/servers.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@
2020

2121
# NOTE: network
2222
parser.add_argument('-i', type=str, dest='ip', help='server ip')
23-
parser.add_argument('-p', type=int, dest='port', choices=[502],
23+
# NOTE: allows non standard port to test without sudo
24+
parser.add_argument('-p', type=int, dest='port',
2425
default=502, help='port number')
2526
parser.add_argument('-m', type=int, dest='mode', choices=[1],
2627
default=1, help='mode')

minicps/pymodbus/synch-client.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@
2121

2222
parser = argparse.ArgumentParser()
2323
parser.add_argument('-i', type=str, dest='ip', help='request ip')
24-
parser.add_argument('-p', type=int, dest='port', choices=[502],
24+
# NOTE: allows non standard port to test without sudo
25+
parser.add_argument('-p', type=int, dest='port',
2526
default=502, help='port number')
2627
parser.add_argument('-u', type=int, dest='unit',
2728
default=0, help='slave unit number')

0 commit comments

Comments
 (0)