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. Forums
  3. Android Libary - No Response For Association Request

Android Libary - No response for association request

Forum Rules

Before commenting read Forum rules

Don't comment the topic if you have a new question.

You can create a new topic selecting correct category from Gurux Forum and then create a new topic selecting "New Topic" from the top left.

By Mohanraj , 28 December, 2020
Forums
General discussion

Hi Mikko,

we are using android library. library works with non ciphered meter whereas with ciphered meter we are not getting response for assocation request. please correct the flow if we are doing mistake. attached tx and rx log along with code snippet.

client = new GXDLMSSecureClient(true, 16, 1, Authentication.NONE, "", InterfaceType.HDLC);
client.getCiphering().setSecurity(Security.NONE);
client.setAuthentication(Authentication.NONE);
command_obtained = client.snrmRequest();
for (byte[] it : client.aarqRequest()) {
command_obtained = Arrays.copyOfRange(it, 0, it.length);
break;
}
byte[][] tempS21 = client.read(readInvocationCounter, 2);

for (byte[] it : tempS21) {
command_obtained = Arrays.copyOfRange(it, 0, it.length);
break;
}
command_obtained = client.disconnectRequest();

client.setUseLogicalNameReferencing(true);
client.setInterfaceType(InterfaceType.HDLC);
client.setClientAddress(48);
client.setServerAddress(1);
client.setAuthentication(Authentication.HIGH);
client.setPassword("0000000001035820");
client.getCiphering().setSecurity(Security.AUTHENTICATION_ENCRYPTION);
try {
client.getCiphering().setSystemTitle("ABCDEGFH".getBytes("ASCII"));
} catch (UnsupportedEncodingException e) {
e.printStackTrace();
}
client.getCiphering().setBlockCipherKey(GXCommon.hexToBytes("31323334353637383930313233343536"));
client.getCiphering().setAuthenticationKey(GXCommon.hexToBytes("31323334353637383930313233343536"));
client.getCiphering().setInvocationCounter((Long) invocationCounterValueDLMS++);
System.out.printf("invocationCounterValueDLMS is %d\n", invocationCounterValueDLMS);
client.setAutoIncreaseInvokeID(true);
for (byte[] it : client.getApplicationAssociationRequest()) {
command_obtained = Arrays.copyOfRange(it, 0, it.length);
break;
}

TX:- 7EA0070321930F017E
RX:- 7EA01E210373C37A818012050180060180070400000001080400000001533B7E
TX:- 7EA02B032110FBAFE6E600601DA109060760857405080101BE10040E01000000065F1F0400001E1DFFFFC5E47E
RX:- 7EA0372103306C7CE6E7006129A109060760857405080101A203020100A305A103020100BE10040E0800065F1F040000001002300007B26C7E
TX:- 7EA0190321326FD8E6E600C001C1000100002B0103FF0200B0AA7E
RX:- 7EA0152103525D8AE6E700C401C10006AC14979DB9D07E
TX:- 7EA00703215303C77E
RX:- 7EA01E210373C37A818012050180060180070400000001080400000001533B7E
TX:- 7EA00703619369477E
RX:- 7EA01E610373B57C818012050180060180070400000001080400000001533B7E
TX:- 7EA06B0361102AFFE6E600605DA109060760857405080103A60A040841424344454746488A0207808B0760857405080202AC1280106F26562E1E69756D403E23012D274200BE230421211F30AC14979D958ABBBFF3C608132828F2BABD41CEBE24CB4ACEFA1F96ABFF3FCF067E
RX:- 7EA077610330AD6CE6E7006169A109060760857405080103A203020100A305A10302010EA40A04084C4E54393038333488020780890760857405080202AA1280106162636465666768696A6B6C6D6E6F70BE230421281F3000000F3D7872A8EDEE22E91DA8630D97C5D0970D2A960526FCA9C41C2FE303457E
TX: - 7EA02C036132ACBCE6E600C81E30AC14979D548B7ABFF4991777292813A542CCCBE4EBF039FE723215F4F3A4587E

Thanks
Mohanraj

Profile picture for user Kurumi

Kurumi

5 years 5 months ago

Hi,

Hi,

You don't call getApplicationAssociationRequest after you parse the AARE reply. Add this:
// Parse reply.
mClient.parseAareResponse(reply.getData());
reply.clear();
// Get challenge Is HLS authentication is used.
if (mClient.getIsAuthenticationRequired()) {
for (byte[] it : mClient.getApplicationAssociationRequest()) {
readDLMSPacket(it, reply);
}
mClient.parseApplicationAssociationResponse(reply.getData());
}

BR,
Mikko

Mohanraj

5 years 4 months ago

In reply to Hi, by Kurumi

Hi Mikko,

Hi Mikko,

It working now after getting the latest library.

Thanks
Mohanraj

  • 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

Who's new

  • Tuanhgg
  • Adel
  • charnon
  • Paddles
  • Miguel Ángel
RSS feed
Privacy FAQ GXDN Issues Contact
Follow Gurux on Twitter Follow Gurux on Linkedin