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. DLMS Energy Meter Reading Using Esp32

DLMS energy meter reading using esp32

By Jeswin125 , 24 March, 2023
Forums
Gurux.DLMS

I'm trying to implement a smart energy meter using esp32 and dlms compatible energy meter.....
The code i used is
https://github.com/Gurux/GuruxDLMS.c/blob/master/Arduino_IDE/client/cli…
I'm encountering error message

ELF file SHA256: 95dae218c0836ad4

Rebooting...
ets Jul 29 2019 12:21:46

rst:0xc (SW_CPU_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:1
load:0x3fff0030,len:1344
load:0x40078000,len:13924
ho 0 tail 12 room 4
load:0x40080400,len:3600
entry 0x400805f0
Guru Meditation Error: Core 1 panic'ed (LoadProhibited). Exception was unhandled.

Core 1 register dump:
PC : 0x400fc72a PS : 0x00060c30 A0 : 0x800f55a4 A1 : 0x3ffb1ef0
A2 : 0x00000000 A3 : 0x00000000 A4 : 0x00000000 A5 : 0x00000000
A6 : 0x3ffb2210 A7 : 0x00000004 A8 : 0x3ffb6884 A9 : 0x3ffb6884
A10 : 0x3ffb6a30 A11 : 0x3ffb1f00 A12 : 0x000000ff A13 : 0x0000ff00
A14 : 0x00ff0000 A15 : 0xff000000 SAR : 0x00000000 EXCCAUSE: 0x0000001c
EXCVADDR: 0x00000000 LBEG : 0x400864ed LEND : 0x400864fd LCOUNT : 0xffffffff

Backtrace: 0x400fc727:0x3ffb1ef0 0x400f55a1:0x3ffb2200 0x400d1bd5:0x3ffb2250 0x400e4f12:0x3ffb2290

Jeswin125

3 years 2 months ago

Can someone help me to…

Can someone help me to rectify the issue?
I'm using Arduino ide for coding

Profile picture for user Kurumi

Kurumi

3 years 2 months ago

Hi, Select "File" and …

Hi,

Select "File" and "Preferences". What is your additional board manager URL?

BR,
Mikko

Jeswin125

3 years 2 months ago

In reply to Hi, Select "File" and … by Kurumi

This is the url added https…

This is the url added
https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/pack…

Profile picture for user Kurumi

Kurumi

3 years 2 months ago

In reply to This is the url added https… by Jeswin125

Hi, How much RAM and Flash…

Hi,

How much RAM and Flash memory do you have? Are there any compiler warnings?

BR,
Mikko

Jeswin125

3 years 2 months ago

In reply to Hi, How much RAM and Flash… by Kurumi

Hi, There are no complier…

Hi,

There are no complier warnings
Hoping the below image contains the necessary information you asked for.
Thank you

Image
Profile picture for user Kurumi

Kurumi

3 years 2 months ago

In reply to Hi, There are no complier… by Jeswin125

Hi, Is this the exact model…

Hi,

Is this the exact model of your ESP32 and this is not for eaxmple ESP8266? This is now tested with ESP32 and ot worked without problems.

BR,
Mikko

Jeswin125

3 years 2 months ago

In reply to Hi, Is this the exact model… by Kurumi

Hi, This is the model I'm…

Hi,
This is the model I'm using it's an esp- wroom-32 to be exact.
Before,after compilation when i uploaded the code to the board... nothing happened.... [using a TTL converter and rj11 to usb cable (data cable) to connect with a single phase energy meter from L&T].......so to see up till where the code was being executed....i added serial.print() statements in the client.ino file

That's when the above error code started appearing

I have taken the pic of my board ,shared below....

Thank you

Image

Jeswin125

3 years 2 months ago

Hi, The serial monitor now…

Hi,

The serial monitor now shows a different response,

rst:0x8 (TG1WDT_SYS_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:1
load:0x3fff0030,len:1344
load:0x40078000,len:13924
ho 0 tail 12 room 4
load:0x40080400,len:3600
entry 0x400805f0
ets Jul 29 2019 12:21:46

I had done few changes previously.....now i reverted it fully back to the original client.ino file.....
Wat does this message in the serial monitor mean?....how do I interface an energy meter with the same?

Profile picture for user Kurumi

Kurumi

3 years 2 months ago

In reply to Hi, The serial monitor now… by Jeswin125

Hi, I believe that the…

Hi,

I believe that the watchdog is causing this. Try to disable the watchdog and try again.

BR,
Mikko

Jeswin125

3 years 2 months ago

In reply to Hi, I believe that the… by Kurumi

Hi, I added the following…

Hi,

I added the following code in the beginning of client.ino to disable watchdog

#include "soc/rtc_wdt.h"

void disableWatchdog() {
rtc_wdt_disable();
}

No changes have occurred to the message viewed on the serial monitor.....

Thank you

Jeswin125

3 years 2 months ago

Sir, Due to time limitation…

Sir,

Due to the time limitation I'm facing on this work, is there any other way i could tackle this problem??....
Like change of hardware or something?.....My only goal is to read energy consumption details from a dlms compatible energy meter and transfer these data through an Iot platform like blynk.

Thank you

Profile picture for user Kurumi

Kurumi

3 years 2 months ago

Hi, Our clients are using…

Hi,

Our clients are using your board and I can't understand why this happens.
You can also try with esp8266.

BR,
Mikko

Jeswin125

3 years 2 months ago

Sir, At the beginning when i…

Sir,

At the beginning when i come across ur client.ino file, I encountered with
compilation error: avr/pgmspace.h: no such file in directory .
So trying to solve the issue i searched through the net and found that changing the headerfile name
#include<avr/pgmspace.h> to #include<pgmspace.h>
In the helpers.h file directory solved the compilation error.
And it did solve the error.

Now I'm curious as to if that could have caused these messages in the serial monitor??

Thank you

Jeswin125

3 years 2 months ago

Hi, Can someone please help…

Hi,

Can someone please help me as to why i might have encountered this compilation error
compilation error: avr/pgmspace.h: No such file or directory

Thank you

Profile picture for user Kurumi

Kurumi

3 years 2 months ago

Hi, You are using a…

Hi,

You are using a different board manager. Different boards are using settings, for example different directories. Get the latest version. It will handle also your board.

BR,
Mikko

Jeswin125

3 years 1 month ago

Sir, While using esp8266,…

Sir,

While using esp8266, even when the baud rate was set same on both the devices...i still got garbage messages on the serial monitor...what would cause that?

Thank you

dtrt

3 years 1 month ago

Hi Jeswin125, for me it…

Hi Jeswin125,
for me it looks like you are a beginner with the esp32. And finally there are thousand ways to make something wrong.
I would not expect, that this forum is the best place to learn about the ESP32.
One of them could be the usage of UART1 which uses default pins connected to the flash memory of the board. I switch that to UART2. And I use UART2 for the M-Bus and keep UART0 (Serial) as debugging interface. Receiving garbage could be the wrong serial settings. Do you know yours exactly?

javid123

2 years 9 months ago

in the code , in the void…

in the code , in the void setup() function please replace "Serial1" to "Serial2".
i hope this will solve your problem.

JB2310

1 year 4 months ago

Hello kindly share Hardware…

Hello
kindly share Hardware pin configuration if i will use TTL to RS232 Converter and IR Optical port to communicate with DLMS Energy Meter and also in this code to change LLS and OBIS

  • 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