Skip to main content
Home
for DLMS smart meters
Open source solutions for DLMS smart metering

Main navigation

  • Home
  • Products
  • About us
  • Open Source
  • Community
  • Forum
  • Downloads
User account menu
  • Log in

Breadcrumb

  1. Home
  2. Forums
  3. Sometime Get Error 269 On Arduino When Communicating With DLMS Meter

Sometime get Error 269 On Arduino when communicating with DLMS Meter

Forum Rules

Before commenting read Forum rules

Don't comment the topic if you have a new question.

You can create a new topic selecting correct category from Gurux Forum and then create a new topic selecting "New Topic" from the top left.

By mightyChamp , 24 July, 2021
Forums
Gurux.DLMS

Hello,

Sometime when communicating with meter I get 269 Checksum Error, and thereafter data didn't parsed in Arduino.

Please help me how can I resolve this Issue.

Thank You

Here is my log:

Serial Write:7EA0190341D4023FE6E600C00181000701005E5B04FF020078FD7E

frame Data:7EA06E41037C3CDDE6E700C40181000101020F02020FFE162102020FFE162102020FFE162102020FFE162302020FFE162302020FFE162302020F01161E02020F012002020F01162002020F01161F02020F01161E02020F01161F02020FFE16FF02020FFE16FF02020FFE16FF97997E
Received bytes:
111
Data send failed. Try to resend. 1

Serial Write:7EA0190341D4023FE6E600C00181000701005E5B04FF020078FD7E

1frame Data:7EA06E41037C3CDDE6E700C40181000101020F02020FFE162102020FFE162102020FFE162102020FFE162302020FFE162302020FFE162302020F01161E02020F012002020F01162002020F01161F02020F01161E02020F01161F02020FFE16FF02020FFE16FF02020FFE16FF97997E

1frame Data:7EA06E41037C3CDDE6E700C40181000101020F02020FFE162102020FFE162102020FFE162102020FFE162302020FFE162302020FFE162302020F01161E02020F012002020F01162002020F01161F02020F01161E02020F01161F02020FFE16FF02020FFE16FF02020FFE16FF97997E7EA0074103715E667E

break due to 269
com_read failed. 269

Serial Write:7EA0190341F6123DE6E600C00181000701005E5B04FF0400A8A97E

1frame Data:7EA01541039E7083E6E700C401810006000000007BDF7E

mightyChamp

4 years 10 months ago

We found that our MCU missed

We found that our MCU missed a byte from received data, So is there any method to recover from it. without calling profile generic obis again.

Profile picture for user Kurumi

Kurumi

4 years 10 months ago

Hi,

Hi,

The client application will re-send the command if the meter doesn't reply. If your app can check that the data is corrupted and rejects the message there should be no problems after the message re-sent.

BR,
Mikko

mightyChamp

4 years 10 months ago

Hello,

Hello,

In Arduino code, If a byte is missed from uart, then it gives error of 269 and then it didn't resend same command. And I tried to send again by some modification in code, but it didn't work, as shown in log.
On 2nd try it gives a small frame which is appended to previous data as shown in log.

Serial Write:7EA0190341D4023FE6E600C00181000701005E5B04FF020078FD7E

frame Data:7EA06E41037C3CDDE6E700C40181000101020F02020FFE162102020FFE162102020FFE162102020FFE162302020FFE162302020FFE162302020F01161E02020F012002020F01162002020F01161F02020F01161E02020F01161F02020FFE16FF02020FFE16FF02020FFE16FF97997E
Received bytes:
111
Data send failed. Try to resend. 1

Serial Write:7EA0190341D4023FE6E600C00181000701005E5B04FF020078FD7E

frame Data:7EA06E41037C3CDDE6E700C40181000101020F02020FFE162102020FFE162102020FFE162102020FFE162302020FFE162302020FFE162302020F01161E02020F012002020F01162002020F01161F02020F01161E02020F01161F02020FFE16FF02020FFE16FF02020FFE16FF97997E

Profile picture for user Kurumi

Kurumi

4 years 10 months ago

Hi,

Hi,

You are right. Re-send is not implemented for Arduino. You need to re-send data with this:
if ((ret = Serial.write(data->data, data->size)) != data->size)

I added re-send to the worklist and it will be implemented next week.

BR,
Mikko

mightyChamp

4 years 10 months ago

Hello,

Hello,

Serial transmit is implemented in Arduino as shown:

if ((ret = com_readSerialPort(0x7E)) != 0 )
{
if (ret == DLMS_ERROR_CODE_RECEIVE_FAILED && resend == RESEND_COUNT)
{
return DLMS_ERROR_CODE_SEND_FAILED;
}
++resend;
GXTRACE_INT(PSTR("Data send failed. Try to resend."), resend);
if ((ret = Serial.write(data->data, data->size)) != data->size)
{
//If failed to write all bytes.
GXTRACE(PSTR("Failed to write all data to the serial port.\n"), NULL);
}
}
In my case, Serial data is transmitted twice, but I get two different response from meter.
First I send :
7EA0190341D4023FE6E600C00181000701005E5B04FF020078FD7E
Response:
7EA06E41037C3CDDE6E700C40181000101020F02020FFE162102020FFE162102020FFE162102020FFE162302020FFE162302020FFE162302020F01161E02020F012002020F01162002020F01161F02020F01161E02020F01161F02020FFE16FF02020FFE16FF02020FFE16FF97997E

2nd time send:
7EA0190341D4023FE6E600C00181000701005E5B04FF020078FD7E
Response:
7EA0074103715E667E

So sending again is not working in my case, If I get same response then there is no issue. but I am getting different responses. So I have to call obis again.

Profile picture for user Kurumi

Kurumi

4 years 10 months ago

Hi,

Hi,

Meter's reply is invalid and when you try to read it again the meter can handle it and returns keep alive. I believe that the only way to handle this is to close the connection and read data again.

BR,
Mikko

mightyChamp

4 years 10 months ago

Hello,

Hello,
if com_read(pg, 2); fails then I recall com_read(pg, 2) without com_close(), it start from previous fail and I got all data from it.
Is it ok to call com_read() again.

Thank You

Profile picture for user Kurumi

Kurumi

4 years 10 months ago

In reply to Hello, by mightyChamp

Hi,

Hi,

It's great if this will work, but note that this will work only when reply data is coming in one frame. It will not work if you try to read the profile generic buffer.

BR,
Mikko

mightyChamp

4 years 10 months ago

Hello,

Hello,

Thanks for info, I done it in profile generic only, didn't try in Data or register.
It is working, When get 269 error, my code call com_read(0 with same attribute again, and its working since 2 days.
But as you mentioned It will not work. So have to found another solution, as reading blling perioid tooks about 5-6 second of time. So, calling whole profile generic again, is not a proper solution for us.

if a profile generic frame missed a byte, then by resending frame again, meter will send keep live, but if I send it again , Can meter will send actual data again?

Thank You

Profile picture for user Kurumi

Kurumi

4 years 10 months ago

Hi,

Hi,

That depends on how it's implemented for the meter. Meters are working differently with this.

BR,
Mikko

  • Create new account
  • Reset your password

Hire Us!

Latest Releases

  • Tue, 06/09/2026 - 11:16
    gurux.dlms.java 4.0.95
  • Tue, 06/09/2026 - 10:03
    Gurux.DLMS.Python 1.0.199
  • Mon, 06/08/2026 - 13:39
    gurux.dlms.cpp 9.0.2606.0801
  • Mon, 06/01/2026 - 10:15
    gurux.dlms.cpp 9.0.2606.0101
  • Thu, 05/28/2026 - 16:06
    gurux.dlms.java 4.0.94

New forum topics

  • Error reading L&G Meter
  • Pass a TCP Client to GXNet
  • Australian EDMI Mk10D (Essential Energy area)
  • Strange mix of data notificiation vs get response
  • DLMS Connection
More

Who's new

  • Tuanhgg
  • Adel
  • charnon
  • Paddles
  • Miguel Ángel
RSS feed
Privacy FAQ GXDN Issues Contact
Follow Gurux on Twitter Follow Gurux on Linkedin