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. GuruX Java Simulator For Landis+Gyr Meters

GuruX Java Simulator for Landis+Gyr meters

By PiotrA, 1 April, 2025
Forums
Gurux DLMS for Java

Hi,

I try to use gurux java simulator to create some Landis+Gyr meters with almost the same specification as real meters using: https://github.com/Gurux/gurux.dlms.java/tree/master/gurux.dlms.simulat…

I would like to test if simulated meters are served correctly and if I can actually obtain data (registries, clock, readings etc.) in GXDLMSDirector. I will need it for integration and unit tests of my application.

I encountered 2 problems:

1. I cannot create meters with 'short name referencing', even if I see in console 'DLMS HDLC Short Name simulator start in ports 1000-1009.'
Simulator run parameters: -p 1000 -x mytestdevice.xml -t Info -N 10 -r sn
GXDLMSDirector command line parameters: -h 127.0.0.1 -p 1000 -r sn -n 55980097 -w 1 -f 128 -t Verbose
In GXDLMSDirector I see error: "Connection is permanently rejected. The application context name is not supported. Meter expects Logical Name referencing"

2. Negotiated conformance is only 'GET'. I would like to have also Read, Write, MultipleReferences, basically as much as I can, is it even possible?
Is it related to authentication level? Because it looks like I cannot make any other authentication than 'NONE' using GXDLMSDirector.

Any help will be really appreciated.

Best Regards,
Piotr

Profile picture for user Kurumi

Kurumi

9 months 2 weeks ago

Hi, You need to read real…

Hi,

You need to read real Landis+Gyr meters that use short name referencing. You can't use short name referencing if your meter is using logical name referencing.

BR,
Mikko

PiotrA

9 months 2 weeks ago

Thank you for the response,…

Thank you for the response,

So i have some real Landis+Gyr meters and I connect to those using short name referencing. In GXDLMSDirector I connect to this meter, right click on it and 'Read Object', then I 'Save values as' a MyMeter.xml file. Then i put this file simulator as a parameter together with '-r sn' so i expect short name referencing communication.
When I try to connect to simulated meter using GXDLMSDirector (or trying to call it in java code, doesn't matter) I see 'Meter expects Logical Name referencing'.

Below is what I got from the meter for GXDLMSAssociationShortName and GXDLMSAssociationLogicalName, I have no idea what am I missing here...

<GXDLMSAssociationShortName>
<SN>64000</SN>
<LN>0.0.40.0.0.255</LN>
<Description>Ch. 0 Current association</Description>
<Access>13</Access>
<MethodAccess>11111111</MethodAccess>
<Secret/>
<SecuritySetupReference/>
</GXDLMSAssociationShortName>
<GXDLMSAssociationLogicalName>
<LN>0.0.40.0.1.255</LN>
<Version>1</Version>
<Description>Ch. 1 Association</Description>
<Access>111111010</Access>
<MethodAccess>0000</MethodAccess>
<ClientSAP>16</ClientSAP>
<ServerSAP>1097</ServerSAP>
<ApplicationContextName>
<JointIsoCtt>96</JointIsoCtt>
<Country>133</Country>
<CountryName>116</CountryName>
<IdentifiedOrganization>5</IdentifiedOrganization>
<DlmsUA>3</DlmsUA>
<ApplicationContext>1</ApplicationContext>
<ContextId>1</ContextId>
</ApplicationContextName>
<XDLMSContextInfo>
<Conformance>524288</Conformance>
<MaxReceivePduSize>832</MaxReceivePduSize>
<MaxSendPduSize>65535</MaxSendPduSize>
<DlmsVersionNumber>6</DlmsVersionNumber>
<QualityOfService>0</QualityOfService>
<CypheringInfo/>
</XDLMSContextInfo>
<AuthenticationMechanismName>
<JointIsoCtt>96</JointIsoCtt>
<Country>133</Country>
<CountryName>116</CountryName>
<IdentifiedOrganization>5</IdentifiedOrganization>
<DlmsUA>8</DlmsUA>
<AuthenticationMechanismName>2</AuthenticationMechanismName>
<MechanismId>0</MechanismId>
</AuthenticationMechanismName>
<Secret>some_secret_password</Secret>
<AssociationStatus>2</AssociationStatus>
<SecuritySetupReference>0.0.0.0.0.0</SecuritySetupReference>
</GXDLMSAssociationLogicalName>

Please let me know if I can provide more details to help you understand the issue.

Best regards,

Piotr Almaszy

Profile picture for user Kurumi

Kurumi

9 months 2 weeks ago

Hi, You need to read your…

Hi,

You need to read your meter with the simulator and not GXDLMSDirector.

-c 16 -s 1 -h [Meter IP Address] -p [Meter Port No] -r sn -o meter-template.xml

BR,
Mikko

PiotrA

9 months 2 weeks ago

Hi, Case 1: When I run…

Hi,

Case 1: When I run Simulator locally with run parameters: -p 1000 -x testdevice.xml -t Info -N 10

I am able to read meter with parameters: -c 16 -s 1 -h 127.0.0.1 -p 1000 -o testdevice2new.xml (so using logical name referencing)

It is ok.

Case 2: When I run Simulator with parameters: -p 1000 -x testdevice.xml -t Info -N 10 -r sn

Trying to read meter with parameters: -c 16 -s 1 -h 127.0.0.1 -p 1000 -o testdevice2new.xml -r sn (so using shortname referencing)

I see that Logical Name referencing is required anyway...
'The application context name is not supported. Meter expects Logical Name referencing.'

Log from the console:

Authentication: None
ClientAddress: 0x10
ServerAddress: 0x1
Standard: DLMS
DisconnectRequest
Connection is permanently rejected
The application context name is not supported. Meter expects Logical Name referencing.
gurux.dlms.GXDLMSException: Connection is permanently rejected
The application context name is not supported. Meter expects Logical Name referencing.
at gurux.dlms.GXAPDU.parsePDU2(GXAPDU.java:909)
at gurux.dlms.GXAPDU.parsePDU(GXAPDU.java:838)
at gurux.dlms.GXDLMSClient.parseAareResponse(GXDLMSClient.java:959)
at com.kmd.hesmeterdatareader.dlms.simulator.GXDLMSReader.initializeConnection(GXDLMSReader.java:547)
at com.kmd.hesmeterdatareader.dlms.simulator.GXDLMSReader.readAll(GXDLMSReader.java:938)
at com.kmd.hesmeterdatareader.dlms.simulator.Simulator.readSimulatedValues(Simulator.java:129)
at com.kmd.hesmeterdatareader.dlms.simulator.Simulator.main(Simulator.java:266)

Can it potentially be a bug? Can it be a problem with my testdevice.xml configuration? (It would be weird because this is real meter to which I am able to connect in real world using short name referencing)

Best regards,

Piotr Almaszy

PiotrA

9 months 1 week ago

Hi, I just want to bump my…

Hi,

I just want to bump my question from previous post just in case you missed it and I have another one.

Another question: Is it possible to have no security and have negotiated conformance with more methods than only "GET"?
I need at least "Read", "Write" and "MultipleReferences" is it doable with the simulator on any security level? I Cannot see any configuration in the code for meter conformance.

I will be grateful for any kind of help here.

Best Regards,
Piotr

  • Create new account
  • Reset your password

Hire Us!

Latest Releases

  • Mon, 12/29/2025 - 10:38
    Gurux.Serial.Android 3.0.5
  • Mon, 12/15/2025 - 08:11
    Gurux.DLMS.Net 4.0.87
  • Fri, 12/12/2025 - 08:38
    Gurux.DLMS.Python 1.0.195
  • Thu, 12/11/2025 - 13:22
    Gurux.DLMS.Python 1.0.194
  • Thu, 12/11/2025 - 11:01
    gurux.dlms.java 4.0.88

New forum topics

  • Gurux DLMS Android App
  • AMR support for bidirectional meters.
  • addition of new object in object list, meter not working
  • old meter take to much time(l&t)
  • Unable to connect L&T ER300P Meter
More
RSS feed
Privacy FAQ GXDN Issues Contact
Follow Gurux on Twitter Follow Gurux on Linkedin