Skip to main content
Home
for DLMS smart meters
Open source solutions for DLMS smart metering

Main navigation

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

Breadcrumb

  1. Home
  2. Forums
  3. Gurux Simulator: Action

Gurux Simulator: Action

Forum Rules

Before commenting read Forum rules

Don't comment the topic if you have a new question.

You can create a new topic selecting correct category from Gurux Forum and then create a new topic selecting "New Topic" from the top left.

By jjm90 , 29 April, 2020
Forums
General discussion

Hi,

I want execute the action of GXDLMSRegister (reset) but simulator always returns the error "DataAccessResultReadWriteDenied"

This is the code:

var testAction = new GXDLMSRegister("1.0.1.7.0.255");
testAction.SetAccess(2, AccessMode.ReadWrite);
testAction.SetMethodAccess(0, MethodAccessMode.Access);
testAction.SetMethodAccess(1, MethodAccessMode.Access); // I suppose only this one is necessary
testAction.SetMethodAccess(2, MethodAccessMode.Access);
currentServer.Items.Add(testAction);

Why is not working? Could you provide me an example?

Thanks in advance.

Profile picture for user Kurumi

Kurumi

6 years 1 month ago

Hi,

Hi,

Because access levels might depend on several options, ex. authentication level Access and MethodAccess are handled in server side. You need to make business logic to GetAttributeAccess and GetMethodAccess methods.

Your server is implementing those, but I believe that you are returning no access.

BR,

Mikko

jjm90

6 years 1 month ago

Hi,

Hi,

We use the Gurux Server (GXDLMSServer), HandleRequest function.

This is the server configuration:

var testAction = new GXDLMSRegister("1.0.1.7.0.255");
testAction.SetAccess(2, AccessMode.ReadWrite);
testAction.SetMethodAccess(0, MethodAccessMode.Access);
testAction.SetMethodAccess(1, MethodAccessMode.Access); // I suppose only this one is necessary
testAction.SetMethodAccess(2, MethodAccessMode.Access);
currentServer.Items.Add(testAction);

This is the log trace:

2020-04-29 15:08:03 DBG [SIM] Client Connected at: 127.0.0.1:59123 to Server on: 4063
2020-04-29 15:08:03 DBG [SIM] From:127.0.0.1:59123 -> To:4063 => 00 01 00 01 00 01 00 40 60 3E 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 12 80 10 AE 8E C3 31 D0 FB F3 B8 F1 74 FE A2 C1 9A 26 41 BE 10 04 0E 01 00 00 00 06 5F 1F 04 00 00 18 1F 23 28
2020-04-29 15:08:03 INF Sending...
2020-04-29 15:08:03 DBG [SIM] Sent From:4063 -> To:127.0.0.1:59123 => 00 01 00 01 00 01 00 2B 61 29 A1 09 06 07 60 85 74 05 08 01 01 A2 03 02 01 00 A3 05 A1 03 02 01 00 BE 10 04 0E 08 00 06 5F 1F 04 00 00 18 1D 23 28 00 07
2020-04-29 15:08:03 DBG [SIM] From:127.0.0.1:59123 -> To:4063 => 00 01 00 01 00 01 00 0F C3 01 41 00 03 01 00 01 07 00 FF 01 01 0F 00
2020-04-29 15:08:03 INF Sending...
2020-04-29 15:08:03 DBG [SIM] Sent From:4063 -> To:127.0.0.1:59123 => 00 01 00 01 00 01 00 04 C7 01 41 03
2020-04-29 15:08:03 DBG [SIM] From:127.0.0.1:59123 -> To:4063 => 00 01 00 01 00 01 00 05 62 03 80 01 00
2020-04-29 15:08:03 INF Sending...
2020-04-29 15:08:04 DBG [SIM] Sent From:4063 -> To:127.0.0.1:59123 => 00 01 00 01 00 01 00 05 63 03 80 01 00
2020-04-29 15:08:05 DBG [SIM] Client at: Disconnected from: 4063

Why is not working? Could you provide me an example?

Thanks.

Profile picture for user Kurumi

Kurumi

6 years 1 month ago

Hi,

Hi,

Open your Gurux server and find GetMethodAccess method. Add your logic there.
You can simply return MethodAccessMode.Access there.

BR,

Mikko

  • Create new account
  • Reset your password

Hire Us!

Latest Releases

  • Tue, 06/09/2026 - 11:16
    gurux.dlms.java 4.0.95
  • Tue, 06/09/2026 - 10:03
    Gurux.DLMS.Python 1.0.199
  • Mon, 06/08/2026 - 13:39
    gurux.dlms.cpp 9.0.2606.0801
  • Mon, 06/01/2026 - 10:15
    gurux.dlms.cpp 9.0.2606.0101
  • Thu, 05/28/2026 - 16:06
    gurux.dlms.java 4.0.94

New forum topics

  • Error reading L&G Meter
  • Pass a TCP Client to GXNet
  • Australian EDMI Mk10D (Essential Energy area)
  • Strange mix of data notificiation vs get response
  • DLMS Connection
More

Who's new

  • Tuanhgg
  • Adel
  • charnon
  • Paddles
  • Miguel Ángel
RSS feed
Privacy FAQ GXDN Issues Contact
Follow Gurux on Twitter Follow Gurux on Linkedin