I can compile the C library on Windows, using Microsoft Visual Studio, run on Windows, and can access the serial port.
But when I see the traffic capture, it is one byte less than the data sent by the DLMS Director app.
I have tried different client addresses, server addresses, password, authentication bytes, but still there is a small discrepancy between the SNRM request sent by the DLMS Director to the example client application.
From the Screenshot (231).png in the attachment:
the left window is for the traffic from the C client library, the right side is from the DLMS Director app.
Questions:
1. Is there any tool to decipher the byte streams of DLMS / COSEM protocol?
2. Why is there 9 bytes sent by the C client libary versus 10 bytes from the DLMS Director Windows Application?
3. Is there any C client library for the STM32 MCU available?
I apologize for the inconvenient, sending picture only. Now I copy the numbers as below:
Traffic capture from DLMS Director:
Tx: 7E A0 08 02 47 09 93 62 EF 7E
Rx: 7E A0 21 09 02 47 73 31 1A 8180 14 05 02 01 60 06 02 01 60 07 04 00 00 00 01 08 04 00 00 00 01 DE 89 7E
We can see there is a response from the meter.
From C Client example library:
Tx: 7E A0 07 03 21 93 0F 01 7E
Tx: 7E A0 07 03 09 93 FC EC 7E
Tx: 7E A0 07 47 03 93 9B 74 7E
And there is no response from the EDMI meter.
Looking forward to a response, thank you in advance.
Thank you for sending the bytes in text format. It's easier to read and handle.
1. You can use http://gurux.fi/GuruxDLMSTranslator
2. You need to set Logical address to 1, Physical address to 35 and client address to 4.
Like this:
cl_init(&settings, 1, 4, cl_getServerAddress(1, 35, 0), DLMS_AUTHENTICATION_NONE, NULL, DLMS_INTERFACE_TYPE_HDLC);
Hi Mikko,
thank you for your information, now I can access the e-meter using the example Client application, running on Windows 10 Platform.
I am developing LoRa modem to read e-meter using STM32L072 and Keil uVision 5 C Compiler. I found example client app for Arduino and for Atmel ATmega2560 platform. Do you have the STM32 version as well?
We don't have Keil uVision compiler example at the moment, but you can use Arduino example quite easily. The only thing that you need to change is writing and reading data to the UART. I hope that you can use malloc. It makes it easier to write the client application.
I apologize for the
I apologize for the inconvenient, sending picture only. Now I copy the numbers as below:
Traffic capture from DLMS Director:
Tx: 7E A0 08 02 47 09 93 62 EF 7E
Rx: 7E A0 21 09 02 47 73 31 1A 8180 14 05 02 01 60 06 02 01 60 07 04 00 00 00 01 08 04 00 00 00 01 DE 89 7E
We can see there is a response from the meter.
From C Client example library:
Tx: 7E A0 07 03 21 93 0F 01 7E
Tx: 7E A0 07 03 09 93 FC EC 7E
Tx: 7E A0 07 47 03 93 9B 74 7E
And there is no response from the EDMI meter.
Looking forward to a response, thank you in advance.
Kind regards,
Edy Gunawan
Hi Edy,
Hi Edy,
Thank you for sending the bytes in text format. It's easier to read and handle.
1. You can use http://gurux.fi/GuruxDLMSTranslator
2. You need to set Logical address to 1, Physical address to 35 and client address to 4.
Like this:
cl_init(&settings, 1, 4, cl_getServerAddress(1, 35, 0), DLMS_AUTHENTICATION_NONE, NULL, DLMS_INTERFACE_TYPE_HDLC);
3. You didn't say what compiler you are using, but check this out:
https://github.com/Gurux/GuruxDLMS.c
BR,
Mikko
Hi Mikko,
Hi Mikko,
thank you for your information, now I can access the e-meter using the example Client application, running on Windows 10 Platform.
I am developing LoRa modem to read e-meter using STM32L072 and Keil uVision 5 C Compiler. I found example client app for Arduino and for Atmel ATmega2560 platform. Do you have the STM32 version as well?
Kind regards,
Edy Gunawan
Hi Edy Gunawan,
Hi Edy Gunawan,
We don't have Keil uVision compiler example at the moment, but you can use Arduino example quite easily. The only thing that you need to change is writing and reading data to the UART. I hope that you can use malloc. It makes it easier to write the client application.
BR,
Mikko