Hello,
We are using Push messages over UDP. Sometimes during GBT the messages are out of order and in these cases, the decoding fails.
ex: If GBT has 4 blocks and let's assume block 3 and 4 are interchanged(1243). In this case, the isComplete and isMoreData in GXReplyData class returns true and false respectively as soon as block 4 is received without waiting for block 3. This might be because of only the last block indicator in GBT is used to check the completeness of the data.
EX: If the blocks are received in order 1324, Then after reading the last block, getData function in GXDLMSSecureClient will throw an "IllegalArgumentException: Invalid data type: "
Is it possible to also consider the block sequence number along with the last block indicator to determine if the data is complete and re-order the blocks if they are out of order?
We are using DLMS Java 2.2.22
Thank You
BR
Pramod
In the received messages, I see sequence numbers(3rd column from right). Will it be possible to somehow use them in combination with the GBT's last block identifier to determine if all the blocks are received and or in order.
00 01 00 01 00 66 00 6b e0 00 00 01 00 00
00 01 00 01 00 66 00 6b e0 00 00 02 00 00
00 01 00 01 00 66 00 6b e0 00 00 03 00 00
00 01 00 01 00 66 00 13 e0 80 00 04 00 00
When I put the unencrypted message in the Gurux DLMS Translator it also shows block number " <BlockNumber Value="3" />". Which is taken from this sequence number. I have tested it by removing the second message and the block numbers were 1 and 3. Not just increment.
Because there is no ACK at the moment this is a very difficult problem and I don't have an answer for this yet. We can't skip messages if they come too early because then data is lost. If space is allocated for messages, we need to add implementation that checks that all the messages have come.
Hi,
Hi,
I really hate UDP. :-)
I understand the problem. I believe that you are using WRAPPER, not HDLC framing.
I need to think about how we can solve this.
BR,
Mikko
Yes, Mikko we are using
Yes, Mikko we are using WRAPPER. We have no option of using TCP as G3PLC supports only UDP.
In the received messages, I
In the received messages, I see sequence numbers(3rd column from right). Will it be possible to somehow use them in combination with the GBT's last block identifier to determine if all the blocks are received and or in order.
00 01 00 01 00 66 00 6b e0 00 00 01 00 00
00 01 00 01 00 66 00 6b e0 00 00 02 00 00
00 01 00 01 00 66 00 6b e0 00 00 03 00 00
00 01 00 01 00 66 00 13 e0 80 00 04 00 00
Hi,
Hi,
Those messages are push messages?
BR,
Mikko
They are just part of the GBT
They are just part of the GBT blocks from Push Interval_2.
Below is the complete message:
Encrypted:
00 01 00 01 00 66 00 6b e0 00 00 01 00 00 64 db 08 44 4e 56 67 73 16 5c 86 82 01 2b 30 00 00 00 23 06 69 47 87 a0 15 32 8f 69 10 fe e4 97 b0 86 b9 0b 4b cf e9 4b c9 cc 3c f6 d3 5e 61 6f 98 45 dd ab f8 6f 87 28 19 52 f0 d6 d3 ba 4b f8 ea 06 cf 7f b5 ab bc 34 1f 70 56 4d 4f 43 58 bb 50 0c 6f 71 ca 60 bf 86 0d 4f 5d 8e 15 97 f1 70 77 63 ed 4c 5f
00 01 00 01 00 66 00 6b e0 00 00 02 00 00 64 cc 5a 08 47 9f 50 f9 f2 f6 75 86 37 f3 e6 ad da f1 3b 04 b8 10 80 07 e4 d0 78 f8 8b e8 99 7f be 6d 77 7b d0 a1 a8 d4 14 f3 60 21 b8 df 2a 3f 97 22 7c ee 73 1c 34 f8 95 30 af 65 a5 89 09 8d 21 57 f7 55 bf d4 c8 8b 0b ba d2 fd 25 f3 19 0a 17 0d 8b 1d 06 8b b5 c2 0d 90 8f 76 48 1a e9 f2 fb f7 5a 7d 53
00 01 00 01 00 66 00 6b e0 00 00 03 00 00 64 ab ab ba aa d3 e7 2b 5f e3 3c 61 33 00 50 c3 47 27 75 84 e9 15 f8 93 22 ba a1 4a 71 66 6b 62 84 83 d7 28 89 48 8a 91 d1 6e 37 1b a4 91 97 4e 23 5c 5d 9f 57 2f f4 40 5d 48 3e f1 c5 ee c7 8b 03 e6 9d 8b c6 cc f0 79 e8 da 1b d1 7c 63 6c b8 c4 ba 8c aa 13 a8 6f 10 ce ca e4 f7 92 e9 00 8b 20 69 0d 5f fa
00 01 00 01 00 66 00 13 e0 80 00 04 00 00 0c a9 04 bd 3f 8a ab 55 aa 26 91 6c 3b
Un Encrypted:
00 01 00 01 00 66 00 6b e0 00 00 01 00 00 64 0f 00 00 00 02 0c 07 e3 01 16 02 0c 0e 24 2e ff c4 00 02 02 09 06 00 02 19 09 00 ff 01 09 02 04 09 0c 07 e3 01 16 02 0a 00 00 11 ff c4 00 11 00 06 00 00 18 70 06 00 00 15 b0 02 04 09 0c 07 e3 01 16 02 0a 0f 00 41 ff c4 00 11 00 06 00 00 18 70 06 00 00 15 b0 02 04 09 0c 07 e3 01 16 02 0a 1e 00 0b ff
00 01 00 01 00 66 00 6b e0 00 00 02 00 00 64 c4 00 11 00 06 00 00 18 70 06 00 00 15 b0 02 04 09 0c 07 e3 01 16 02 0a 2d 00 3b ff c4 00 11 00 06 00 00 18 70 06 00 00 15 b0 02 04 09 0c 07 e3 01 16 02 0b 00 00 2c ff c4 00 11 00 06 00 00 18 fc 06 00 00 15 b0 02 04 09 0c 07 e3 01 16 02 0b 0f 00 5b ff c4 00 11 00 06 00 00 1a 8b 06 00 00 15 b0 02 04
00 01 00 01 00 66 00 59 e0 80 00 03 00 00 52 09 0c 07 e3 01 16 02 0b 1e 00 26 ff c4 00 11 00 06 00 00 1c 1e 06 00 00 15 b0 02 04 09 0c 07 e3 01 16 02 0b 2d 00 55 ff c4 00 11 00 06 00 00 1d 98 06 00 00 15 b0 02 04 09 0c 07 e3 01 16 02 0c 00 00 1f ff c4 00 11 00 06 00 00 1d 98 06 00 00 15 b0
When I put the unencrypted message in the Gurux DLMS Translator it also shows block number " <BlockNumber Value="3" />". Which is taken from this sequence number. I have tested it by removing the second message and the block numbers were 1 and 3. Not just increment.
GBT push messages and UDP
Hi,
Because there is no ACK at the moment this is a very difficult problem and I don't have an answer for this yet. We can't skip messages if they come too early because then data is lost. If space is allocated for messages, we need to add implementation that checks that all the messages have come.
Is it possible that you start using TCP/IP?
BR,
Mikko
Hi Mikko,
Hi Mikko,
Thanks for your reply. Unfortunately, we can not use TCP/IP :(. We are using G3PLC to communicate with meters which is UDP only.
BR
Pramod