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. DLMS Simulator

DLMS Simulator

By alnardn, 23 September, 2024
Forums
Gurux DLMS for Java

Hello! I am currently using java simulator example. There is method handleRequest(GXServerReply). Is it possible to change this method for my needs?

Profile picture for user Kurumi

Kurumi

1 year 1 month ago

Hello, What kind of feature…

Hello,

What kind of feature do you propose?

BR,
Mikko

alnardn

1 year 1 month ago

Hello! Simulator is needed…

Hello!
Simulator is needed for me to communicate with zigbee module. Module is connected to computer by com port. I am starting server in same com port where zigbee module is connected. Module sends messages to server but it doesn't process these messages. Method handleRequest returns null. Is it possible to communicate with module by changing something in code or not?

Profile picture for user Kurumi

Kurumi

1 year 1 month ago

Hi, You don't need to change…

Hi,

You don't need to change anything if you are using Zigbee. The communication channel doesn't affect it. Just start the simulator using the serial port where the ZigBee module is connected.

You client and simulator must use the same settings and I believe they are not using the same settings. The meter is not answering because of that.

BR,
Mikko

alnardn

1 year 1 month ago

Hello! Now I am trying to…

Hello!
Now I am trying to start server with such parameters: -S myCom -x simulator_template.xml -c 32 -a Low. Anyway server writes "Invalid client address 32" after receiving message from my zigbee module. Is there a mistake in parameters maybe? Or should I add something else in parameters?

alnardn

1 year 1 month ago

Hello! I am still very need…

Hello! I am still very need in your help in this problem: Now I am trying to start server with such parameters: -S myCom -x simulator_template.xml -c 32 -a Low. Anyway server writes "Invalid client address 32" after receiving message from my zigbee module. Is there a mistake in parameters maybe? Or should I add something else in parameters?

Profile picture for user Kurumi

Kurumi

1 year 1 month ago

Hi, What client address the…

Hi,

What client address the client use? I believe it's using different client address than the simulator. The simulator uses client address 32 and the connecting client must use the same address.

BR,
Mikko

alnardn

1 year 1 month ago

I thought this log "Invalid…

I thought this log "Invalid client address: 32" means that client connected to simulator with client address 32 and it causes error. Now I am starting simulator with client address 32 but this log "Invalid client address: 32" appears again. I do not understand where there is a mistake.

Profile picture for user Kurumi

Kurumi

1 year 1 month ago

Hi, There are multiple ways…

Hi,

There are multiple ways to establish the connection with DLMS. I believe that one of the settings is different in the client and the simulator and that is causing that the connection fails.

BR,
Mikko

alnardn

1 year 1 month ago

I still do not understand…

I still do not understand what means "Invalid client address:32"?

Profile picture for user Kurumi

Kurumi

1 year 1 month ago

Hi, When you have created…

Hi,

When you have created the simulator_template.xml what client address did you use? I believe it was not 32. Now the client try to connect, but the client address 32 is not found from saved associations.

Open simulator_template.xml and find ClientSAP. It's something like this:

<ClientSAP>CLIENT_ADDRESS</ClientSAP>

Then change client address to 32 and try to connect again.

<ClientSAP>32</ClientSAP>

BR,
Mikko

alnardn

1 year 1 month ago

Hello! So I need to change…

Hello!

So I need to change ClientSAP in simulator_template.xml and then start simulator with such parameters: "-c", "32", "-S", "myCom", "-x", "simulator_template.xml". Do I understand correctly?

Profile picture for user Kurumi

Kurumi

1 year 1 month ago

Hi, Yes, I can't say what…

Hi,

Yes, I can't say what settings you should use, because I don't have your simulator device template. The best option is read your meter using client address 32 and save that template and then use it with simulator.

BR,
Mikko

alnardn

1 year 1 month ago

Hello! I've read meter with…

Hello!

I've read meter with client address 32 and save template. Then I try to send messages throught zigbee module to simlulator but they don't reach simulator. There is no log like "RX:...". What problem can cause it ?

Profile picture for user Kurumi

Kurumi

1 year ago

Hi, Is the simulator…

Hi,

Is the simulator listening the correct serial port?
Comment this line from the GXDLMSMeter.java so all the received bytes are shown. Now received data is shown only after the connection is established.

if (Trace == TraceLevel.VERBOSE && this.getConnectionState() != ConnectionState.NONE)

BR,
Mikko

alnardn

1 year ago

Hello! I commented this line…

Hello!

I commented this line. Now logs with RX appeared but anyway simulator doesn't answer on these messages from my module. What can I do to change this?

Profile picture for user Kurumi

Kurumi

1 year ago

Hi, One of your meter…

Hi,

One of your meter settings is different from that the client sends and the meter ignores the message.

Check client address that the client is using. It should be 0x20 (32).

BR,
Mikko

  • Create new account
  • Reset your password

Hire Us!

Latest Releases

  • Wed, 10/29/2025 - 08:51
    gurux.dlms.c 9.0.2510.2901
  • Thu, 10/16/2025 - 09:59
    gurux.dlms.java 4.0.83
  • Wed, 10/08/2025 - 10:21
    gurux.dlms.c 9.0.2510.0801
  • Fri, 09/26/2025 - 10:02
    gurux.dlms.cpp 9.0.2509.2601
  • Fri, 09/26/2025 - 09:45
    gurux.dlms.c 9.0.2509.2601

New forum topics

  • How to get/convert user readable format data from readRowsByRange
  • Insufficient memory to continue the execution of the program.
  • The client instance code failed to connect to the electricity meter for authentication
  • Unable to Release Request when closing connection with meter.
  • Failed to receive reply from the device in given time.
More
RSS feed
Privacy FAQ GXDN Issues Contact
Follow Gurux on Twitter Follow Gurux on Linkedin