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. DLMS Server On ESP32

DLMS Server on ESP32

By raedawad, 20 July, 2023
Forums
Gurux DLMS for Android

Dears ;

i am trying DLMS server on ESP32 :
Firmware used : Gurux\GuruxDLMS.c-master\Arduino_IDE\server
On ( gxignore.h ) added -------------------------------------
#define ARDUINO_ARCH_ESP32
-----------------------------------------------------------------------------
Downloads once started results as below :
20/7/2023 8:39:30 AM Failed to load settings from EEPROM. 0
20/7/2023 8:39:30 AM Failed to load settings from EEPROM. 287
20/7/2023 8:39:30 AM Meter started.
20/7/2023 8:39:30 AM Communication speed 9600
20/7/2023 8:39:30 AM Test mode Is ON.
20/7/2023 8:39:30 AM LLS password: Gurux
20/7/2023 8:39:30 AM HLS password: Gurux
20/7/2023 8:39:30 AM saveObjects failed: 287
20/7/2023 8:39:30 AM saveObjects failed: 287
20/7/2023 8:39:30 AM EEPROM size 0
-----------------------------------------------------------------------------
after investigation , for ESP32 EEPROM library we have to

1- Add memory size .
2- EEPROM.begin(EEPROM_SIZE);
3- After each write you have to add commit
2- After each write you have to add commit

On ( server main ) added -------------------------------------
#define EEPROM_SIZE 4096
void setup() {
EEPROM.begin(EEPROM_SIZE);
And after each EEPROM.write (); … added
EEPROM.commit();

Below is the results >>>>>>>>>>
20/7/2023 9:01:44 AM Failed to load settings from EEPROM. 33
20/7/2023 9:01:44 AM Failed to load settings from EEPROM. 260
20/7/2023 9:01:44 AM Meter started.
20/7/2023 9:01:44 AM Communication speed 9600
20/7/2023 9:01:44 AM Test mode Is ON.
20/7/2023 9:01:44 AM LLS password: Gurux
20/7/2023 9:01:44 AM HLS password: Gurux
20/7/2023 9:01:44 AM saveObjects succeeded. Index: 741
20/7/2023 9:01:44 AM Count: 4
20/7/2023 9:01:44 AM saveObjects succeeded. Index: 741
20/7/2023 9:01:44 AM Count: 4
20/7/2023 9:01:44 AM EEPROM size 4096
20/7/2023 9:01:44 AM Server started.
20/7/2023 9:01:44 AM svr_preAction: 7 1.0.99.1.0.255
20/7/2023 9:01:45 AM saveObjects succeeded. Index: 696
20/7/2023 9:01:45 AM Count: 4

>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
can we get what we have to do , since in Arduino Mega work fine !

Profile picture for user Kurumi

Kurumi

2 years 3 months ago

Hi, I believe that you try…

Hi,

I believe that you try to save COSEM objects to the EEPROM and there is not enough space available. What is the MCU EEPROM size?

BR,
Mikko

raedawad

2 years 3 months ago

Hi i have memory , just i…

Hi

ESP32 MCU don't have internal EEPROM , using External Flash Memory ,
at the moment the area used for NVS - Non Voltatile Storage ( 5KB )

just i found ESP32 using 32bit MU , and Arduino 8bit MU >> i am trying to find what i have to change !

shall i uncomment : #define GX_DLMS_BYTE_BUFFER_SIZE_32

do you have any suggestion ?

Profile picture for user Kurumi

Kurumi

2 years 2 months ago

Hi, You don't need to change…

Hi,

You don't need to change anything. If you select "File" and "Preferences", what is the "Additional Boards Manager URS" that you are using?

BR,
Mikko

  • Create new account
  • Reset your password

Hire Us!

Latest Releases

  • Wed, 10/29/2025 - 08:51
    gurux.dlms.c 9.0.2510.2901
  • Thu, 10/16/2025 - 09:59
    gurux.dlms.java 4.0.83
  • Wed, 10/08/2025 - 10:21
    gurux.dlms.c 9.0.2510.0801
  • Fri, 09/26/2025 - 10:02
    gurux.dlms.cpp 9.0.2509.2601
  • Fri, 09/26/2025 - 09:45
    gurux.dlms.c 9.0.2509.2601

New forum topics

  • Guidance on using the source codes
  • How to get/convert user readable format data from readRowsByRange
  • Insufficient memory to continue the execution of the program.
  • The client instance code failed to connect to the electricity meter for authentication
  • Unable to Release Request when closing connection with meter.
More
RSS feed
Privacy FAQ GXDN Issues Contact
Follow Gurux on Twitter Follow Gurux on Linkedin