Hello Gurux,
I've successfully compile Gurux.dlms.c on Arduino both Mega2560 and ESP32 board, and connect it to the Actaris (Itron) SL7000 (SL761B070 2004) trough RS232 interface.
can someone explain how to fill the parameter of the "cl_init()"
I have tried:
cl_init(&meterSettings, 1, 16, 1, DLMS_AUTHENTICATION_NONE, NULL, DLMS_INTERFACE_TYPE_HDLC);
and also
cl_init(&meterSettings, 1, 16, 1, DLMS_AUTHENTICATION_LOW, "ABCDEFGH", DLMS_INTERFACE_TYPE_HDLC);
with no response from meter. and I try to change the server address using this method "Coding HDLC Address for server". the meter is not responding too.
I try capture packet from DLMS Director, and compare to packet sent from the meter, it's different.
after i modified the server address to "0x91", for both "DLMS_AUTHENTICATION_NONE" and "DLMS_AUTHENTICATION_LOW", the meter is responding. and the SNRM packet is identical between Dlms Director and microcontroller sent to meter and vice versa.
but the problem is, the return code says "263" or "DLMS_ERROR_CODE_INVALID_CLIENT_ADDRESS"
I try to change the "Client Address" to another value 0x01 (1), 0x10 (16), it says this return code too.
when I use the clientAddress and server address above and got response from meter, I run this in my main loop routine, like shown on example:
int ret;
//Initialize connection.
ret = com_initializeConnection();
Serial.printf("init Resp: %4d\r\n", ret);
if (ret != DLMS_ERROR_CODE_OK)
{
return;
}
//Read clock.
ret = com_read(&clock1.base, 2);
Serial.printf("Read Resp: %4d\r\n", ret);
if (ret != DLMS_ERROR_CODE_OK)
{
return;
}
com_close();
and when I try skip the return; and add some delay between com_initialize and com_read, and try another type of object like Serial number, then I capture the packet, decode it in XMLTranslator, it says right value.
ABCDEFGH is a default password. If you try to connect without authentication, you can only read a few values. For this reason the authentication level is increased.
Thank You Mikko,
I've try to change the cl_init to:
cl_init(&con.settings, 1, 1, 16639, DLMS_AUTHENTICATION_LOW, "ABCDEFGH", DLMS_INTERFACE_TYPE_HDLC);
and I got generated package: 7e a0 0a 00 02 02 ff 03 93 41 72 7e
but the meter is not send any response,
what should I check / change?
Okay Mikko,
I've try it with GXDLMSDirector before and success, between Low and None Authentication, with same meter.
Hope it also work with GuruxDLMS.c.
Hi Feryan,
Hi Feryan,
SL7000 is an older meter and it works a little bit odd.
Generated message should look like this:
http://www.gurux.fi/GuruxDLMSTranslator?translate=7EA00A000202FF0393417…
You can set correct parameters like this:
cl_init(&con.settings, 1, 1, 16639, DLMS_AUTHENTICATION_LOW, "ABCDEFGH", DLMS_INTERFACE_TYPE_HDLC);
ABCDEFGH is a default password. If you try to connect without authentication, you can only read a few values. For this reason the authentication level is increased.
BR,
Mikko
Thank You Mikko,
Thank You Mikko,
I've try to change the cl_init to:
cl_init(&con.settings, 1, 1, 16639, DLMS_AUTHENTICATION_LOW, "ABCDEFGH", DLMS_INTERFACE_TYPE_HDLC);
and I got generated package: 7e a0 0a 00 02 02 ff 03 93 41 72 7e
but the meter is not send any response,
what should I check / change?
BR
Feryan
Hi,
Hi,
Try to read the meter with GXDLMSDirector. You can find default settings here:
https://www.gurux.fi/GXDLMSDirectorExample
BR,
Mikko
Okay Mikko,
Okay Mikko,
I've try it with GXDLMSDirector before and success, between Low and None Authentication, with same meter.
Hope it also work with GuruxDLMS.c.
Regards,
Feryan