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. Connection Is Permanently Rejected No Reason Is Given

Connection is permanently rejected No reason is given

By SmartMeterAndroid, 22 May, 2024
Forums
Gurux DLMS for Android

we are doing the re connection of the meter is getting the following error.

"Connection is permanently rejected No reason is given"

Scenarios :

1. Once open the App and do the connection is successful
2.After kill and relaunch the App and do the connection is getting the Above Error.

Please help how can resolve this error.

Profile picture for user Kurumi

Kurumi

11 months 4 weeks ago

Hi, You have not properly…

Hi,

You have not properly closed the existing connection. You need to wait until inactivity timeout occurs or close the connection when you close the application.

I propose that you close the connection to prevent this error.

BR,
Mikko

SmartMeterAndroid

11 months 4 weeks ago

The following code will do…

The following code will do connect/close process. Please check and correct me if it is wrong. Thanks...

if (media != null) {
if (media.isOpen) {
// Close connection
close()
} else {
//Open connection.
initializeConnection()
}
}

@Throws(java.lang.Exception::class)
private fun close() {
val media = mDevice!!.media
if (media.isOpen) {
/ try {
readDLMSPacket2(mClient!!.releaseRequest())
} catch (e: java.lang.Exception) {
//All meters don't support release. It's OK.
}
val reply = GXReplyData()
readDLMSPacket(mClient!!.disconnectRequest(), reply)
/ media.close()
}
}

Profile picture for user Kurumi

Kurumi

11 months 4 weeks ago

Hi, Some meters expect that…

Hi,

Some meters expect that you must wait for a while before a new connection.

It's hard to say what might be the issue because I don't have your meter. Try to connect with GXDSLMDirector multiple times and if it the connection fails, you need just wait for a while before the new connection.

BR,
Mikko

  • Log in or register to post comments
  • Create new account
  • Reset your password

Hire Us!

Latest Releases

  • Thu, 05/15/2025 - 16:26
    gurux.dlms.c 9.0.2505.1501
  • Wed, 05/14/2025 - 08:30
    gurux.dlms.c 9.0.2505.1401
  • Tue, 05/13/2025 - 10:00
    Gurux.DLMS.Android 2.0.15
  • Fri, 05/09/2025 - 13:03
    Gurux.DLMS.Python 1.0.181
  • Wed, 05/07/2025 - 16:09
    Gurux.DLMS.Android 2.0.14

New forum topics

  • Long reading ends with "Invalid frame ..." error.
  • Push listener example how it works + tcp stream issue
  • Problem with reading energymeter Star DTS27 via GXDLMSDirector
  • Receiver Ready Test Failed
  • Combining several meters' profile generic data into one
More
RSS feed
Privacy FAQ GXDN Issues Contact
Follow Gurux on Twitter Follow Gurux on Linkedin