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?
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 ?
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?
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.
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
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
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
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
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
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
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
Hii Mikko,
Hii Mikko,
I was able to implement Low authentication using DLMSServerExample.
Thank you.
Regards,
Omkar
Hii Mikko,
Hii Mikko,
Just to ask another question, is Image Transfer example available for ANSI c in Gurux ?
Thanks & Regards,
Omkar
Hi,
Hi,
Yes, it's available for the server-side.
BR,
Mikko