I'm writing because I can't get a connection with my meter using Address Type: SerialNumber method.
As it's my first post in this forum, I'd like to thank Kurumi for sharing Gurux solution, which is extremely helpful in developing a smart-metering application.
When I use Address Type: Default and set it to "1", then I'm able to open the connection and read data from the meter. The issue is that I can't make a connection using Address Type: SerialNumber. It's crucial functionality to me as I will have two smart meters connected to a single access point, thus hostnames and ports are same for both.
This is a piece of log from DLMS Director:
09:44:40 Data send failed. Try to resend 1/3
09:44:45 Data send failed. Try to resend 2/3
09:44:50 Failed to receive reply from the device in given time.
System.TimeoutException: Failed to receive reply from the device in given time.
w GXDLMSDirector.GXDLMSDevice.InitializeConnection()
w GXDLMSDirector.MainForm.Connect(Object sender, GXAsyncWork work, Object[] parameters)
I get the same result when I try to connect by DLMS Example for Java (using SerialNumber of course).
I'm pretty sure that I use correct serial number, as I provide the value which I've retrieved from "Ch. 0 Device ID 1, manufacturing number" data object, when I connected using default address type. The meter is Landys+Gyr E570. Do I have to change anything in my meter settings in order to be able to use serial number instead of default address type?
There is only one device under 0.0.41.0.0.255 - the one that I'm trying to connect to, with logical name containing the serial number. Currently there is only one device connected to the access point under particular hostname, there will be two in the future. I'd like to develop the application so it will be ready in future to cope with both devices available at the same hostname.
Maybe the way that Gurux director converts the serial number into server address is incorrect for this particular meter?
If I remember right L+G is using DLMS standard way to count server address from the serial number.
I can't access our E550 from here, but can you try to change server address #1 to meter serial number and use same communication. Let me know if the meter doesn't reply.
I'm not sure if that's what you meant, but I've left the address type at "default" and changed the "logical device" in gurux director from "1" to my serial number. When I tried to connect, I've got "Invalid logical or physical address." notification.
I did the same in my java app, which resulted with "java.lang.RuntimeException: Failed to receive reply from the device in given time.", meaning that server address is incorrect. I also tried setting the server address in my application using getServerAddress from GXDLMSClient, but it did not work either:
meterClient.setServerAddress(GXDLMSClient.getServerAddress(Integer.parseInt("#mySerialNumberHere")));
When I use Serial connection to another L+G meter, I can successfully connect using address type: serial number via Gurux director. However, I can submit any serial number there (even random digits) and it still manages to make a connection, meaning that it doesn't use this variable at all.
I was told that Landys+Gyr's way to resolve server address from serial number is leaving last four digits of serial number and adding '1000' to it. Which in my case provides a different value than the one returned by getServerAddress from GXDLMSClient. But it does not work either :D
Correct Mikko, that's what I did at the very beginning:
1. Established successful connection using Address Type: Default and logical device: 1.
2. Disconnected.
3. Changed address type from "Default" to "SerialNumber".
4. "Logical device" label changes automatically to "Serial number".
5. Input my serial number into "Serial Number" field.
Then I get "System.TimeoutException: Failed to receive reply from the device in given time." in gurux director logs.
Hi,
Hi,
If you connect to the first meter and read SAP assignment can you see another meter there?
OBIS code is 0.0.41.0.0.255.
BR,
Mikko
Hi Mikko,
Hi Mikko,
There is only one device under 0.0.41.0.0.255 - the one that I'm trying to connect to, with logical name containing the serial number. Currently there is only one device connected to the access point under particular hostname, there will be two in the future. I'd like to develop the application so it will be ready in future to cope with both devices available at the same hostname.
Maybe the way that Gurux director converts the serial number into server address is incorrect for this particular meter?
Best wishes,
Pietari
Hi,
Hi,
If I remember right L+G is using DLMS standard way to count server address from the serial number.
I can't access our E550 from here, but can you try to change server address #1 to meter serial number and use same communication. Let me know if the meter doesn't reply.
Are you using GPRS connection or RS-485?
BR,
Mikko
I'm using GPRS connection.
I'm using GPRS connection.
I'm not sure if that's what you meant, but I've left the address type at "default" and changed the "logical device" in gurux director from "1" to my serial number. When I tried to connect, I've got "Invalid logical or physical address." notification.
I did the same in my java app, which resulted with "java.lang.RuntimeException: Failed to receive reply from the device in given time.", meaning that server address is incorrect. I also tried setting the server address in my application using getServerAddress from GXDLMSClient, but it did not work either:
meterClient.setServerAddress(GXDLMSClient.getServerAddress(Integer.parseInt("#mySerialNumberHere")));
When I use Serial connection to another L+G meter, I can successfully connect using address type: serial number via Gurux director. However, I can submit any serial number there (even random digits) and it still manages to make a connection, meaning that it doesn't use this variable at all.
I was told that Landys+Gyr's way to resolve server address from serial number is leaving last four digits of serial number and adding '1000' to it. Which in my case provides a different value than the one returned by getServerAddress from GXDLMSClient. But it does not work either :D
Best wishes,
Pietari
Hi,
Hi,
Change Address type from "Default" to "SerialNumber". Then set the serial number.
See pic below.
BR,
Mikko
Correct Mikko, that's what I
Correct Mikko, that's what I did at the very beginning:
1. Established successful connection using Address Type: Default and logical device: 1.
2. Disconnected.
3. Changed address type from "Default" to "SerialNumber".
4. "Logical device" label changes automatically to "Serial number".
5. Input my serial number into "Serial Number" field.
Then I get "System.TimeoutException: Failed to receive reply from the device in given time." in gurux director logs.
The only idea I have is that
The only idea I have is that for counting server address from serial number L+G E570 uses a formula different to "SN % 10000 + 1000"...
Hi,
Hi,
Try to increase "Logical Server" from zero to one.
If that fails, send an email to me where is the meter serial number and first generated message.
I'll check that first.
BR,
Mikko
Hi Kurumi,
Hi Kurumi,
That's what I get when trying to connect using Serial Number:
TX: 08:50:38.718 00 01 00 01 15 45 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 41 42 34 38 34 30 43 44 BE 10 04 0E 01 00 00 00 06 5F 1F 04 00 00 1E 1D FF FF
I use wrapper, low authentication, client address 1. I'm sure I use correct number as a server address (manufacturing number % 10000 + 1000).
Am I doing anything wrong?
Best wishes,
Pietari