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. 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 4 months 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

  • 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
RSS feed
Privacy FAQ GXDN Issues Contact
Follow Gurux on Twitter Follow Gurux on Linkedin