Good morning Kurumi,
I wanted to know if your DLMS library for Java has the ability to parse PDUs sent in push mode. By this I mean when the meter connects to OUR server and sends a payload at a regular interval.
How would one go about this? I have been able to get a lot of stuff working in the (HES -> Meter) mode but I also require to support (potentially) the mode whereby (Meter -> HES) for push data and I have no idea where to start for such a thing.
Just for reference, the data…
Just for reference, the data I am receiving from the meter is as follows (attached below). I noticed it contains an ASCII-encoded KAME in it, so it has an identifier, just not sure what to use to decode this.
I have supporting Kamstrup documentation I can send if it helps. Affectively they wrap DLMS PDU into a CoAP payload. I successful decode the CoAP packet and extract the payload - those are the bytes shown below.
Payload:
[-37, 8, 75, 65, 77, 69, 2, 24, -97, -1, -126, 7, -72, 48, 0, 0, 43, 0, 41, -46, 96, 64, -68, 114, -32, 118, 47, 44, -29, 11, 97, 76, 82, -8, 122, -104, -22, -58, 101, 11, -25, -53, 17, 76, -33, -68, 94, -81, 24, 75, -77, 70, -49, -112, 123, -53, 28, -59, -88, 82, 120, -55, 102, 52, 14, 98, -89, 111, -43, 10, -46, 119, 111, 54, 6, -83, -122, 96, -124, -6, 27, 40, 8, 9, -26, -25, -42, 25, 52, 95, 91, -7, -73, -106, -31, 103, 105, -113, -18, -76, 94, -42, -115, 30, 62, 92, -82, -5, -72, -87, -6, 58, -1, -92, -116, -22, -50, 8, 93, -97, 55, 85, 89, -117, 103, -16, 57, 53, -94, 100, -99, 67, 47, 31, 86, -107, -111, -95, 56, 21, 0, -45, 94, -94, -51, 30, 20, 39, -42, 44, -34, -97, 7, -66, -22, -63, -123, -74, 44, 96, -64, -124, 15, -56, -24, -111, 4, 84, -47, -13, 45, 63, 104, -106, 27, 58, 124, -78, 42, 127, 67, 57, -47, 123, -68, 92, -41, -26, 88, 117, 70, 10, -109, -102, 36, 118, -30, -79, 49, -119, -59, 114, 45, 115, -51, -85, -121, -14, 0, -46, -88, -93, 105, 114, -5, 122, -107, -99, 44, 110, 20, 71, -37, 73, 4, 107, 13, -68, 20, -115, -83, 85, 6, 97, -98, -91, -22, -25, 30, 96, 74, -47, 21, 67, 68, -10, 62, 50, 91, 61, 59, 122, -5, -53, -82, -57, 9, -92, -110, 25, -44, -103, -43, 115, 98, -54, 109, 21, 16, -81, 34, 76, -93, 59, 14, -74, -81, 21, -29, -105, 45, -13, 55, 104, 12, 93, -64, -74, -82, 100, -115, 38, 30, -24, 115, 55, -91, -79, -23, 76, -15, -87, -61, -18, -9, -6, 109, -116, 118, -108, 68, 126, -73, 14, 19, -126, -23, 59, 17, 87, 5, -72, -18, 99, 11, 121, -105, -119, -58, 101, 33, -20, 108, -56, -42, 25, 105, -20, 63, 74, 73, 4, 6, -61, 51, 16, -79, 1, 51, -74, 15, -88, -80, -80, -117, 77, 88, -33, -22, -108, 6, -83, 68, 107, 89, 39, -57, -37, -83, 92, -91, 81, -12, -42, 9, -3, 51, 100, 68, 88, -5, -83, -122, 17, 77, -46, -111, -8, 4, -56, 77, -77, -21, 113, -10, 81, 15, -29, -37, 44, 78, 27, -10, 1, -15, -39, 63, -10, -98, 43, 90, 49, -12, 22, 74, -67, -119, -85, -94, 34, -61, -38, 100, 63, -108, 62, -54, -39, -91, -127, -6, 32, 53, 37, -84, -79, 44, 50, -124, -85, -115, 109, 120, -68, -125, -84, 82, -10, 29, 46, -95, 26, 68, -88, -11, -84, 42, 12, 58, -88, 22, 104, 117, 13, 101, 34, 126, -75, 97, 57, -36, -60, 57, 58, 37, 75, 67, 21, -62, -68, -84, -3, 114, -89, 9, -35, -99, 46, -1, -67, 76, -87, -118, 92, 53, 55, 115, 77, -108, -62, 30, 75, -89, -61, 126, 7, -41, 36, 125, -111, 50, -67, -76, 54, -89, -98, 121, 110, -115, 79, -65, 82, 10, -24, -122, 17, 125, 48, 60, 86, 34, 8, 106, -101, -71, -108, -54, -62, 7, 108, -111, -84, 9, -74, 13, -60, 45, -66, -126, -127, -33, -61, -18, 115, -118, 73, 36, 78, -63, 113, 70, 35, 117, -122, -70, 116, -9, 78, -22, -21, 52, -68, -34, 18, -122, 52, 2, -119, -69, 105, -69, 115, 78, -90, 120, 113, 81, 76, 107, 58, -73, 107, -18, -73, 49, 12, 67, -95, 8, 35, -70, -57, -128, 59, -65, -40, -99, -126, 107, -8, -55, 68, 46, -29, 66, 46, 22, 18, 21, 118, 6, -24, 108, 9, -104, -77, -110, -109, 69, -14, -73, 25, -58, -82, 107, -103, -33, -43, -41, -90, -36, 19, 29, -84, -51, 116, -48, -107, 94, -44, -101, -84, -6, -40, 98, 20, -10, 78, -100, -35, -11, 47, -9, -102, -29, 97, -33, -110, 90, -21, -43, -67, -67, -46, 61, 24, 72, 57, -61, 60, -14, -42, -84, 34, 18, 124, -43, -58, 102, -15, 115, -125, -103, 1, -56, 43, -74, 28, 100, -6, -45, 116, 60, 125, 126, 32, -8, 47, 94, -114, -29, -67, 39, -116, 50, -29, 74, 117, -115, -110, 125, -123, 48, 73, 1, -51, 125, -12, -10, -30, -92, -72, 91, 90, 122, 7, -12, 106, 110, 6, -20, -68, 52, 51, -25, -15, 33, 92, -101, -55, 13, -64, -10, -104, -112, 21, -59, -123, 93, -96, -57, 57, -5, -33, 101, 28, 6, -5, 106, -24, -15, 96, 112, -115, -74, -8, 78, 102, 16, 3, -125, 85, 3, -80, -3, -127, 0, 105, 40, 31, 62, -126, 50, -106, 43, -10, 80, 89, 10, 83, 123, -30, -51, -99, -20, -118, -61, -13, -15, 22, 29, -32, 50, 19, -8, 54, 56, -68, -76, 55, -74, 64, -88, 122, 111, 9, 126, 99, -65, -38, 87, 29, -37, 96, 6, -14, -7, 44, 28, 61, -104, 3, -99, -9, 120, -55, -13, -52, -81, 99, -3, -50, 101, -36, -66, -78, -111, 74, -83, -46, -4, -67, 100, 93, 115, 45, 36, -46, 41, -24, 16, 111, 76, -64, 113, -14, -47, 43, -99, 35, 31, 125, -90, -122, -75, 62, 42, -76, -39, 105, -18, 15, 71, 71, 100, -124, 93, 104, -57, -41, 106, 57, -32, 106, -31, -8, 122, -99, 68, 119, 84, 121, 1, 6, 12, -10, -88, -120, 32, 42, -19, 109, 25, 114, -79, 63, -74, -22, -95, 14, -22, 25, -16, 111, 72, 85, 103, 96, -12, -116, 8, 53, -58, 53, -52, -44, -93, 110, 20, 105, -82, -61, -116, -36, -39, 25, -77, -86, -94, -63, 3, -86, -104, -68, 96, 84, 60, 92, 44, 27, -32, -77, -7, -80, -81, 120, -66, 23, 41, 107, 98, -55, 113, -112, -100, 97, 16, 89, 42, -90, 112, 10, 49, -74, 17, 55, -98, -106, 44, 15, -65, 74, -13, -127, -100, 75, -29, -46, -46, -32, -8, -89, -48, 22, 29, 113, -91, -71, 67, 27, 125, -113, -84, -20]
Hi, Push listener does this…
Hi,
Push listener does this. You need to check this example:
https://github.com/Gurux/gurux.dlms.java/tree/master/gurux.dlms.push.li…
I can't check your PDU because I don't have block cipher and authentication keys. I add PDU in hex format if that is needed in the future.
BR,
Mikko
"DB 08 4B 41 4D 45 02 18 9F FF 82 07 B8 30 00 00 2B 00 29 D2 60 40 BC 72 E0 76 2F 2C E3 0B 61 4C 52 F8 7A 98 EA C6 65 0B E7 CB 11 4C DF BC 5E AF 18 4B B3 46 CF 90 7B CB 1C C5 A8 52 78 C9 66 34 0E 62 A7 6F D5 0A D2 77 6F 36 06 AD 86 60 84 FA 1B 28 08 09 E6 E7 D6 19 34 5F 5B F9 B7 96 E1 67 69 8F EE B4 5E D6 8D 1E 3E 5C AE FB B8 A9 FA 3A FF A4 8C EA CE 08 5D 9F 37 55 59 8B 67 F0 39 35 A2 64 9D 43 2F 1F 56 95 91 A1 38 15 00 D3 5E A2 CD 1E 14 27 D6 2C DE 9F 07 BE EA C1 85 B6 2C 60 C0 84 0F C8 E8 91 04 54 D1 F3 2D 3F 68 96 1B 3A 7C B2 2A 7F 43 39 D1 7B BC 5C D7 E6 58 75 46 0A 93 9A 24 76 E2 B1 31 89 C5 72 2D 73 CD AB 87 F2 00 D2 A8 A3 69 72 FB 7A 95 9D 2C 6E 14 47 DB 49 04 6B 0D BC 14 8D AD 55 06 61 9E A5 EA E7 1E 60 4A D1 15 43 44 F6 3E 32 5B 3D 3B 7A FB CB AE C7 09 A4 92 19 D4 99 D5 73 62 CA 6D 15 10 AF 22 4C A3 3B 0E B6 AF 15 E3 97 2D F3 37 68 0C 5D C0 B6 AE 64 8D 26 1E E8 73 37 A5 B1 E9 4C F1 A9 C3 EE F7 FA 6D 8C 76 94 44 7E B7 0E 13 82 E9 3B 11 57 05 B8 EE 63 0B 79 97 89 C6 65 21 EC 6C C8 D6 19 69 EC 3F 4A 49 04 06 C3 33 10 B1 01 33 B6 0F A8 B0 B0 8B 4D 58 DF EA 94 06 AD 44 6B 59 27 C7 DB AD 5C A5 51 F4 D6 09 FD 33 64 44 58 FB AD 86 11 4D D2 91 F8 04 C8 4D B3 EB 71 F6 51 0F E3 DB 2C 4E 1B F6 01 F1 D9 3F F6 9E 2B 5A 31 F4 16 4A BD 89 AB A2 22 C3 DA 64 3F 94 3E CA D9 A5 81 FA 20 35 25 AC B1 2C 32 84 AB 8D 6D 78 BC 83 AC 52 F6 1D 2E A1 1A 44 A8 F5 AC 2A 0C 3A A8 16 68 75 0D 65 22 7E B5 61 39 DC C4 39 3A 25 4B 43 15 C2 BC AC FD 72 A7 09 DD 9D 2E FF BD 4C A9 8A 5C 35 37 73 4D 94 C2 1E 4B A7 C3 7E 07 D7 24 7D 91 32 BD B4 36 A7 9E 79 6E 8D 4F BF 52 0A E8 86 11 7D 30 3C 56 22 08 6A 9B B9 94 CA C2 07 6C 91 AC 09 B6 0D C4 2D BE 82 81 DF C3 EE 73 8A 49 24 4E C1 71 46 23 75 86 BA 74 F7 4E EA EB 34 BC DE 12 86 34 02 89 BB 69 BB 73 4E A6 78 71 51 4C 6B 3A B7 6B EE B7 31 0C 43 A1 08 23 BA C7 80 3B BF D8 9D 82 6B F8 C9 44 2E E3 42 2E 16 12 15 76 06 E8 6C 09 98 B3 92 93 45 F2 B7 19 C6 AE 6B 99 DF D5 D7 A6 DC 13 1D AC CD 74 D0 95 5E D4 9B AC FA D8 62 14 F6 4E 9C DD F5 2F F7 9A E3 61 DF 92 5A EB D5 BD BD D2 3D 18 48 39 C3 3C F2 D6 AC 22 12 7C D5 C6 66 F1 73 83 99 01 C8 2B B6 1C 64 FA D3 74 3C 7D 7E 20 F8 2F 5E 8E E3 BD 27 8C 32 E3 4A 75 8D 92 7D 85 30 49 01 CD 7D F4 F6 E2 A4 B8 5B 5A 7A 07 F4 6A 6E 06 EC BC 34 33 E7 F1 21 5C 9B C9 0D C0 F6 98 90 15 C5 85 5D A0 C7 39 FB DF 65 1C 06 FB 6A E8 F1 60 70 8D B6 F8 4E 66 10 03 83 55 03 B0 FD 81 00 69 28 1F 3E 82 32 96 2B F6 50 59 0A 53 7B E2 CD 9D EC 8A C3 F3 F1 16 1D E0 32 13 F8 36 38 BC B4 37 B6 40 A8 7A 6F 09 7E 63 BF DA 57 1D DB 60 06 F2 F9 2C 1C 3D 98 03 9D F7 78 C9 F3 CC AF 63 FD CE 65 DC BE B2 91 4A AD D2 FC BD 64 5D 73 2D 24 D2 29 E8 10 6F 4C C0 71 F2 D1 2B 9D 23 1F 7D A6 86 B5 3E 2A B4 D9 69 EE 0F 47 47 64 84 5D 68 C7 D7 6A 39 E0 6A E1 F8 7A 9D 44 77 54 79 01 06 0C F6 A8 88 20 2A ED 6D 19 72 B1 3F B6 EA A1 0E EA 19 F0 6F 48 55 67 60 F4 8C 08 35 C6 35 CC D4 A3 6E 14 69 AE C3 8C DC D9 19 B3 AA A2 C1 03 AA 98 BC 60 54 3C 5C 2C 1B E0 B3 F9 B0 AF 78 BE 17 29 6B 62 C9 71 90 9C 61 10 59 2A A6 70 0A 31 B6 11 37 9E 96 2C 0F BF 4A F3 81 9C 4B E3 D2 D2 E0 F8 A7 D0 16 1D 71 A5 B9 43 1B 7D 8F AC EC"
Thank you! There is no…
Thank you! There is no authentication being used in this mode from what the Kamstrup documentation says so I would expect it to be decipherable (because there is none).
I will try out the GXDLMSPushListener you have sent and give you feedback as to where I progress with that.
Will stay in contact here, thank you sir
Can I send my keys? Would…
Can I send my keys? Would that aid in decrypting? It's a testing meter so I don't have a problem sending them.
Hi, I don't need the keys…
Hi,
I don't need the keys. You can run the app like this:
python main.py -p YOUR_PORT -a AUTHENTICATION_KEY -B BLOCK_CIPHER_KEY
If your data is coming in WRAPPER frames, add -i WRAPPER argument.
BR,
Mikko
Evening, The data is coming…
Evening,
The data is coming in as Coap blocks. These are then reassembled and a plan PDU is returned.
I have the full PDU now with me now, how could I send it to you? As I want to know the best way for me to work with this APDU and grab the results sent via push from it. All I am able to get is a byte[] array from this. Would some new custom IGXMedia adaptor be needed to make use with it for GXDLMSPushListener oor is there a quicker way to decode it once off?
Hi, Can you send it to me by…
Hi,
Can you send it to me by email?
There is a media for MQTT, so I need to think there should COAP media also be implemented.
BR,
Mikko