Hi Mikko,
We have purchased your C stack to read DLMS/COSEM protocol based meters and it worked fine for Secure premier 300 meters. But, when i am trying to read data from Kamstrup Omnipower DLMS based meter, i am not getting expected response, mentioned below.
I also tried to read the same meter via GuruX Dlms director. In that device itself is not connecting.
It would be highly appreciated if you can help me out, regarding this.
Settings for Kamstrup meter are mentioned below(provided in document).
Primary Module Interface Association with Low level Security(Password Protected)
- Client SAP: 18
- Server SAP: 16
- Context name : Logical Name Addressing.
- Mechanism Name: Low Level Security. Password Default is "12345"
- Conformance : GET, Block Transfer with GET, SET, Action, Selective Access
Below are the settings given in C.
cl_init(&con.settings, 1, 18, 16, DLMS_AUTHENTICATION_LOW, &gstrPtr_deviceConfig->xrs485Device[idx].pComm.pDlmspwd, DLMS_INTERFACE_TYPE_HDLC);
Your meter is returning ExceptionResponse. If you post sent and received bytes here I can check what is the problem. I believe that one of you settings is wrong.
Hi,
In this meter there are two ports through which we can read data one is Optical port and another is RS485 port. As per Kamstrup, reading via optical port requires an Encryption key, but reading via Rs485 does not require any encryption.
Can you please confirm me will this stack support Kamstrup reading?
Hi,
I have already tried those settings using the DLMS director. Still, I tried once again and still I am not able to read the meter via RS485 port.PFA
Hi Mikko,
After changing max payload to 1010 I am able to read the meter with authentication NONE.
But when trying to read with authentication LOW, I am getting an error. I have given the addresses as per the doc.PFA
Please, don't add pics. They don't give me any info.
Try to change the client address. If you are using optical head it's 0x13. I can't remember what value you should use with RS-485 right now. They are described on the meter documentation. If you don't have that you can try with different values.
Hi Mikko,
Thanks for your reply.
After changing the RX TX payload size, SNRM request, and the response I am getting is correct.
But for AARQ request some difference I am getting. Can you please tell me why this is happening. Below are the Request and responses.
I believe that you you are not using the same meter? The meter that you try to read is requiring that a ciphered connection is used. Meter that you try to read with Kamstrup is not require a ciphered connection.
Hi,
Hi,
Your meter is returning ExceptionResponse. If you post sent and received bytes here I can check what is the problem. I believe that one of you settings is wrong.
BR,
Mikko
Hi,
Hi,
Thanks for your reply. Pls check the below sent and received bytes from meter.
sending Command:
0x7e 0xa0 0x07 0x21 0x25 0x93 0xec 0xd0 0x7e
received Buffer: 34
0x7e 0xa0 0x20 0x25 0x21 0x73 0x91 0xeb 0x81 0x80 0x14 0x05 0x02 0x00 0x80 0x06 0x02 0x00 0x80 0x07 0x04 0x00 0x00 0x00 0x01 0x08 0x04 0x00 0x00 0x00 0x01 0xce 0x6a 0x7e
sending Command:
0x7e 0xa0 0x41 0x21 0x25 0x10 0x52 0x3b 0xe6 0xe6 0x00 0x60 0x33 0xa1 0x09 0x06 0x07 0x60 0x85 0x74 0x05 0x08 0x01 0x01 0x8a 0x02 0x07 0x80 0x8b 0x07 0x60 0x85 0x74 0x05 0x08 0x02 0x01 0xac 0x07 0x80 0x05 0x31 0x32 0x33 0x34 0x35 0xbe 0x10 0x04 0x0e 0x01 0x00 0x00 0x00 0x06 0x5f 0x1f 0x04 0x00 0x40 0x1e 0x1d 0xff 0xff 0x1c 0x3f 0x7e
received Buffer: 49
0x7e 0xa0 0x2f 0x25 0x21 0x30 0xf7 0x29 0xe6 0xe7 0x00 0x61 0x82 0x00 0x1f 0xa1 0x09 0x06 0x07 0x60 0x85 0x74 0x05 0x08 0x01 0x03 0xa2 0x03 0x02 0x01 0x01 0xa3 0x05 0xa1 0x03 0x02 0x01 0x02 0xbe 0x06 0x04 0x04 0x0e 0x01 0x06 0x00 0xe7 0x2e 0x7e
Querying obis : 1.0.32.7.0.255,0,3
sending Command:
0x7e 0xa0 0x19 0x21 0x25 0x32 0x8c 0x09 0xe6 0xe6 0x00 0xc0 0x01 0x81 0x00 0x03 0x01 0x00 0x20 0x07 0x00 0xff 0x02 0x00 0x80 0x4e 0x7e
received Buffer: 17
0x7e 0xa0 0x0f 0x25 0x21 0x52 0xb0 0xe6 0xe6 0xe7 0x00 0xd8 0x02 0x02 0xcf 0x5b 0x7e
Querying obis : 1.0.52.7.0.255,1,3
sending Command:
0x7e 0xa0 0x19 0x21 0x25 0xfe 0xec 0x05 0xe6 0xe6 0x00 0xc0 0x01 0x81 0x00 0x03 0x01 0x00 0x34 0x07 0x00 0xff 0x02 0x00 0x9c 0x1c 0x7e
received Buffer: 17
0x7e 0xa0 0x0f 0x25 0x21 0x1e 0xd8 0x6e 0xe6 0xe7 0x00 0xd8 0x02 0x02 0xcf 0x5b 0x7e
sending Command:
0x7e 0xa0 0x07 0x21 0x25 0x53 0xe0 0x16 0x7e
received Buffer: 9
0x7e 0xa0 0x07 0x25 0x21 0x73 0xe3 0x33 0x7e
Disconnected
Also, as i am not able to upload Kamstrup document here. So i sent you in your mail. Please check.
Regards,
Ayush
Hi,
Hi,
Your meter expects that you are using a ciphered connection. Connection without ciphering is not allowed.
BR,
Mikko
Hi,
Hi,
In this meter there are two ports through which we can read data one is Optical port and another is RS485 port. As per Kamstrup, reading via optical port requires an Encryption key, but reading via Rs485 does not require any encryption.
Can you please confirm me will this stack support Kamstrup reading?
Hi ,
Hi ,
Yes, Kamstrup is supported and our clients are reading them all the time. Try with GXDLMSDirector first. check Kamstrup settings from here:
https://www.gurux.fi/GXDLMSDirectorExample
BR,
Mikko
Hi,
Hi,
I have already tried those settings using the DLMS director. Still, I tried once again and still I am not able to read the meter via RS485 port.PFA
Attachment -2
Attachment -2
Attachment - 3
Attachment - 3
Attachment - 4
Attachment - 4
Hi,
Hi,
Kamstrup is using own client address for RS485. You need to ask it from the meter vendor.
If I remember right it should be on the documentation.
BR,
Mikko
Hi,
Hi,
Ya, it's 18. I tried with all the combinations still the same result.
Hi,
Hi,
Those pictures don't give me any information. Have you change Max payload to 1010?
BR,
Mikko
Hi Mikko,
Hi Mikko,
After changing max payload to 1010 I am able to read the meter with authentication NONE.
But when trying to read with authentication LOW, I am getting an error. I have given the addresses as per the doc.PFA
Hi,
Hi,
Please, don't add pics. They don't give me any info.
Try to change the client address. If you are using optical head it's 0x13. I can't remember what value you should use with RS-485 right now. They are described on the meter documentation. If you don't have that you can try with different values.
BR,
Mikko
Hi,
Hi,
Can you please tell me what is the difference between these two SNRM requests?
1.
7e a0 07 21 25 93 ec d0 7e
2.
7E A0 20 21 25 93 9E 08 81 80 14 05 02 03 F2 06 02 03 F2 07 04 00 00 00 01 08 04 00 00 00 01 0A 75 7E
Hi,
Hi,
In the last one client proposes frame sizes.
http://www.gurux.fi/GuruxDLMSTranslator?translate=7EA0202125939E0881801…
BR,
Mikko
Hi,
Hi,
Thanks for your reply. Can you please tell me how can I send SNRM request from the 'C' stack with TX 1010?
Hi,
Hi,
Set TX and RX size like this:
connection->settings.maxInfoTX = connection->settings.maxInfoRX = 1010;
BR,
Mikko
Hi Mikko,
Hi Mikko,
Thanks for your reply.
After changing the RX TX payload size, SNRM request, and the response I am getting is correct.
But for AARQ request some difference I am getting. Can you please tell me why this is happening. Below are the Request and responses.
Send SNRM request.
Kamstrup TX:7E A0 20 21 25 93 9E 08 81 80 14 05 02 03 F2 06 02 03 F2 07 04 00 00 00 01 08 04 00 00 00 01 0A 75 7E
My TX :7e a0 20 21 25 93 9e 08 81 80 14 05 02 03 f2 06 02 03 f2 07 04 00 00 00 01 08 04 00 00 00 01 0a 75 7e
Kamstrup RX:7E A0 20 25 21 73 91 EB 81 80 14 05 02 03 F2 06 02 03 F2 07 04 00 00 00 01 08 04 00 00 00 01 0A 75 7E
My RX :7e a0 20 25 21 73 91 eb 81 80 14 05 02 03 f2 06 02 03 f2 07 04 00 00 00 01 08 04 00 00 00 01 0a 75 7e
Send AARQ request.
Kamstrup TX:7E A0 41 21 25 10 52 3B E6 E6 00 60 33 A1 09 06 07 60 85 74 05 08 01 01 8A 02 07 80 8B 07 60 85 74 05 08 02 01 AC 07 80 05 31 32 33 34 35 BE 10 04 0E 01 00 00 00 06 5F 1F 04 00 00 1E 1D FF FF 3E FE 7E
My TX :7e a0 41 21 25 10 52 3b e6 e6 00 60 33 a1 09 06 07 60 85 74 05 08 01 01 8a 02 07 80 8b 07 60 85 74 05 08 02 01 ac 07 80 05 31 32 33 34 35 be 10 04 0e 01 00 00 00 06 5f 1f 04 00 40 1e 1d ff ff 1c 3f 7e
Kamstrup RX:7E A0 37 25 21 30 8E 0F E6 E7 00 61 29 A1 09 06 07 60 85 74 05 08 01 01 A2 03 02 01 00 A3 05 A1 03 02 01 00 BE 10 04 0E 08 00 06 5F 1F 04 00 00 10 1D 03 EF 00 07 05 8B 7E
My RX :7e a0 2f 25 21 30 f7 29 e6 e7 00 61 82 00 1f a1 09 06 07 60 85 74 05 08 01 03 a2 03 02 01 01 a3 05 a1 03 02 01 02 be 06 04 04 0e 01 06 00 e7 2e 7e
Hi,
Hi,
Remove GeneralProtection from the proposed conformances. Like this:
connection->settings.proposedConformance &= ~DLMS_CONFORMANCE_GENERAL_PROTECTION;
BR,
Mikko
Hi,
Hi,
Thanks for your quick reply.
After removing the general protection TX is matching but RX is not.
TX:
7e a0 41 21 25 10 52 3b e6 e6 00 60 33 a1 09 06 07 60 85 74 05 08 01 01 8a 02 07 80 8b 07 60 85 74 05 08 02 01 ac 07 80 05 31 32 33 34 35 be 10 04 0e 01 00 00 00 06 5f 1f 04 00 00 1e 1d ff ff 3e fe 7e
RX:
7e a0 2f 25 21 30 f7 29 e6 e7 00 61 82 00 1f a1 09 06 07 60 85 74 05 08 01 03 a2 03 02 01 01 a3 05 a1 03 02 01 02 be 06 04 04 0e 01 06 00 e7 2e 7e
Hi,
Hi,
I believe that you you are not using the same meter? The meter that you try to read is requiring that a ciphered connection is used. Meter that you try to read with Kamstrup is not require a ciphered connection.
BR,
Mikko
BR,
Mikko