Skip to main content
Home
for DLMS smart meters

Main navigation

  • Home
  • Products
  • About us
  • Open Source
  • Community
  • Forum
  • Downloads
User account menu
  • Log in

Breadcrumb

  1. Home
  2. Metcom- Connect Meters In Daisy Chain Over RS485

Metcom- Connect meters in daisy chain over RS485

By PRAKASH KUMAR, 13 December, 2024
Forums
Gurux DLMS for Java

Hi,
Thanks for all your support till now!
Now, I am prototyping the Metcom meter connectivity. We have Building Management System which exposes an IP and port which is connected to the series of Metcom meters in daisy chain using RS485.
I am using GURUX java client example (somewhat modified for us) to connect to this Metcom meter. Adding the sample code.

****************************************
GXDLMSSecureClient2 dlmsClient = null;
GXDLMSReader reader = null;

String meterType = "Metcom";
String ipAddress = "100.100.100.100"; // -h dummy IP
String portNumber = "61001"; // -p
String clientAddress = "1"; // -c
String serverAddress = "10181272"; // -s
String authenticationLevel = "LOW"; // -a
String password = "XXXXXXXX"; // -P
// Boolean shortName = true; // -r
Boolean useLogicalName = true; // -r - Metcom uses Logical name but LG uses short name
InterfaceType communicationInterfaceType = InterfaceType.WRAPPER; // -i Metcom uses WRAPPER but LG uses HDLC

// Create connection
GXNet connectionMedia = new GXNet();
connectionMedia.setHostName(ipAddress);
connectionMedia.setPort(Integer.parseInt(portNumber));

// Create Client
dlmsClient = new GXDLMSSecureClient2(true);
dlmsClient.setUseLogicalNameReferencing(useLogicalName);
dlmsClient.setInterfaceType(communicationInterfaceType);
dlmsClient.setAuthentication(Authentication.valueOfString(authenticationLevel));
dlmsClient.setClientAddress(Integer.parseInt(clientAddress));
dlmsClient.setServerAddress(Integer.parseInt(serverAddress));
if ( dlmsClient.getServerAddress() != 1 ) {
dlmsClient.setServerAddress(GXDLMSClient.getServerAddress(Integer.parseInt(serverAddress))); // setting 2272
}
dlmsClient.setPassword(password);

// Initialize reader
reader = new GXDLMSReader(dlmsClient, connectionMedia, TraceLevel.INFO, null);
// Open connection
connectionMedia.open();
reader.initializeConnection();
// Read association view
reader.getAssociationView();
***************************************************************

I couldn't connect to the meter and getting Invalid connection error Adding the trace file.

Exception in thread "main" java.lang.RuntimeException: Invalid connection.
at com.bt.ggdcenergy.metering.dlms.net.GXNet.send(GXNet.java:414)
at com.bt.ggdcenergy.metering.dlms.test.GXDLMSReader.readDLMSPacket(GXDLMSReader.java:264)
at com.bt.ggdcenergy.metering.dlms.test.GXDLMSReader.readDataBlock(GXDLMSReader.java:352)
at com.bt.ggdcenergy.metering.dlms.test.GXDLMSReader.readDataBlock(GXDLMSReader.java:337)
at com.bt.ggdcenergy.metering.dlms.test.GXDLMSReader.initializeConnection(GXDLMSReader.java:595)

TX: 08:40:28.703 00 01 00 01 08 E0 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 46 45 44 43 30 30 30 33 BE 10 04 0E 01 00 00 00 06 5F 1F 04 00 42 1E 5D FF FF
TX: 08:41:28.712 00 01 00 01 08 E0 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 46 45 44 43 30 30 30 33 BE 10 04 0E 01 00 00 00 06 5F 1F 04 00 42 1E 5D FF FF

Could you please help me out to put the proper configuration and connect the meter.

Profile picture for user Kurumi

Kurumi

12 months ago

Hi, If you are using RS-485…

Hi,

If you are using RS-485 you must use HDLC and not WRAPPER framing. It's easier if you connect with GXDLMSDirector and configure the correct settings.

BR,
Mikko

  • Create new account
  • Reset your password

Hire Us!

Latest Releases

  • Thu, 12/11/2025 - 13:22
    Gurux.DLMS.Python 1.0.194
  • Thu, 12/11/2025 - 11:01
    gurux.dlms.java 4.0.86
  • Wed, 12/10/2025 - 08:45
    gurux.dlms.java 4.0.85
  • Tue, 12/02/2025 - 10:21
    gurux.dlms.c 9.0.2512.0201
  • Mon, 12/01/2025 - 13:55
    Gurux.DLMS.Python 1.0.193

New forum topics

  • Gurux.Net
  • GXTIME Conversion Issue
  • DLMS Meter Gurux DLMS Director Properties
  • Using MAX3232 + FT232RL to Energy meter with GXDLMS Director
  • Incomplete Firmware Upgrade Process
More
RSS feed
Privacy FAQ GXDN Issues Contact
Follow Gurux on Twitter Follow Gurux on Linkedin