Invalid Command for L&T meter - Java RS232

7 posts / 0 new
Last post
Remith
Remith's picture
Invalid Command for L&T meter - Java RS232

Hi,
I am facing issue with reading/writing L&T meter. After authentication, for any requests, its giving Invalid Command exception. Everything working in GXDLMSDirector.

Just for example - Relay Disconnection

GXDLMSDisconnectControl relay = new GXDLMSDisconnectControl("0.0.96.3.10.255");
byte[][] data = relay.remoteDisconnect(com.dlms);
GXReplyData reply = new GXReplyData();
com.readDataBlock(data, reply);

java.lang.IllegalArgumentException: Invalid Command.

TX: 7E A0 37 03 61 54 28 B9 E6 E6 00 DB 08 4C 54 43 4C 49 45 4E 54 20 30 00 00 00 DB 35 76 8A 27 CE AC 92 2F 7F 7F 99 F1 1A 15 89 67 7F 71 56 28 2D 1E AD DF 15 36 7E 59 1A 7E

RX: 7E A0 37 03 61 54 28 B9 E6 E6 00 DB 08 4C 54 43 4C 49 45 4E 54 20 30 00 00 00 DB 35 76 8A 27 CE AC 92 2F 7F 7F 99 F1 1A 15 89 67 7F 71 56 28 2D 1E AD DF 15 36 7E 59 1A 7E 7E A0 23 61 03 74 77 CF E6 E7 00 2E 15 30 00 00 00 F2 18 95 4A 60 07 3E 75 8E D0 71 BB F2 5E 61 9E 11 6A 33 7E

<!-- Decrypt data:
TX: C3 01 C1 00 46 00 00 60 03 0A FF 01 01 0F 00
RX: C3 01 C1 00 46 00 00 60 03 0A FF 01 01 0F 00

Both looks same.

Kindly help me to find out a solution for this.

Remith
Remith's picture

Hi..
Can you check the above question ?

Regards,
REMITH
remith@bcits.co.in

Kurumi
Kurumi's picture

Hi,

I'm sorry for the slow reply. I have missed this for some reason.

I believe that the problem is that the optical probe is echoing send data. You need to remove it.

BR,
Mikko

BR,
Mikko

________________________________________
Mikko Kurunsaari
Gurux Ltd
http://www.gurux.fi

Remith
Remith's picture

Hi Mikko,
I have checked the optical probe. Its working without any issues. Even we are able to read with GXDLMSDirector.

This is one more log for reading association . Getting same Invalid Command.

TX: 16:21:33.511 7E A0 20 03 41 32 AB 08 E6 E6 00 C8 12 20 00 00 02 DA 04 9B 1B DF D1 8E 6D 5D 0B 29 AB 35 79 50 5E 7E
RX: 16:21:33.590 7E A0 17 41 03 52 66 B6 E6 E7 00 2E 09 20 00 00 03 AD 81 32 D1 5E AC B5 7E

Encrypted
---------------
TX: C0 01 C1 00 0F 00 00 28 00 00 FF 02 00

RX:
<HDLC len="16" >
<TargetAddress Value="20" />
<SourceAddress Value="1" />
<FrameType Value="52" />
<PDU>
<glo_GloConfirmedServiceError Value="20000003AD8132D15E" />
</PDU>
</HDLC>

Kindly check this..

Regards,
REMITH
remith@bcits.co.in

Kurumi
Kurumi's picture

Hi,

GXDLMSDirector is removing the echo. If you check the trace that you have added, you will find out that TX is coming before RX.

//ECHO starts.
RX: 7E A0 37 03 61 54 28 B9 E6 E6 00 DB 08 4C 54 43 4C 49 45 4E 54 20 30 00 00 00 DB 35 76 8A 27 CE AC 92 2F 7F 7F 99 F1 1A 15 89 67 7F 71 56 28 2D 1E AD DF 15 36 7E 59 1A 7E
//ECHO ends.
//Reply starts.
7E A0 23 61 03 74 77 CF E6 E7 00 2E 15 30 00 00 00 F2 18 95 4A 60 07 3E 75 8E D0 71 BB F2 5E 61 9E 11 6A 33 7E
//Reply ends.

Your meter is using authentication, but there is not enough data in the reply. the Authentication tag is missing. Make sure that you can connect using authentication. It might be that your meter is supporting only AuthenticationEncryption. Returned data from the meter is invalid.

BR,
Mikko

________________________________________
Mikko Kurunsaari
Gurux Ltd
http://www.gurux.fi

Remith
Remith's picture

Hi Mikko,
You can leave the first trace. There I was using old Gurux Library. There might be some printing problem from my side.
Now I have imported the new Gurux Java library and ran with the L&T settings.
Below is the trace. Getting same Invalid Command. I dont see any repated echo in this case.
I have tried all scenarios to fix this. Even tried with diffrent gurux maven versions.

Meter name is L&T Aurora
https://corpwebstorage.blob.core.windows.net/media/39386/single-phase-sm...

New Trace

TX: 10:06:16.132 7E A0 20 03 41 32 AB 08 E6 E6 00 C8 12 20 00 00 03 05 3F AD 29 15 66 CD DB EF AE 48 0F 72 2C 8D B6 7E
RX: 10:06:16.201 7E A0 17 41 03 52 66 B6 E6 E7 00 2E 09 20 00 00 03 E4 F9 AE 72 17 FF EC 7E

Decrypt data:
TX: C0 01 C1 00 46 00 00 60 03 0A FF 02 00
RX: <HDLC len="16" >
<TargetAddress Value="20" />
<SourceAddress Value="1" />
<FrameType Value="52" />
<PDU>
<glo_GloConfirmedServiceError Value="20000003E4F9AE7217" />
</PDU>
</HDLC>

Regards,
REMITH
remith@bcits.co.in

Kurumi
Kurumi's picture

Hi,

Check my previous reply after the echo. I believe that is the reason.

BR,
Mikko

________________________________________
Mikko Kurunsaari
Gurux Ltd
http://www.gurux.fi