I'm trying to comunicate with my smart meter locally but sometimes when I receive frame and try to do "Client.GetData(p.Reply, reply)" to decrypt the frame, this method return false and I receive in system console "Invalid HDLC Frame: 52. Expected: 32", though frame I received is correctly decrypted.
(Now I'm not using "void ReadDataBlock(byte[] data, GXReplyData reply)" because I don't understand the method Client.ReceiverReady(reply.MoreData), but I'm only using Serial.Send() and Serial.Receive().)
An example:
<- 03:49:44.854 Sent 7E A0 2E 02 21 03 32 0C 2E E6 E6 00 DB 00 1E 30 80 00 01 02 BE B4 68 6B DC B5 90 85 48 E9 49 09 58 96 E8 6D 07 61 F9 26 02 1E 27 D1 C0 96 DB 7E
Decrypted Frame: (C0 01 C1 00 01 00 00 5E 27 14 FF 02 00)
and I receive
-> 03:49:44.985 Received 7E A0 36 03 02 21 52 0D 43 E6 E7 00 DB 00 26 30 80 00 00 FB 04 2F 17 1A
-> 03:49:45.014 Received 1A EF B3 E6 72 3F DB
-> 03:49:45.041 Received 17 74
complete frame (7E A0 36 03 02 21 52 0D 43 E6 E7 00 DB 00 26 30 80 00 00 FB 04 2F 17 1A EF B3 E6 72 3F DB D0 19 A2 51 0F 1B 9F C0 0D C0 D7 73 24 79 62 9F 72 B2 BE 8E 9D D8 D0 17 74 7E)
decrypted frame: (C4 01 C1 00 02 03 06 00 00 00 00 06 00 00 00 00 06 00 00 00 00)
Are you using pre-established communication? How often this is happening? Can you send the trace from the previous frame? HDLC frame ID is wrong, but I need previous frames to check what is causing it.
Hi,
Hi,
Are you using pre-established communication? How often this is happening? Can you send the trace from the previous frame? HDLC frame ID is wrong, but I need previous frames to check what is causing it.
BR,
Mikko