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. I Got AARQ Failed.

I got AARQ failed.

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 scron123 , 15 March, 2018
Forums
Gurux.DLMS

Hi

I got a DLMS/COSEM-based meter for academic research.
When I tried using "Gurux.DLMS.cpp" to make communication with my meter, I got AARQ failure.
Here is what I saw on raspberry console:

pi@raspberrypi:~/Gurux.DLMS.cpp/GuruxDLMSClientExample/bin $ ./gurux.dlms.client.bin -S /dev/ttyS0
InitializeConnection
AARQRequest failed -3.
pi@raspberrypi:~/Gurux.DLMS.cpp/GuruxDLMSClientExample/bin $ cat trace.txt
<- 07:07:05 7E A0 07 03 21 93 0F 01 7E
-> 07:07:05 7E A0 07 21 03 73 01 40 7E
<- 07:07:05 7E A0 2B 03 21 10 FB AF E6 E6 00 60 1D A1 09 06 07 60 85 74 05 08 01 01 BE 10 04 0E 01 00 00 00 06 5F 1F 04 00 00 1E 1D FF FF C5 E4 7E
-> 07:07:05 7E A0 0C 21 03 97 3E 21 10 00 01 6B 5B 7E

According to meter's document,it is saying that:
"This meter doesn't accept I-frame in HDLC control field,and meter suggest using U-frame."

So, my question is :
"Could I change the control field from I-frame(0x10) to UI-frame(0x13) by some instruction or command?"

Profile picture for user Administrator

Administrator

8 years 2 months ago

I got AARQ failed.

Hi,

Your client or server address is wrong. What meter are you trying to read?

scron123

8 years 2 months ago

I got AARQ failed.

Hi, Gurux Administrator

My meter is made by Taiwan Power Company.

I spent some time on attempt to figure out how to change the control field.
fortunately, I did it.Here is my solution:
1)Open the file "GXDLMS.cpp".(~/Gurux.DLMS.cpp/development/src/GXDLMS.cpp)
2)In the line:821, there is a if-else, like this:
if (p.GetCommand() == DLMS_COMMAND_AARQ)
{
frame = 0x10;
}
else if (p.GetCommand() == DLMS_COMMAND_DATA_NOTIFICATION ||
p.GetCommand() == DLMS_COMMAND_EVENT_NOTIFICATION) {
frame = 0x13;
}
3)Change "frame = 0x10" into "frame = 0x13",like this:
if (p.GetCommand() == DLMS_COMMAND_AARQ)
{
frame = 0x13;//I change 0x10 into 0x13
}
else if (p.GetCommand() == DLMS_COMMAND_DATA_NOTIFICATION ||
p.GetCommand() == DLMS_COMMAND_EVENT_NOTIFICATION) {
frame = 0x13;
}
4)Done. Anyway, my meter dose not accept the I-frame, so the "frame = 0x10" is useless.
This solution is rough, but it work.

Profile picture for user Kurumi

Kurumi

8 years 2 months ago

I got AARQ failed.

Hi,

Can you send a log from the send and received bytes to me by email?

You can get my email address from here:
https://www.gurux.fi/AboutUs

BR,

Mikko

Profile picture for user Kurumi

Kurumi

8 years 2 months ago

AARQ failed.

Hi,
I received your email and checked the data. You must increase authentication level. At the moment you are using Authentication level None and meter expect that you are using authentication Low or High.

BR,
Mikko

scron123

8 years 2 months ago

I got AARQ failed.

Hi Mikko
I increased the authentication level ,but I got "AARQRequest failed 279."
My command line like this:
pi@raspberrypi:~/Gurux.DLMS.cpp/GuruxDLMSClientExample/bin $ ./gurux.dlms.client.bin -S /dev/ttyS0 -a HighGmac
InitializeConnection
AARQRequest failed 279.

Here is the content of trace.txt:
<- 03:38:56 7E A0 07 03 21 93 0F 01 7E
-> 03:38:56 7E A0 07 21 03 73 01 40 7E
<- 03:38:56 7E A0 58 03 21 13 E8 E2 E6 E6 00 60 4A A1 09 06 07 60 85 74 05 08 01 01 A6 0A 04 08 41 42 43 44 45 46 47 48 8A 02 07 80 8B 07 60 85 74 05 08 02 05 AC 12 80 10 67 C6 69 73 51 FF 4A EC 29 CD BA AB F2 FB E3 46 BE 10 04 0E 01 00 00 00 06 5F 1F 04 00 00 1E 1D FF FF 1B 26 7E
-> 03:38:57 7E A0 41 21 03 13 2A 7E E6 E7 00 61 33 A1 09 06 07 60 85 74 05 08 01 01 A2 03 02 01 01 A3 05 A1 03 02 01 0D A4 0A 04 08 20 54 30 15 82 40 95 00 89 07 60 85 74 05 08 02 00 BE 05 04 03 0E 01 0A 4A C5 7E
What does "AARQRequest failed 279." mean?

Besides, I got two questions.
1) I changed the AP-title into "VER00001",and here is what I did in GXDLMSSecureClient.cpp:
CGXDLMSSecureClient::CGXDLMSSecureClient(bool UseLogicalNameReferencing,//called in main
int clientAddress,
int serverAddress,
//Authentication type.
DLMS_AUTHENTICATION authentication,
//Password if authentication is used.
const char* password,
DLMS_INTERFACE_TYPE intefaceType) :
CGXDLMSClient(
UseLogicalNameReferencing,
clientAddress,
serverAddress,
authentication,
password,
intefaceType), m_Cipher("VER00001")//originally it is ABCDEFGH
{
m_Settings.SetCipher(&m_Cipher);
}
However, I saw "A6 0A 04 08 41 42 43 44 45 46 47 48" in AARQ.
Why dose it not change ?

2) My meter suggest that the Application-context-name should be Logical_Name_Referencing_With_Ciphered.
But what instruction should I use in command line to do that ?

Profile picture for user Kurumi

Kurumi

8 years 2 months ago

I got AARQ failed.

Hi,

You need to change system title, authentication and block cipher keys.

CGXDLMSSecureClient cl;
cl.GetCiphering()->SetSystemTitle(...);
cl.GetCiphering()->SetBlockCipherKey(...);
cl.GetCiphering()->SetAuthenticationKey(...);

BR,

Mikko

lofna

6 years 7 months ago

Hi,

Hi,
I am using Sprint 350 established the connection via serial port and got the below
error.
----------------------------------------------------------

InitializeConnection
AARQRequest failed 279.

cat trace.txt

TX: 18:06:48 7E A0 07 03 21 93 0F 01 7E
RX: 18:06:48 7E A0 20 21 03 73 73 98 81 80 14 05 02 02 00 06 02 02 00 07 04 00 00 00 01 08 04 00 00 00 01 6F EF 7E
TX: 18:06:48 7E A0 44 03 21 10 E6 84 E6 E6 00 60 36 A1 09 06 07 60 85 74 05 08 01 01 8A 02 07 80 8B 07 60 85 74 05 08 02 01 AC 0A 80 08 41 42 43 44 30 30 30 31 BE 10 04 0E 01 00 00 00 06 5F 1F 04 00 00 1E 1D FF FF 1D 76 7E
RX: 18:06:48 7E A0 37 21 03 30 6C 7C E6 E7 00 61 29 A1 09 06 07 60 85 74 05 08 01 01 A2 03 02 01 01 A3 05 A1 03 02 01 0D BE 10 04 0E 08 00 06 5F 1F 04 00 00 00 10 02 00 00 07 0F 53 7E
TX: 18:06:48 7E A0 07 03 21 53 03 C7 7E
RX: 18:06:48 7E A0 20 21 03 73 73 98 81 80 14 05 02 02 00 06 02 02 00 07 04 00 00 00 01 08 04 00 00 00 01 6F EF 7E

----------------------------------------------------------
What is this problem, how can i over come this issue. Here i am using usb to serial cable (FTDI).

Thanks,
Lofna

Profile picture for user Kurumi

Kurumi

6 years 7 months ago

In reply to Hi, by lofna

Hi lofna,

Hi lofna,

Please, create a new topic if you have a new question. I'll answer your question there.

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

Who's new

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