Skip to main content
Home
for DLMS smart meters

Main navigation

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

Breadcrumb

  1. Home
  2. Reading Serial Number From Secure Meter

Reading Serial Number from Secure Meter

By technoshell, 22 January, 2025
Forums
Gurux DLMS for ANSI C

Dear Sir,

I am trying to read the Make Serial Number of Secure Meter Model Sprint 350 by Arduino ESP32. I am able to read the Mfr Name Obis code 0.0.96.1.1.255 with no issues but if I use the same code for Serial number I get a error to the extent that ESP32 restarts

The code is

cosem_init(BASE(ldn), DLMS_OBJECT_TYPE_DATA, "0.0.96.1.0.255"); // Serial No
com_read(BASE(ldn),2);
obj_toString(BASE(ldn), &data);
strcpy(str,data);
Serial2.print(str);

Soon I run this I get a error and ESP32 restarts.

DLMS Director shows as under
15:34:35 Read object type Data index: 2
TX: 7E A0 19 03 41 32 3A BD E6 E6 00 C0 01 C1 00 01 00 00 60 01 00 FF 02 00 89 A0 7E
15:34:35
RX: 7E A0 1A 41 03 52 E9 3D E6 E7 00 C4 01 C1 00 09 08 59 30 35 31 35 31 36 34 9F 71 7E

And value is read correctly.

Can you please advise me where am I going wrong.

Thanks and Regards
ASP

Profile picture for user Kurumi

Kurumi

1 year ago

Hi, Why do you copy data to…

Hi,

Why do you copy data to str? The data is already a string. Have you allocated space for str? Try this instead.

char* data = NULL;
obj_toString(BASE(ldn), &data);
Serial2.print(data);
free(data);

BR,
Mikko

  • Create new account
  • Reset your password

Hire Us!

Latest Releases

  • Sun, 02/01/2026 - 19:47
    gurux.dlms.cpp 9.0.2602.0101
  • Tue, 01/20/2026 - 10:38
    gurux.dlms.java 4.0.89
  • Wed, 01/14/2026 - 14:29
    Gurux.DLMS.Python 1.0.196
  • Mon, 12/29/2025 - 10:38
    Gurux.Serial.Android 3.0.5
  • Mon, 12/15/2025 - 08:11
    Gurux.DLMS.Net 4.0.87

New forum topics

  • Landisgyr meter
  • GxDateTime always return DayOfWeek as FF
  • Asynchronous support in Gurux DLMS stack (.NET)?
  • Multiple meter loop On OFF Problem
  • Python GXDLMSTranslator
More
RSS feed
Privacy FAQ GXDN Issues Contact
Follow Gurux on Twitter Follow Gurux on Linkedin