we have Iskraemeco MT372 meters connected to Moxa NPort 5130 rs-485 to ethernet converters. Serial port of the converters operates in "real com" mode, it means that we can mount remote serial port on the linux/windows workstation and read meters using Gurux.DLMS.Client.Example.python.
Such setup works fine but looks unreliable because in the case of a large number of converters we have to mount a lot of serial ports and keep track of which ports correspond to which meters.
So we tried to change Moxa operation mode to "TCP Server mode" and read meters using tcp/ip mode. Mikko mentioned that such setup should work http://gurux.fi/comment/17821#comment-17821. We tried to use different command options but unfortunately we cannot get it to work.
python main.py -h 192.168.1.221 -p 4001 -iWRAPPER -c 100 -s 161 -a Low -P 12345678 -t Verbose
gurux_dlms version: 1.0.85
gurux_net version: 1.0.17
gurux_serial version: 1.0.14
Authentication: Authentication.LOW
ClientAddress: 0x64
ServerAddress: 0xa1
Standard: Standard.DLMS
TX: 21:28:02 7E A0 08 02 43 C9 93 A9 46 7E
Data send failed. Try to resend 1/3
Data send failed. Try to resend 2/3
RX: 21:28:17
DisconnectRequest
Traceback (most recent call last):
File "main.py", line 104, in main
reader.readAll(settings.outputFile)
File "/root/Gurux.DLMS.Python/Gurux.DLMS.Client.Example.python/GXDLMSReader.py", line 504, in readAll
self.initializeConnection()
File "/root/Gurux.DLMS.Python/Gurux.DLMS.Client.Example.python/GXDLMSReader.py", line 308, in initializeConnection
self.readDLMSPacket(data, reply)
File "/root/Gurux.DLMS.Python/Gurux.DLMS.Client.Example.python/GXDLMSReader.py", line 119, in readDLMSPacket
self.readDLMSPacket2(data, reply)
File "/root/Gurux.DLMS.Python/Gurux.DLMS.Client.Example.python/GXDLMSReader.py", line 170, in readDLMSPacket2
raise e
File "/root/Gurux.DLMS.Python/Gurux.DLMS.Client.Example.python/GXDLMSReader.py", line 162, in readDLMSPacket2
raise TimeoutException("Failed to receive reply from the device in given time.")
gurux_common.TimeoutException.TimeoutException: Failed to receive reply from the device in given time.
Can someone help us understand what we are doing wrong ?
WRAPPER is used when a plain TCP/IP connection is used for the meter. Remove that. You should be able to connect with the same settings as before. Check that your serial port settings are the same.
Hi,
Hi,
WRAPPER is used when a plain TCP/IP connection is used for the meter. Remove that. You should be able to connect with the same settings as before. Check that your serial port settings are the same.
BR,
Mikko
Good day Mikko,
Good day Mikko,
Without WRAPPER all works just fine.
Thank you for prompt reply.