When Reading meter with NO Authentication, It reads some obis, I read Invocation counter from it, then increment t. Then Use Chiper as given in example. But In initialization, it fail to connect and give this error of 260 out of memory.
I am using this for setup:
Client.init(true, 16, 1, DLMS_AUTHENTICATION_NONE, NULL, DLMS_INTERFACE_TYPE_HDLC);
int ret = com_initializeConnection();
if (ret != DLMS_ERROR_CODE_OK)
{
com_close();
delay(1000);
ret = com_initializeConnection();
if (ret != DLMS_ERROR_CODE_OK)
{
printf("com failed:%d\r\n",ret);
return;
}
}
//Close the connection.
Client.ReleaseObjects();
com_close();
Client.init(true, 32, 1, DLMS_AUTHENTICATION_LOW, "lnt1", DLMS_INTERFACE_TYPE_HDLC);
//Un-comment this if you want to set system title, block cipher key or authentication key.
Client.settings.cipher.security=DLMS_SECURITY_AUTHENTICATION_ENCRYPTION;
printf("maxPduSize:%d\r\n",Client.settings.maxPduSize);
printf("maxServerPDUSize:%d\r\n",Client.settings.maxServerPDUSize);
gxByteBuffer bb;
bb_Init(&bb);
bb_addHexString(&bb, "1122334455667788");
Client.SetSystemTitle(&bb);
bb_clear(&bb);
bb_addHexString(&bb, "01 02 03 04 05 06 07 08 09 00 0A 0B 0C 0D 0E 0F");
Client.SetAuthenticationKey(&bb);
bb_clear(&bb);
bb_addHexString(&bb, "01 02 03 04 05 06 07 08 09 00 0A 0B 0C 0D 0E 0F");
Client.SetBlockCipherKey(&bb);
bb_clear(&bb);
int ret = com_initializeConnection();
if (ret != DLMS_ERROR_CODE_OK)
{
com_close();
delay(1000);
ret = com_initializeConnection();
if (ret != DLMS_ERROR_CODE_OK)
{
printf("com failed:%d\r\n",ret);
}
}
I test with GXDLMSDirector it Connect with Meter. So cipher and authentication are correct. But with Arduino, it gives Out of memory 260, error.
Please help me resolve this issue.
GXDLMSDirector works fine, with cipher key and authentication key.
Issue is from arduino code side, not from GXDLMSDirector Side. and I am using IS15959 Part 2 LNT meter.
Authentication keys are same, I think it may be some buffer Size issue, but can't figure out.
Could you list out Error reasons for 260 (out of memory), So it will easy to find root cause for this error.
Hi,
Hi,
Try to make the connection with GXDLMSDirector first. Check your block cipher and authentication keys.
BR,
Mikko
I test with GXDLMSDirector
I test with GXDLMSDirector it Connect with Meter. So cipher and authentication are correct. But with Arduino, it gives Out of memory 260, error.
Please help me resolve this issue.
Hi,
Hi,
Can you send the block cipher key and authentication key by email. I also need GXDLMSDirector log to check what is the problem.
BR,
Mikko
GXDLMSDirector works fine,
GXDLMSDirector works fine, with cipher key and authentication key.
Issue is from arduino code side, not from GXDLMSDirector Side. and I am using IS15959 Part 2 LNT meter.
On which email address should I contact you ?
Thank You
Hi,
Hi,
You can find my email address from here:
https://www.gurux.fi/AboutUs
BR,
Mikko
Keys are confidential, So I
Keys are confidential, So I can't share.
Could you help without them?
Hi,
Hi,
I can't decrypt the data. Check that you are using the same authentication and block cipher keys in GXDLMSDirector and in your app.
BR,
Mikko
Authentication keys are same,
Authentication keys are same, I think it may be some buffer Size issue, but can't figure out.
Could you list out Error reasons for 260 (out of memory), So it will easy to find root cause for this error.
Is my posted code have any problem?
Hi,
Hi,
There are multiple locations where error 260 is returned and it's not easy to find without trace.
BR,
Mikko