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. Unable To Get Response From Arduino Mega On DLMS Director

Unable to get response from Arduino Mega on DLMS director

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 iomkar , 25 May, 2020
Forums
DLMSDirector

Hello ,
I am using Gurux Arduino server code on Arduino Mega. It seems that server code is at default none authentication. When I try to read from arduino server on Gurux DLMSdirector , it does read only association logical name as expected.
Now, I want to use server code at low authentication so that I can read other objects on DLMSdirector. I tried using low authentication as given in GuruxDLMSServerExample, but I am not even getting response of SNRM frame. I have put correct initial settings before connecting.
How to achieve low authentication on server in arduino ? What security objects should be added in existing arduino code to achieve low authentication?

Regards,

Omkar

Profile picture for user Kurumi

Kurumi

6 years ago

Dear Omkar,

Dear Omkar,

We are releasing own library for Arduino at the beginning of June. It's easier to use. Can you want for a week with this?

BR,
Mikko

iomkar

6 years ago

Dear Mikko,

Dear Mikko,
Thank you for prompt reply. We are actually planning to use this on STM32 platform. To get hands on experience of DLMS , we are making prototype on Arduino. So, the upcoming library is only for Arduino or it can be used for other platforms ? If I have to develop server with low authentication on STM32, should I refer Github examples ?

Regards,
Omkar

Profile picture for user Kurumi

Kurumi

6 years ago

Hi Omkar,

Hi Omkar,

That is wrapper for Arduino, but it's using the same code that you are using.
What compiler you are using with STM32?

BR,
Mikko

iomkar

6 years ago

Hi Mikko,

Hi Mikko,
I am using Keil IDE( GCC) for STM32. I was able to import arduino code successfully for STM32. I was able to see all objects added in None association using Gurux DLMS DIrector. I am able to read Active power register but, when I try to read COSEM logical device name and Clock, I get device hardware fault. What can be the reason for this issue? Also, though I have added low authentication association, it does not seem to make any difference. How to achieve low authentication?

Thanks and Regards,
Omkar

Image
Profile picture for user Kurumi

Kurumi

6 years ago

Hi,

Hi,

Are you using malloc or have you uncomment or define DLMS_IGNORE_MALLOC?

Add this to add support for low authentication. You can get more ideas from GuruxDLMSServerExample or GuruxDLMSServerExample2.

///////////////////////////////////////////////////////////////////////
//This method adds example Logical Name Association object for Low authentication.
// MR in Indian standard.
///////////////////////////////////////////////////////////////////////
int addLowAssociation()
{
const unsigned char ln[6] = { 0, 0, 40, 0, 2, 255 };
cosem_init2((gxObject*)& lowAssociation, DLMS_OBJECT_TYPE_ASSOCIATION_LOGICAL_NAME, ln);
bb_addString(&lowAssociation.secret, "Gurux");
lowAssociation.authenticationMechanismName.mechanismId = DLMS_AUTHENTICATION_LOW;
//Use this if you need to save heap.
oa_attach(&lowAssociation.objectList, LOW_OBJECTS, sizeof(LOW_OBJECTS) / sizeof(LOW_OBJECTS[0]));
#ifdef DLMS_IGNORE_OBJECT_POINTERS
memcpy(lowAssociation.securitySetupReference, securitySetup.base.logicalName, 6);
#else
lowAssociation.securitySetup = &securitySetup;
#endif //DLMS_IGNORE_OBJECT_POINTERS

lowAssociation.clientSAP = 0x20;
lowAssociation.serverSAP = 0x1;
//All objects are add for this Association View later.
return 0;
}

BR,
Mikko

iomkar

6 years ago

Hi Mikko,

Hi Mikko,
I am using malloc i.e. I have commented #define DLMS_IGNORE_MALLOC. Will that be an issue in hardware fault?
I will try with low authentication as per your suggestion.

Thanks & Regards,
Omkar

Profile picture for user Kurumi

Kurumi

6 years ago

Hi,

Hi,

It's easier in being f you can use malloc. Add low authentication. You find more examples from here:
https://github.com/Gurux/GuruxDLMS.c/tree/master/GuruxDLMSServerExample

BR,
Mikko

iomkar

6 years ago

Hii Mikko,

Hii Mikko,
I was able to implement Low authentication using DLMSServerExample.
Thank you.

Regards,
Omkar

iomkar

6 years ago

Hii Mikko,

Hii Mikko,
Just to ask another question, is Image Transfer example available for ANSI c in Gurux ?

Thanks & Regards,
Omkar

Profile picture for user Kurumi

Kurumi

6 years ago

Hi,

Hi,

Yes, it's available for the server-side.

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