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. Stop DLMS Meter Reading On ESP32 For Multitasking

Stop DLMS Meter Reading on ESP32 for Multitasking

By mightyChamp , 22 October, 2024
Forums
Gurux.DLMS

We are currently working with the ESP32 in a multitasking setup and are facing an issue with our DLMS meter reading implementation. In certain cases, we need to halt the ongoing DLMS meter reading operation to prioritize other tasks. However, the ESP32 remains stuck in the reading task for approximately 10 seconds before returning control.

Our goal is to immediately interrupt or stop the DLMS reading operation when a GPIO alert interrupt occurs, allowing us to switch to handling other necessary functionality without waiting for the meter reading to complete.

Could you kindly provide guidance or suggest best practices to cancel or stop the DLMS reading task promptly upon receiving the GPIO interrupt?

Thank you in advance for your assistance!

Profile picture for user Kurumi

Kurumi

1 year 7 months ago

Hi, The only way how you can…

Hi,

The only way how you can do this is that you handle the interrupt and if interrupt is set, you don't read more values from the meter.

Halting ongoing read will cause problems. I don't know what is the size of your UART, but I believe that it will be overwritten and that will cause problems when data is missing.

BR,
Mikko

mightyChamp

1 year 7 months ago

Thank you for your response…

Thank you for your response and guidance.

To clarify, our UART buffer size is 4kB. Our objective is to cancel the DLMS reading operation rather than halting it. Once the interrupt-triggered function (which sends data to the server immediately upon GPIO alarm) completes, we will reinitiate the meter reading. Therefore, data loss is not a concern, as we plan to reread the meter once the immediate task is finished.

Could you please advise on a method to achieve this interruption cleanly? Specifically, we’d like to clear associated memory and variables and ensure the current reading operation stops properly without leaving residual data.

Thank you again for your assistance.

Profile picture for user Kurumi

Kurumi

1 year 7 months ago

Hi, I'm sorry, but I can't…

Hi,

I'm sorry, but I can't help with your MCU interrupts. I can help you only with DLMS-specific questions.

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