HPL smart meter to communicate through DLMS

15 posts / 0 new
Last post
manojit
HPL smart meter to communicate through DLMS

Hi,

I have received a HPL smart meter to communicate through DLMS. I am trying with following code

GXNet cl = new GXNet();
cl.HostName = "XX.XXX.XX.XX"; // I am using IP of the meter
cl.Port = 8000;
cl.Protocol = NetworkType.Tcp;
cl.Open();

However the Open() method throwing me following exception.

A request to send or receive data was disallowed because the socket is not connected and (when sending on a datagram socket using a sendto call) no address was supplied"

Can anybody help me on this?

Regards,
Manojit

Kurumi
Kurumi's picture

Hi,

Your IP or port is wrong.

BR,

Mikko

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

manojit

Hi Mikko,

I have a public IP and Port. I have configured my Meter's Modem to use this IP and Port. I am getting the above error after that only. Do I need anything else?

Please suggest.
Regards,
Manojit

Kurumi
Kurumi's picture

Hi,

One question. Is your meter starting connection or do you try to read your meter?
BR,

Mikko

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

manojit

Basically I am trying to read meter in this case.

Regards,
Manojit

Kurumi
Kurumi's picture

Hi,
You are using modem in GPRS mode. Do you have static IP?

BR,

Mikko

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

manojit

Yes, My PC have a static Public IP. Modem is also configured to use these IP details.

Regards,
Manojit

Kurumi
Kurumi's picture

Hi,

Usually problem is that client can't access private network from given IP address or port number is wrong.

Do this.

1. Move SIM card to the phone and check that is't working. You can test this checking if you can access web page.
2. Verify IP and port.
3. Verify that you can access APN from your ipaddress.

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

manojit

Hi,
I will try that. However If I execute the GuruX server application it is displaying a client connecting successfully. It is giving me a idea that the Meter is connecting to my IP. Anyway I will check SIM also.

manojit

I have tried the SIM as you suggested. That is working perfectly. What else I can verify? Am I doing correct by using the Public IP and Port in client code which I have configured in modem?

Kurumi
Kurumi's picture

Hi,

Your PC has own IP and meter has own IP. It seems that you try to connect to your PC. You need to ask what is SIM's IP address and connect to that.

BR,

Mikko

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

manojit

As I understand the SIM uses dynamic IPs and port as assigned by the Service Provider. Not sure how can I get that from my application. I was in a impression that my meter will connect to the DLMS Server running on my PC and I will connect to that server using my client application to read the meter.

Please suggest if I am thinking on wrong direction.
Regards,
Manojit

Kurumi
Kurumi's picture

Hi,

If you want to use client app your SIM card needs static IP. Without that you can't access your meter.
You must ask static IP address from your mobile phone operator.

If your meter can make connection and <b>operate as a client<b> then you need to start GXDLMSServer example. Then your meter can make connection and you must modify example so it can ask data from the meter.

BR,

Mikko

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

manojit

Thanks, now I understand the scenario. Can you please suggest where can I get some C# example to modify the server to ask data from meter?

Regards,
Manojit

Kurumi
Kurumi's picture

Hi,

First you should check from the manufacturer can you ask anything from the meter or is meter sending only Push Message. Send data what meter sends to me by email. I can try to check it.

BR,

Mikko

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