How to use Gurux AMI with Incoming Connections

10 posts / 0 new
Last post
ajaywazir
How to use Gurux AMI with Incoming Connections

Hi
How to set Gurux AMI parameters to enable it to accept incoming TCP connections with WRAPPER protocol. (meters using GPRS or ethernet to make a client connection to a GuruxAMI Server)
When we add device in DLMS director, it asks for IP address and consequently, AMI service makes a TCP call to the IP address and the task fails.

AMI service should actually wait for incoming connection and then read the meter.
Where and how to indicate to AMI service, that the meter is to be connected on incoming connections and not via outbound (from server) connections
I could not find it in the Wiki Page
Regards
Ajay

Kurumi
Kurumi's picture

Hi,

We have improved this. Get the latest version. There are some new parameters under Listener that you can use to config your reader.

BR,
Mikko

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

Kurumi
Kurumi's picture

Hi,

There is a new release available. The database creation issue for MS SQL is not fixed.
It was also possible to create several connections to the same meter concurrently.
That is not allowed anymore.

BR,
Mikko

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

polyrem

I have problem with meter ( Iskra MT382 ) to find its IP address ( GPRS ).
I am using Gurux.DLMS.AMI database with MSSQL. After start "dotnet Gurux.DLMS.AMI.dll" it listens on port 1000 for meter.
When meter connect to the internet ( define in Auto Connect ( OBIS 0.0.2.1.0.255 )), it sends its IP to server. This shows at Gurux.DLMS.AMI console:
Client 95.105.137.235:3062 is connected.
Send SNRM request.7E A0 07 03 21 93 0F 01 7E
TX: 07:47:52 7E A0 07 03 21 93 0F 01 7E
but nothing write to database. When I read IP from database ( SQL query: select Value from Gurux.dbo.GXValue where AttributeId = 134 ) it shows me only old IPs.
Gurux.DLMS.AMI write IP to database only after request ( Ip4 Setup Object ( OBIS 0.0.25.1.0.255 )).
It is problem because I cannot find IP after its change. And it happens, beacause of IP is changed after every connect.

Kurumi
Kurumi's picture

Hi,

Please, create a new topic if you have a new question.

The current implementation expects that the meter is added to the database before connection.

We are testing a new version where the meter is automatically added when new connection is made.
We are releasing it during the next week.

BR,
Mikko

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

polyrem

I am sorry, topic is always about "How to use Gurux AMI with Incoming Connections", so I thought, it belong here.

I solved it as follow:
I was starting logging connections in firewall.
If there is new connection on port 1000, I send IP address to host file ( at Windows it is C:\Windows\System32\drivers\etc\host or at linux /etc/hosts ), and change record for host with Logical name of meter.
At Gurux.DLMS.AMI in device's properties is not IP address as host, but same hostname, as in host file. And it works.
Thank you. Brilliant project.

Kurumi
Kurumi's picture

Hi,

Your idea is interesting and it'll work if you are using static IP addresses.
If you are using dynamic IP addresses it doesn't work because IP address might be different for each connection.

For this reason Gurux.DLMS.AMI must-read Logical Device Name to identify the meter when new connection is made.

We are working on this at the moment. It will work at the moment if the device name is the same as meter's logical device name, but there is something to improve.

BR,
Mikko

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

polyrem

No, no. I am talking about dynamic IP.
Gurux.DLMS.AMI find IP from host file, and record for Logical name is rewriting by new IP from incomming connection to port 1000.
Problem is, that meter don't send Logical name, only send IP. Then I must ask IP for Locical name to know which meter it is.
Complicated, but I don't have other solution yet.

Kurumi
Kurumi's picture

Hi,

Your solution is correct. After meter makes the TCP/IP or UDP connection you must identify it asking it's Logical Device Name. It's causing extra traffic, but it's the only way to handle this.

BE,
Mikko

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

chao.zhu

I currently have a GPRS meter that connects to the port the gurux AMI listens on. I want to know, how to use GXDLMSDirector to read the meter information through gurux AMI

Image: