If you need to use different interfaces you need to start several instances from the Gurux.DLMS.AMI.
They might listen to different ports.
When the connection is made to the server, the server won't know is meter using HDLC or WRAPPER.
Trying to read with both ways (First HDLC and then WRAPPER) is causing problems with some meters.
There was one space in the wrong place that broke the message. So data is correct.
What meter did you try to read? Can you connect with GXDLMSDirector?
Options are that meter is using Short Name Referencing or connection without authentication is not allowed. The error that meter returns don't explain the reason.
I guess i have identified the problem .
AARQ request packet is without password. That is why GuruxServer giving exception.
(ServiceError Read exception. Service Unsupported
Disconnecting from the meter.)
As we have not mentioned any password in appsetting.json file.
Is it necessary to mention password in json file.? As there can be many meter connected with GuruXAMI Server and password can be different for every meter.
If the device is added to the DB then the problem is different.
You can connect to the meter without authentication then you need to check device settings from the device template.
Meter sends invalid data for the second connection.
I was thinking about this and basically there is no reason to close the connection if the client can read the data using the same authentication level.
We must usually make the connection without authentication and ask serial number of the meter. Then the connection is closed and new connection is made with a higher authentication level.
This is modified in that way that the listener calls disconnect after releasing the connection.
I hope this helps for your problem. Get the latest version.
Hi,
Hi,
Is meter sending push message that you want to show or do you want to read data fro the meter?
Can you send a trace from send and received data?
BR,
Mikko
HI ,
HI ,
I want to read meter, whenever meter is connected with GuruXAMI Server.
i will add task in GXTask.
Hi Mikko
Hi Mikko
Trace of Meter Read
Application started. Press Ctrl+C to shut down.
+
+
+
+
Client 192.168.54.31:57393 is connected.
Send SNRM request.7E A0 07 03 21 93 0F 01 7E
TX: 11:24:31 7E A0 07 03 21 93 0F 01 7E
+
+
TX: 11:25:31 7E A0 07 03 21 93 0F 01 7E
TX: 11:25:38 7E A0 07 03 21 93 0F 01 7E
Invalid connection.
Disconnecting from the meter.
Client 192.168.54.31:57398 is connected.
Send SNRM request.7E A0 07 03 21 93 0F 01 7E
TX: 11:25:48 7E A0 07 03 21 93 0F 01 7E
+
+
TX: 11:26:43 7E A0 07 03 21 93 0F 01 7E
Invalid connection.
Disconnecting from the meter.
Client 192.168.54.31:57403 is connected.
Send SNRM request.7E A0 07 03 21 93 0F 01 7E
TX: 11:26:53 7E A0 07 03 21 93 0F 01 7E
+
+
Hi,
Hi,
Meter is not replying for some reason. I believe that one of the settings is wrong.
If your meter is using WRAPPER change
"Interface": 0,
to
"Interface": 1,
BR,
Mikko
Hi Mikko ,
Hi Mikko ,
Logs
TX: 03:45:42 7E A0 07 03 21 53 03 C7 7E
Send SNRM request.7E A0 07 03 21 93 0F 01 7E
TX: 03:45:42 7E A0 07 03 21 93 0F 01 7E
RX: 03:45:42 7E A0 1F 21 03 73 78 66 81 80 13 05 02 02 00 06 01 80 07 04 00 0
0 00 01 08 04 00 00 00 01 EC CE 7E
Parsing UA reply.81 80 13 05 02 02 00 06 01 80 07 04 00 00 00 01 08 04 00 00 00
01
Parsing UA reply succeeded.
Send AARQ request
TX: 03:45:45 7E A0 2B 03 21 10 FB AF E6 E6 00 60 1D A1 09 06 07 60 85 74 05 0
8 01 01 BE 10 04 0E 01 00 00 00 06 5F 1F 04 00 00 1E 1D FF FF C5 E4 7E
RX: 03:45:45 7E A0 10 21 03 30 1E A4 E6 E7 00 0E 05 03 02 F5 CB 7E
ServiceError Read exception. Service Unsupported
Client 192.168.54.31:50882 is connected.
Disconnecting from the meter.
TX: 03:45:45 7E A0 07 03 21 53 03 C7 7E
Send SNRM request.7E A0 07 03 21 93 0F 01 7E
TX: 03:45:45 7E A0 07 03 21 93 0F 01 7E
RX: 03:45:45 7E A0 1F 21 03 73 78 66 81 80 13 05 02 02 00 06 01 80 07 04 00 0
0 00 01 08 04 00 00 00 01 EC CE 7E
Parsing UA reply.81 80 13 05 02 02 00 06 01 80 07 04 00 00 00 01 08 04 00 00 00
01
Parsing UA reply succeeded.
Send AARQ request
TX: 03:45:45 7E A0 2B 03 21 10 FB AF E6 E6 00 60 1D A1 09 06 07 60 85 74 05 0
8 01 01 BE 10 04 0E 01 00 00 00 06 5F 1F 04 00 00 1E 1D FF FF C5 E4 7E
RX: 03:45:45 7E A0 10 21 03 30 1E A4 E6 E7 00 0E 05 03 02 F5 CB 7E
ServiceError Read exception. Service Unsupported
Disconnecting from the meter.
TX: 03:45:45 7E A0 07 03 21 53 03 C7 7E
Client 192.168.54.31:50883 is connected.
Send SNRM request.7E A0 07 03 21 93 0F 01 7E
TX: 03:45:45 7E A0 07 03 21 93 0F 01 7E
RX: 03:45:46 7E A0 1F 21 03 73 78 66 81 80 13 05 02 02 00 06 01 80 07 04 00 0
0 00 01 08 04 00 00 00 01 EC CE 7E
Parsing UA reply.81 80 13 05 02 02 00 06 01 80 07 04 00 00 00 01 08 04 00 00 00
01
Parsing UA reply succeeded.
Send AARQ request
TX: 03:45:46 7E A0 2B 03 21 10 FB AF E6 E6 00 60 1D A1 09 06 07 60 85 74 05 0
8 01 01 BE 10 04 0E 01 00 00 00 06 5F 1F 04 00 00 1E 1D FF FF C5 E4 7E
RX: 03:45:46 7E A0 10 21 03 30 1E A4 E6 E7 00 0E 05 03 02 F5 CB 7E
ServiceError Read exception. Service Unsupported
Client 192.168.54.31:50884 is connected.
Disconnecting from the meter.
Can we read multiple meter of different interface with same GuruX AMI Server?
Hi,
Hi,
If you need to use different interfaces you need to start several instances from the Gurux.DLMS.AMI.
They might listen to different ports.
When the connection is made to the server, the server won't know is meter using HDLC or WRAPPER.
Trying to read with both ways (First HDLC and then WRAPPER) is causing problems with some meters.
BR,
Mikko
HI Mikko ,
HI Mikko ,
can we run multiple meter (of same interface time) with GUruXAMIServer . ?
When i am trying to read there is an exception
TX: 03:45:42 7E A0 07 03 21 53 03 C7 7E
Send SNRM request.7E A0 07 03 21 93 0F 01 7E
TX: 03:45:42 7E A0 07 03 21 93 0F 01 7E
RX: 03:45:42 7E A0 1F 21 03 73 78 66 81 80 13 05 02 02 00 06 01 80 07 04 00 0
0 00 01 08 04 00 00 00 01 EC CE 7E
Parsing UA reply.81 80 13 05 02 02 00 06 01 80 07 04 00 00 00 01 08 04 00 00 00
01
Parsing UA reply succeeded.
Send AARQ request
TX: 03:45:45 7E A0 2B 03 21 10 FB AF E6 E6 00 60 1D A1 09 06 07 60 85 74 05 0
8 01 01 BE 10 04 0E 01 00 00 00 06 5F 1F 04 00 00 1E 1D FF FF C5 E4 7E
RX: 03:45:45 7E A0 10 21 03 30 1E A4 E6 E7 00 0E 05 03 02 F5 CB 7E
ServiceError Read exception. Service Unsupported
Client 192.168.54.31:50882 is connected.
Disconnecting from the meter.
TX: 03:45:45 7E A0 07 03 21 53 03 C7 7E
Send SNRM request.7E A0 07 03 21 93 0F 01 7E
TX: 03:45:45 7E A0 07 03 21 93 0F 01 7E
RX: 03:45:45 7E A0 1F 21 03 73 78 66 81 80 13 05 02 02 00 06 01 80 07 04 00 0
0 00 01 08 04 00 00 00 01 EC CE 7E
Parsing UA reply.81 80 13 05 02 02 00 06 01 80 07 04 00 00 00 01 08 04 00 00 00
01
Parsing UA reply succeeded.
Send AARQ request
TX: 03:45:45 7E A0 2B 03 21 10 FB AF E6 E6 00 60 1D A1 09 06 07 60 85 74 05 0
8 01 01 BE 10 04 0E 01 00 00 00 06 5F 1F 04 00 00 1E 1D FF FF C5 E4 7E
RX: 03:45:45 7E A0 10 21 03 30 1E A4 E6 E7 00 0E 05 03 02 F5 CB 7E
ServiceError Read exception. Service Unsupported
Disconnecting from the meter.
TX: 03:45:45 7E A0 07 03 21 53 03 C7 7E
Client 192.168.54.31:50883 is connected.
Send SNRM request.7E A0 07 03 21 93 0F 01 7E
TX: 03:45:45 7E A0 07 03 21 93 0F 01 7E
RX: 03:45:46 7E A0 1F 21 03 73 78 66 81 80 13 05 02 02 00 06 01 80 07 04 00 0
0 00 01 08 04 00 00 00 01 EC CE 7E
Parsing UA reply.81 80 13 05 02 02 00 06 01 80 07 04 00 00 00 01 08 04 00 00 00
01
Parsing UA reply succeeded.
Send AARQ request
TX: 03:45:46 7E A0 2B 03 21 10 FB AF E6 E6 00 60 1D A1 09 06 07 60 85 74 05 0
8 01 01 BE 10 04 0E 01 00 00 00 06 5F 1F 04 00 00 1E 1D FF FF C5 E4 7E
RX: 03:45:46 7E A0 10 21 03 30 1E A4 E6 E7 00 0E 05 03 02 F5 CB 7E
ServiceError Read exception. Service Unsupported
Client 192.168.54.31:50884 is connected.
Disconnecting from the meter.
Hi Rahul,
Hi Rahul,
Have you made changes to the source code? Generated AARQ is not valid.
If you have, reject your changes.
BR,
Mikko
Hi Mikko ,
Hi Mikko ,
i haven't done any changes. i have downloaded compiled code from server.
Hi Rahul,
Hi Rahul,
Are you using Linux or Windows? If Linux what distro?
What version you are using from dot.net core
Can you run this?
dotnet --version
BR,
Mikko
I am testing this on windows
I am testing this on windows machine.
D:\WorkSpace_New\feeder_web_api>dotnet --version
3.1.101
Hi,
Hi,
There was one space in the wrong place that broke the message. So data is correct.
What meter did you try to read? Can you connect with GXDLMSDirector?
Options are that meter is using Short Name Referencing or connection without authentication is not allowed. The error that meter returns don't explain the reason.
BR,
Mikko
Hi i am trying to read Secure
Hi i am trying to read Secure Meter .
Yes i can read meter in Server mode. (Where GuruxAMI is making connection with meter)
But while reading this meter in Client mode we are getting this exception (Where GuruxAMI is server and meter is trying to connect with server)
Hi Mikko ,
Hi Mikko ,
I guess i have identified the problem .
AARQ request packet is without password. That is why GuruxServer giving exception.
(ServiceError Read exception. Service Unsupported
Disconnecting from the meter.)
As we have not mentioned any password in appsetting.json file.
"Listener": {
"Port": 6002,
"Interface": 0,
"UseLogicalNameReferencing": "True",
"ClientAddress": 16,
"ServerAddress": 1,
"Authentication": 0,
"Password": null,
"Security": 0,
"InvocationCounter": "0.0.43.1.1.255",
"DefaultDeviceTemplate": 1
},
Is it necessary to mention password in json file.? As there can be many meter connected with GuruXAMI Server and password can be different for every meter.
Please help
Hi,
Hi,
This is a problem if meter don't allow the without a password. We don't know who is connecting before we ask it from the meter.
There is nothing that we can do for this if meter don't allow connection without authentication.
You must define the password to the the json.
BR,
Mikko
Hi,
Hi,
But , Device is getting created in DB with manufacturer name. When meter connected on AMI server for first time.
Hi Mikko ,
Hi Mikko ,
Anything else we can do read multiple meter (GuruX as Server).
Hi Rahul,
Hi Rahul,
If the device is added to the DB then the problem is different.
You can connect to the meter without authentication then you need to check device settings from the device template.
BR,
Mikko
HI Mikko i have checked and
HI Mikko i have checked and it seems to be ok .
Dump of My GXDevice.
Am trying to read Genus Meter
INSERT INTO `gxdevice` (`Id`, `Dc`, `TemplateId`, `Type`, `ClientSystemTitle`, `DeviceSystemTitle`, `BlockCipherKey`, `AuthenticationKey`, `Generation`, `Updated`, `Detected`, `Removed`, `Dynamic`, `ExtraInfo`, `WaitTime`, `ResendCount`, `MaximumBaudRate`, `Authentication`, `Standard`, `Password`, `HexPassword`, `Security`, `SystemTitle`, `ServerSystemTitle`, `DedicatedKey`, `PreEstablished`, `InvocationCounter`, `FrameCounter`, `Challenge`, `PhysicalAddress`, `LogicalAddress`, `UtcTimeZone`, `ClientAddress`, `StartProtocol`, `UseRemoteSerial`, `InterfaceType`, `UseFrameSize`, `MaxInfoTX`, `MaxInfoRX`, `WindowSizeTX`, `WindowSizeRX`, `PduSize`, `UserId`, `NetworkId`, `PhysicalDeviceAddress`, `InactivityTimeout`, `ServiceClass`, `Priority`, `ServerAddressSize`, `Name`, `Verbose`, `Conformance`, `Manufacturer`, `HDLCAddressing`, `UseProtectedRelease`, `MediaType`, `MediaSettings`, `UseLogicalNameReferencing`) VALUES
(1, 0, 1, NULL, '', '', '', '', '2020-01-31 13:56:45', '2020-01-31 16:45:34', '0001-01-01 00:00:00', '0001-01-01 00:00:00', b'1', 0, 5, 3, 0, 1, 0, '1A2B3C4D', NULL, 0, '', '', '', b'0', 0, NULL, '', 1, 0, b'0', 32, 2, b'0', 0, b'0', 128, 128, 1, 1, 65535, -1, 0, NULL, 110, 1, 1, 0, 'GOERAPDRP-C', b'1', 7709, 'Genus', 0, b'0', 'Gurux.Net.GXNet', '<IP>192.168.54.31</IP>\r\n', b'1');
Hi Mikko
Hi Mikko
Am Attaching Logs also : first time where meter is connected with GuruXAMI server . Connection was successfully identified .
But Second time there is exception "Frame is not fully received."
Client 192.168.54.31:56529 is connected.
Send SNRM request.7E A0 07 03 21 93 0F 01 7E
TX: 03:47:41 7E A0 07 03 21 93 0F 01 7E
RX: 03:47:41 7E A0 1E 21 03 73 C3 7A 81 80 12 05 01 70 06 01 70 07 04
00 00 00 01 08 04 00 00 00 01 4E 29 7E
Parsing UA reply.81 80 12 05 01 70 06 01 70 07 04 00 00 00 01 08 04 00 00 00 01
Parsing UA reply succeeded.
Send AARQ request
TX: 03:47:41 7E A0 2B 03 21 10 FB AF E6 E6 00 60 1D A1 09 06 07 60 85
74 05 08 01 01 BE 10 04 0E 01 00 00 00 06 5F 1F 04 00 00 1E 1D FF FF C5 E4 7E
RX: 03:47:41 7E A0 37 21 03 30 6C 7C E6 E7 00 61 29 A1 09 06 07 60 85
74 05 08 01 01 A2 03 02 01 00 A3 05 A1 03 02 01 00 BE 10 04 0E 08 00 06 5F 1F 0
4 00 00 10 10 00 80 00 07 36 9D 7E
Parsing AARE reply61 29 A1 09 06 07 60 85 74 05 08 01 01 A2 03 02 01 00 A3 05 A1
03 02 01 00 BE 10 04 0E 08 00 06 5F 1F 04 00 00 10 10 00 80 00 07
Parsing AARE reply succeeded.
TX: 03:47:42 7E A0 19 03 21 32 6F D8 E6 E6 00 C0 01 C1 00 01 00 00 2A
00 00 FF 02 00 12 80 7E
RX: 03:47:42 7E A0 1D 21 03 52 85 6F E6 E7 00 C4 01 C1 00 09 0B 47 4F
45 52 41 50 44 52 50 2D 43 D5 2A 7E
Meter connected: GOERAPDRP-C
No tasks to execute
Disconnecting from the meter.
Client 192.168.54.31:56530 is connected.
TX: 03:47:42 7E A0 07 03 21 53 03 C7 7E
Send SNRM request.7E A0 07 03 21 93 0F 01 7E
TX: 03:47:42 7E A0 07 03 21 93 0F 01 7E
RX: 03:47:42 7E A0 07 21 03 51 11 42 7E
Parsing UA reply.
Parsing UA reply succeeded.
Send AARQ request
TX: 03:47:42 7E A0 2B 03 21 10 FB AF E6 E6 00 60 1D A1 09 06 07 60 85
74 05 08 01 01 BE 10 04 0E 01 00 00 00 06 5F 1F 04 00 00 1E 1D FF FF C5 E4 7E
RX: 03:47:42 7E A0 07 21 03 51 11 42 7E
Parsing AARE reply
Frame is not fully received.
Hi,
Hi,
Meter sends invalid data for the second connection.
I was thinking about this and basically there is no reason to close the connection if the client can read the data using the same authentication level.
We must usually make the connection without authentication and ask serial number of the meter. Then the connection is closed and new connection is made with a higher authentication level.
We'll improve this tomorrow.
BR,
Mikko
Hi Mikko .
Hi Mikko .
Hope you have changed this ?
Hi Rahul,
Hi Rahul,
That was not the reason. We modified close. Get the latest version and let me know if you have problems.
BR,
Mikko
Hi Mikko ,
Hi Mikko ,
Now , when am trying to read meter in client mode.
i have followed these steps
1. I have put tasks in GXTask for that meter .
2. Meter Successfully connected to AMIServer.
But when trying to execute task it fails .(Please find logs for reference).
i guess it is because when meter is connected to AMI server . While executing task it is not sending AARQ request with meter password .
Client 192.168.54.31:49309 is connected.
Send SNRM request.7E A0 07 03 21 93 0F 01 7E
TX: 01:25:09 7E A0 07 03 21 93 0F 01 7E
RX: 01:25:10 7E A0 1E 21 03 73 C3 7A 81 80 12 05 01 70 06 01 70 07 04
00 00 00 01 08 04 00 00 00 01 4E 29 7E
Parsing UA reply.81 80 12 05 01 70 06 01 70 07 04 00 00 00 01 08 04 00 00 00 01
Parsing UA reply succeeded.
Send AARQ request
TX: 01:25:10 7E A0 2B 03 21 10 FB AF E6 E6 00 60 1D A1 09 06 07 60 85
74 05 08 01 01 BE 10 04 0E 01 00 00 00 06 5F 1F 04 00 00 1E 1D FF FF C5 E4 7E
RX: 01:25:10 7E A0 37 21 03 30 6C 7C E6 E7 00 61 29 A1 09 06 07 60 85
74 05 08 01 01 A2 03 02 01 00 A3 05 A1 03 02 01 00 BE 10 04 0E 08 00 06 5F 1F 0
4 00 00 10 10 00 80 00 07 36 9D 7E
Parsing AARE reply61 29 A1 09 06 07 60 85 74 05 08 01 01 A2 03 02 01 00 A3 05 A1
03 02 01 00 BE 10 04 0E 08 00 06 5F 1F 04 00 00 10 10 00 80 00 07
Parsing AARE reply succeeded.
TX: 01:25:10 7E A0 19 03 21 32 6F D8 E6 E6 00 C0 01 C1 00 01 00 00 2A
00 00 FF 02 00 12 80 7E
RX: 01:25:10 7E A0 1D 21 03 52 85 6F E6 E7 00 C4 01 C1 00 09 0B 47 4F
45 52 41 50 44 52 50 2D 43 D5 2A 7E
Meter connected: GOERAPDRP-C
Task count: 7
Release from the meter.
Send SNRM request.7E A0 07 03 41 93 5A 64 7E
TX: 01:25:11 7E A0 07 03 41 93 5A 64 7E
RX: 01:25:11 7E A0 07 41 03 51 5C 47 7E
Parsing UA reply.
Parsing UA reply succeeded.
Reading: 1.0.98.1.0.255
TX: 01:25:11 7E A0 19 03 41 10 2A BF E6 E6 00 C0 01 C1 00 07 01 00 62
01 00 FF 03 00 A7 94 7E
RX: 01:25:11 7E A0 07 41 03 51 5C 47 7E
Reading: 1.0.98.1.0.255
TX: 01:25:11 7E A0 19 03 41 32 3A BD E6 E6 00 C0 01 C1 00 07 01 00 62
01 00 FF 04 00 AF D9 7E
RX: 01:25:12 7E A0 07 41 03 51 5C 47 7E
Reading: 1.0.98.1.0.255
TX: 01:25:12 7E A0 19 03 41 54 0A BB E6 E6 00 C0 01 C1 00 07 01 00 62
01 00 FF 02 00 7F 8D 7E
warn: Gurux.DLMS.AMI.Scheduler.GXSchedulerService[0]
Timed Background Service is working.
TX: 01:26:12 7E A0 19 03 41 54 0A BB E6 E6 00 C0 01 C1 00 07 01 00 62
01 00 FF 02 00 7F 8D 7E
RX: 01:26:16 7E A0 07 41 03 51 5C 47 7E
Reading: 1.0.98.1.0.255
TX: 01:26:16 7E A0 19 03 41 76 1A B9 E6 E6 00 C0 01 C1 00 07 01 00 62
01 00 FF 05 00 77 C0 7E
Hi Rahul,
Hi Rahul,
This is modified in that way that the listener calls disconnect after releasing the connection.
I hope this helps for your problem. Get the latest version.
BR,
Mikko