Hi,
I am trying to establish a session using the "Management Client" through a custom PLC communication. Before that, I achieved the session through optical port. I had to fix some bugs, but I achieved establishing the "management client" session using GMAC with AUTHENTICATION AND ENCRYPTION and DLMS_INTERFACE_TYPE_HDLC_WITH_MODE_E interface.
Now I am doing the same but using the interface DLMS_INTERFACE_TYPE_PDU and with a hook that sends and receive the PDU from my PLC board through serial.
"Public client" works perfectly. But after updating the invocation counter I send the "management client" AARQ with the same security params used through optical port, the meter responds the AARE accepting the session but the library fails decrypting the AARE.
It is strange because debuging, I can see that it decrypts the "InitiateResponse" properly (08 00 06 5F 1F 04 00 40 1A 1D 04 00 00 07) but then it fails checking the NONSE:
if (memcmp(NONSE, input->data + input->size, 12) != 0)
{
ret = DLMS_ERROR_CODE_INVALID_TAG;
}
I am sure that I am using the same keys. In fact, the meter is responding an AARE accepting the session because I check it using DLMS Translator. And, If the keys are wrong at the client side, the meter responds AARE rejecting the session.
So, what could happen?
Could you help me?
Thanks!
Solved. Was a bug reading…
Solved.
Was a bug reading the PDU from the modem PLC.
Thanks.
Hi, Thanks for letting me…
Hi,
Thanks for letting me know this. I was wondering what might be the reason for this.
BR,
Mikko
Thanks to you for your…
So far everything is working very well. I am using it in client mode and I have tested sessions with public, management and pre-established clients. And everything is going very well.
Thanks to you for your libraries, tools, and all the DLMS information you share.
It's all very useful!
Kind Regards,
Manuel