I am trying to reconnect with meter but not able to make a connection success.
To reconnect, First I am using a close() method and then use the initializeConnection() method.
Getting error: GXDLMSConfirmedServiceError: ServiceError Read exception. Service UNSUPPORTED
It looks that connection is not closed properly. Can you please help us in this.
private void close() throws Exception {
IGXMedia media = mDevice.getMedia();
if (media.isOpen()) {
try {
readDLMSPacket2(mClient.releaseRequest());
}
catch(Exception e) {
//All meters don't support release. It's OK.
}
GXReplyData reply = new GXReplyData();
readDLMSPacket(mClient.disconnectRequest(), reply);
media.close();
}
}
Hi, Some meters require that…
Hi,
Some meters require that you need to wait for a while before reconnecting. Try to wait a few seconds and then try to connect again.
You can also try to reconnect with GXDLMSDirector.
BR,
Mikko