How the Listener works?

14 posts / 0 new
Last post
polyrem
How the Listener works?

( meter is iskra MT382 )
If I let default setting at appsettings.json, it look like that ( after meter connected ):
Client 95.105.137.154:1604 is connected.
Send SNRM request.7E A0 07 03 21 93 0F 01 7E
TX: 09:10:48 7E A0 07 03 21 93 0F 01 7E
TX: 09:11:48 7E A0 07 03 21 93 0F 01 7E
TX: 09:12:48 7E A0 07 03 21 93 0F 01 7E
Failed to receive reply from the device in given time.
Disconnecting from the meter.

If I change some, according my meter settings:
"Interface": 1 ( is it WRAPPER ? )
"ClientAddress": 1, ( if I want to use "Low" autentication
"Authentication": 1 ( is it Low ? )
"Password": 123456578 ( default iskra password )
"DefaultDeviceTemplate": 1 ( for auto add device from default template )
There is:
Client 5.178.62.43:2464 is connected.
Send AARQ request
TX: 10:37:34 00 01 00 01 00 01 00 38 60 36 A1 09 06 07 60 85 74 05 08 01 01 8A 02 07 80 8B 07 60 85 74 05 08 02 01 AC 0A 80 08 31 32 33 34 35 36 37 38 BE 10 04 0E 01 00 00 00 06 5F 1F 04 00 00 1E 1D FF FF
TX: 10:38:34 00 01 00 01 00 01 00 38 60 36 A1 09 06 07 60 85 74 05 08 01 01 8A 02 07 80 8B 07 60 85 74 05 08 02 01 AC 0A 80 08 31 32 33 34 35 36 37 38 BE 10 04 0E 01 00 00 00 06 5F 1F 04 00 00 1E 1D FF FF
TX: 10:39:34 00 01 00 01 00 01 00 38 60 36 A1 09 06 07 60 85 74 05 08 01 01 8A 02 07 80 8B 07 60 85 74 05 08 02 01 AC 0A 80 08 31 32 33 34 35 36 37 38 BE 10 04 0E 01 00 00 00 06 5F 1F 04 00 00 1E 1D FF FF
Failed to receive reply from the device in given time.
Disconnecting from the meter.

What am I doing wrong?

Kurumi
Kurumi's picture

Hi,

Change Interface to 1 and ClientAddress to 1. "Password" is "12345678" and "Authentication" 1.
Something like:
"Listener": {
"Port": 1000,
"Interface": 1,
"UseLogicalNameReferencing": "True",
"ClientAddress": 1,
"ServerAddress": 1,
"Authentication": 1,
"Password": "12345678",
"Security": 0,
"InvocationCounter": "",
"DefaultDeviceTemplate": 0
},

________________________________________
Mikko Kurunsaari
Gurux Ltd
http://www.gurux.fi

polyrem

It is what I tried, except "Password" value to quotation marks ( "12345678" )
Now I get:
Send AARQ request
TX: 01:36:21 00 01 00 01 00 01 00 38 60 36 A1 09 06 07 60 85 74 05 08 01 01 8A 02 07 80 8B 07 60 85 74 05 08 02 01 AC 0A 80 08 31 32 33 34 35 36 37 38 BE 10 04 0E 01 00 00 00 06 5F 1F 04 00 00 1E 1D FF FF
RX: 01:36:21 00 01 00 01 00 66 00 38
Destination addresses do not match. It is 102. It should be 1.
Disconnecting from the meter.

Kurumi
Kurumi's picture

Hi,

Change ClientAddress from 1 to 102.

BR,
Mikko

________________________________________
Mikko Kurunsaari
Gurux Ltd
http://www.gurux.fi

polyrem

I tried that but:
Parsing AARE reply02 03 09 06 00 00 19 03 00 FF 09 10 49 53 4B 31 30 33 30 37 37 32 36 37 33 33 34 37 09 08 37 32 36 37 33 33 34 37
Invalid tag.
Disconnecting from the meter.

Kurumi
Kurumi's picture

Hi,

Can you try to connect with GXDLMSDirector and send the first two lines from the trace?
One of the config settings is not correct.

BR,
Mikko

________________________________________
Mikko Kurunsaari
Gurux Ltd
http://www.gurux.fi

polyrem

Connect GXDLMSDirector to meter:
13:56:43 01:56:43.003 Info Opening
13:56:43 01:56:43.003 Info Client Settings: Protocol Tcp Host: 85.237.232.68 Port: 4059
13:56:43 01:56:43.379 Info Open
13:56:43 Send AARQ request.
TX: 00 01 00 01 00 01 00 38 60 36 A1 09 06 07 60 85 74 05 08 01 01 8A 02 07 80 8B 07 60 85 74 05 08 02 01 AC 0A 80 08 31 32 33 34 35 36 37 38 BE 10 04 0E 01 00 00 00 06 5F 1F 04 00 00 1E 1D FF FF
13:56:43 01:56:43.972 Sent 00 01 00 01 00 01 00 38 60 36 A1 09 06 07 60 85 74 05 08 01 01 8A 02 07 80 8B 07 60 85 74 05 08 02 01 AC 0A 80 08 31 32 33 34 35 36 37 38 BE 10 04 0E 01 00 00 00 06 5F 1F 04 00 00 1E 1D FF FF
13:56:44 01:56:44.488 Received 00 01 00 01 00 01 00 2B 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 04 00 00 1E 1D 05 00 00 07
13:56:44
RX: 00 01 00 01 00 01 00 2B 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 04 00 00 1E 1D 05 00 00 07

Get Invocation counter ( 0.0.43.1.1.255 )
14:02:00 Read object type Data index: 2
TX: 00 01 00 01 00 01 00 0D C0 01 C1 00 01 00 00 2B 01 01 FF 02 00
14:02:00 02:02:00.204 Sent 00 01 00 01 00 01 00 0D C0 01 C1 00 01 00 00 2B 01 01 FF 02 00
14:02:00 02:02:00.423 Received 00 01 00 01 00 01 00 09 C4 01 C1 00 06 00 00 00 00
14:02:00
RX: 00 01 00 01 00 01 00 09 C4 01 C1 00 06 00 00 00 00

Kurumi
Kurumi's picture

Hi,

If I remember right you have modified your first post. Please, don't do it.
It seems that your meter is sending data:

0.0.25.3.0.255 (Ch. 0 PPP setup )
ISK1030772673347
72673347

This meter is working a little bit different than what we are reading at the moment.

I'm not sure if do you need to send AARQ at all and connection is already up or is this just extra data what meter sends to identify the meter. Can you start /Gurux.Net.CSharp.Example and check what data meter is sending.

https://github.com/gurux/Gurux.Net

I need to think about this.

BR,

Mikko

________________________________________
Mikko Kurunsaari
Gurux Ltd
http://www.gurux.fi

polyrem

I tried Gurux.Net.CSharp.Example as a server.
And find some mistakes. Before I set wrong object 0.1.25.9.0.255 instead of 0.0.25.9.0.255, where were set 3 objects to push: "Logical name", "Device ID" and "IP address" with wrong attribute.
Sorry for chaos.
Now, when meter push its LogicalName 0.0.42.0.0.255 ( with Attribute 2 ),
it receive 00-01-00-01-00-66-00-26-0F-00-00-02-FF-0C-07-E3-0C-0F-07-0D-04-05-00-FF-C4-00-02-01-09-10-49-53-4B-31-30-33-30-37-37-32-36-37-33-33-34-37
GuruxNetSample also shows correct IPaddres an port of meter, no errors, and received message.

With Gurux.DLMS.AMI I got the same received message, but with response "Parsing AARE ... ), which I don't need, and with "Invalid tag" message:
Client 85.237.232.95:3802 is connected.
Send AARQ request
TX: 01:23:55 00 01 00 66 00 01 00 38 60 36 A1 09 06 07 60 85 74 05 08 01 01 8A 02 07 80 8B 07 60 85 74 05 08 02 01 AC 0A 80 08 31 32 33 34 35 36 37 38 BE 10 04 0E 01 00 00 00 06 5F 1F 04 00 00 1E 1D FF FF
RX: 01:23:55 00 01 00 01 00 66 00 26 0F 00 00 03 03 0C 07 E3 0C 0F 07 0D 18 01 00 FF C4 00 02 01 09 10 49 53 4B 31 30 33 30 37 37 32 36 37 33 33 34 37
Parsing AARE reply02 01 09 10 49 53 4B 31 30 33 30 37 37 32 36 37 33 33 34 37
Invalid tag.
Disconnecting from the meter.

In appsettings.json must be 102 instead of 1 for ClientAddress ( "Destination addresses do not match. It is 102. It should be 1"). I dont know why. It is 1, when I connect with GDXDLMSDirector.

polyrem

And for complete, when I read same object "LogicalName" from GXGLMSDirector via DataConcetrator, Gurux.DLMS.AMI shows:
Send AARQ request
TX: 04:19:58 00 01 00 01 00 01 00 38 60 36 A1 09 06 07 60 85 74 05 08 01 01 8A 02 07 80 8B 07 60 85 74 05 08 02 01 AC 0A 80 08 31 32 33 34 35 36 37 38 BE 10 04 0E 01 00 00 00 06 5F 1F 04 00 00 1E 1D FF FF
RX: 04:19:58 00 01 00 01 00 01 00 2B 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 04 00 00 1E 1D 05 00 00 07
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 1E 1D 05 00 00 07
Parsing AARE reply succeeded.
Reading: 0.0.42.0.0.255
TX: 04:19:58 00 01 00 01 00 01 00 0D C0 01 C1 00 01 00 00 2A 00 00 FF 02 00
RX: 04:19:59 00 01 00 01 00 01 00 16 C4 01 C1 00 09 10 49 53 4B 31 30 33 30 37 37 32 36 37 33 33 34 37
Disconnecting from the meter.
TX: 04:19:59 00 01 00 01 00 01 00 05 62 03 80 01 00
RX: 04:19:59 00 01 00 01 00 01 00 05 63 03 80 01 00

Kurumi
Kurumi's picture

Hi,

You try to send push messages and not use auto-connect. The difference between those is that when autoconnection is used, the client can make a connection to the meter and read data from the meter.

Push message is used to sent to notify errors or collected data, etc...

Now it seems that you want to receive push messages and not read data from the meter. Is this correct?

BR,
Mikko

________________________________________
Mikko Kurunsaari
Gurux Ltd
http://www.gurux.fi

polyrem

I try to push messages for check meter's identity. But anything I push, nothing is written to database. I don't know how to use any push message from meter with GX.DLMS.AMI.
When I push message, process ends with "Invalid tag" after "Parsing AARE reply".
It is O.K. with sheduled process, when GX.DLMS.AMI connect to meter, read data and write to database ( there is another problem with db, but it is other topic ).
But I am talking about Listener, and that service listen to pushed message, isn't it? I expected, when meter push message ( Logical name with its IP address ), listener "catch" it, and write to database, to GX.DLMS.AMI know what meter is where.
In device properties in GuruxDLMS.AMI is an option "Dynamic IP address". Where is some "IP variable" for the device? And how it is possible to change it?

Kurumi
Kurumi's picture

Hi,

There are two different ways to access meter data. Listener waits for incoming connections from the meters. This feature is used with dynamic IP addresses where the meter makes a connection to the server.

In your case meter is sending push message and connection to the meter is not established. Meter just sends the push message and no connection is made.

The problem with push messages is that data of push messages can be anything. Use can usually configure the structure of push messages.

We are testing add-in for Gurux.DLMS.AMI that can be configured to handle push messages.

BR,
Mikko

________________________________________
Mikko Kurunsaari
Gurux Ltd
http://www.gurux.fi

polyrem

I am using push message ( fixed interval on meter ) for identify where is ( dynamic IP ) and which meter it is ( Logical name ). I read it from .NET console ( which is written to file ).
Then in host file i change record ( Logical name as host with its IP ). In Gurux.DLMS.AMI, every meter has as IP address its Logical name ( it is IP address according records in host file ). And in scheduller is definition of reading profile from every meter. Complicated, but works ( with some db issue https://www.gurux.fi/node/14164 ).
Thank you for yor perfect solution and support.