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. Unable To Release Request When Closing Connection With Meter.

Unable to Release Request when closing connection with meter.

By saraf_kshitiz, 27 October, 2025
Forums
Gurux DLMS for Android

Hi Mikko Sir, 

As gurux windows application seamlessly disconnects and reconnects to the meter everytime by reading its invocation counter, to implement the same in the android component is a bit challenging. As we do not want to save the invocation counter of a particular meter in Android Local Storage, we want the app to read the counter from the meter and make secured connection everytime it is opened. At first the app reads it from the meter and updates inside code, but after closing the connection, removing the app and reopening it, the app is unable to read invocation counter from the meter as the meter seems busy, however, a release request is being sent to it in close() method still, the meter is not released for about 1.5-2 minutes and after waiting for that much time only, we can reopen connection with the meter. 

/**
 * Close connection to the meter.
 */
public void close() throws Exception {
    IGXMedia media = gxDevice.getMedia();
    if (media.isOpen()) {
        try {
            readDLMSPacket2(dlmsClient.releaseRequest());
        } catch (Exception e) {
            // All meters don't support release. It's OK.
            e.printStackTrace();
        }
        GXReplyData reply = new GXReplyData();
        readDLMSPacket(dlmsClient.disconnectRequest(), reply);
        media.close();
    }
}

Not able to find any help regarding this anywhere. Please guide. 

Thanks, 

Kshitiz 

Profile picture for user Kurumi

Kurumi

1 week 5 days ago

Hi Kshitiz, Some meters can…

Hi Kshitiz,

Some meters can't handle release.
Try to ignore the release if security is not used. It helps with some meters.

if (client.getCiphering.getSecurity() != Security.NONE.getValue())
{
///Release.
}

saraf_kshitiz

1 week 4 days ago

Hi Mikko Sir, I believe…

Hi Mikko Sir,

I believe that the meters I've been working on support release as there is no connection issue while using gurux windows app on the same meters.
I need to achieve the same in the android app. Please provide any references for studying.

Thanks,
Kshitiz

Profile picture for user Kurumi

Kurumi

1 week 4 days ago

Dear Kshitiz, This is…

Dear Kshitiz,

This is exactly how the Windows application does it.

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