Hi, i want to ask regarding DLMS server.
i have successfully compile and run DLMS server example. i want to customize the connection parameters on Low authentication, such as client address, server address, logical address, password.
tell me please, how can i do that? inside GXDLMSBase.cpp, which part of the code deal with that? or is it in another source code? i tried finding 0x11 (default client address used to connect to the server) but no luck
Thank you
jack
Hi, You can change the…
Hi,
You can change the authentication level and client address in GXDLMSAssociationLogicalName.
The server address is checked in IsTarget. To simplify the example, it returns true to all connections.
https://www.gurux.fi/Gurux.DLMS.Server
BR,
Mikko
Thank you for the quick…
Thank you for the quick response.
in GXDLMSAssociationLogicalName, i find this block (starting from line 272 to 280)
CGXDLMSAssociationLogicalName::CGXDLMSAssociationLogicalName(std::string ln) :
CGXDLMSObject(DLMS_OBJECT_TYPE_ASSOCIATION_LOGICAL_NAME, ln, 0)
{
m_AssociationStatus = DLMS_ASSOCIATION_STATUS_NON_ASSOCIATED;
m_Secret.AddString("Gurux");
m_Version = 2;
m_ClientSAP = 0;
m_ServerSAP = 0;
}
1. is that the right place?
2. i've tried changed the password, recompiled the lib, but the change is not applied. I changed the password to "Gurux000", m_ClientSAP to 1, m_ServerSAP to 1, it wont connect. however, it still connects with old parameters. where else should i look for the right place containing the parameter?
Regards
jack
Hi Mikko, it works now…
Hi Mikko, it works now. seems like the problem is the new library didn't get overwritten, so instead of using newly compiled lib file i used the old lib file.
How about changing the system title? i plan on using High authentication, particularly HighGMAC mode. i only find relevant line regarding system title in CGXDLMSAssociationLogicalName::Invoke method
Regards
Jack
Hi, Don't make changes to…
Hi,
Don't make changes to main library. Make all changes in GXDLMSServerLN.h file like this:
//Constructor.
CGXDLMSServerLN(CGXDLMSAssociationLogicalName* ln,
CGXDLMSIecHdlcSetup* hdlc) : CGXDLMSBase(ln, hdlc)
{
ln->SetClientSAP(10);
ln->SetServerSAP(1);
}
This is a simple example and implements only one association view.
The system title is changed to security setup object.
BR,
Mikko
Let me clarify, so i need to…
Let me clarify, so i need to stay away from the main lib, instead make any change inside the header file provided inside the server example include folder.
1. is it possible to instead make change in the GXDLMSBase file?
2. the above example implements only one association view. so i should prepare multiple client and server address for each authentication method, is that correct?
3. what about the LNs that is associated with an association, should i create each of the LN for each association, or one LNs can be reused?
Thank you for the directions.
Regards
jack
Hi, Yes, you can also make…
Hi,
Yes, you can also make changes to GXDLMSBase. Don't make any changes to the development folder where the main library is.
You can create multiple association views as you described.
This example uses only one association to make it easier, but it's recommended to create multiple associations and choose the used association in IsTarget method.
Usually the meters is made with ANSI C, so check this example.
https://github.com/Gurux/GuruxDLMS.c/blob/cf36e3a16fb1de260d4c025c1aa0a…
It does what you want to do.
BR,
Mikko
Hi, thank you for the…
Hi, thank you for the reference. i will check and try the ANSI C reference, and report my result.
Regards
jack