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"
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?
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.
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.
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?
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
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.
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.
HPL smart meter to communicate through DLMS
Hi,
Your IP or port is wrong.
BR,
Mikko
Hi Mikko,
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
HPL smart meter to communicate through DLMS Primary tabs
Hi,
One question. Is your meter starting connection or do you try to read your meter?
BR,
Mikko
Basically I am trying to read
Basically I am trying to read meter in this case.
Regards,
Manojit
HPL smart meter to communicate through DLMS Primary tabs
Hi,
You are using modem in GPRS mode. Do you have static IP?
BR,
Mikko
Yes, My PC have a static
Yes, My PC have a static Public IP. Modem is also configured to use these IP details.
Regards,
Manojit
HPL smart meter to communicate through DLMS
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.
Hi,
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.
Hi,
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?
HPL smart meter to communicate through DLMS
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
As I understand the SIM uses
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
HPL smart meter to communicate through DLMS
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
Hi Mikko,
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
HPL smart meter to communicate through DLMS
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