command A0 Error please help

Oct 7, 2010 at 12:32 AM

Hi  i have problem for command   A0

this is log , anyone have solution for this problem.

Client: 192.168.1.160:4035
Request: 1909A01002ZA6068D780775E6DCZ
Implementor to Nothing
Parsing header and code of message 1909A01002ZA6068D780775E6DCZ...
Client disconnected.
Searching for implementor of A0...
Found implementor ThalesSim.Core.HostCommands.BuildIn.GenerateKey_A0, instantiating...
Calling AcceptMessage()...
Exception while processing message
System.ArgumentOutOfRangeException: Index and length must refer to a location within the string.
Parameter name: length
   at System.String.InternalSubStringWithChecks(Int32 startIndex, Int32 length, Boolean fAlwaysCopy)
   at ThalesSim.Core.Message.XML.MessageParser.Parse(Message msg, MessageFields fields, MessageKeyValuePairs& KVPairs, String& result)
   at ThalesSim.Core.HostCommands.BuildIn.GenerateKey_A0.AcceptMessage(Message msg)
   at ThalesSim.Core.ThalesMain.WCMessageArrived(WorkerClient sender, Byte[]& b, Int32 len)
Disconnecting client.
Calling Terminate()...
Implementor to Nothing
Client disconnected.

Coordinator
Oct 7, 2010 at 8:28 AM

Try setting the DoubleLengthZMKs parameter to False and send the command again.

Oct 8, 2010 at 3:29 PM

Yes i try using double length not problem .

1909A01002U2FCF3C5C3EFCB5730544472B59A39E41U

=== [A0], starts 22:28:54.687 =======
[Key,Value]=[Key Scheme LMK,U]
[Key,Value]=[Key Scheme ZMK,U]
[Key,Value]=[Key Type,002]
[Key,Value]=[Mode,1]
[Key,Value]=[ZMK,2FCF3C5C3EFCB5730544472B59A39E41]

Key generated (clear): 1C8CB9C8AD796E20752A51F12FF2D9D0
Key generated (LMK): U571CDB1A9024562CD84EA42AD91CE4CF
Check value: 9BD1F1
=== [A0],   ends 22:28:54.719 =======

Coordinator
Oct 8, 2010 at 5:49 PM

That's what the DoubleLengthZMKs parameter works. If you set it to False, you can use single-length ZMKs only. Otherwise, you cannot use single-length ZMKs at all.

Oct 8, 2010 at 11:16 PM
Hi nickntg ,

i'm sory i don't undestand . how to set the False

Thanks
IKetutG
On Sat, Oct 9, 2010 at 12:49 AM, nickntg <notifications@codeplex.com> wrote:

From: nickntg

That's what the DoubleLengthZMKs parameter works. If you set it to False, you can use single-length ZMKs only. Otherwise, you cannot use single-length ZMKs at all.

Read the full discussion online.

To add a post to this discussion, reply to this email (thalessim@discussions.codeplex.com)

To start a new discussion for this project, email thalessim@discussions.codeplex.com

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe on CodePlex.com.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at CodePlex.com


Coordinator
Oct 9, 2010 at 8:55 AM

Have a look at this wiki article that explains the parameters and where you can find them.

Feb 11, 2011 at 8:48 AM

Hi,

Sorry to bump this thread. I had a problem with the same command, and I want to know if values after the LMK key scheme are allowed to be optional, since I believe this maps to the KG console command and you're allowed to skip entering values after you input the LMK key scheme. In case it helps, here is my log:

Client: 127.0.0.1:3284
Request: A00001U 
Parsing header and code of message A00001U ...
Searching for implementor of A0...
Found implementor ThalesSim.Core.HostCommands.BuildIn.GenerateKey_A0, instantiating...
Calling AcceptMessage()...
Exception while processing message
System.ArgumentOutOfRangeException: Index and length must refer to a location within the string.
Parameter name: length
   at System.String.InternalSubStringWithChecks(Int32 startIndex, Int32 length, Boolean fAlwaysCopy)
   at System.String.Substring(Int32 startIndex, Int32 length)
   at ThalesSim.Core.Message.XML.MessageParser.Parse(Message msg, MessageFields fields, MessageKeyValuePairs& KVPairs, String& result)
   at ThalesSim.Core.HostCommands.BuildIn.GenerateKey_A0.AcceptMessage(Message msg)
   at ThalesSim.Core.ThalesMain.WCMessageArrived(WorkerClient sender, Byte[]& b, Int32 len)

 

Thanks in advance.

Coordinator
Feb 11, 2011 at 12:55 PM

I've tested the command itself by sending A00001U and the simulator responds as expected. I think the problem may be with the 4 characters preceding the command body. The simulator expects 4 ASCII characters there (4 bytes). Are you sure you're sending that? The latest version of the simulator also allows you to view a hex dump of the messages exchanged when you switch to the maximum logging level. Can you do that and copy-paste the message dumps so I can have a look?

Feb 11, 2011 at 1:11 PM

here it is:

01 02 03 04 41 30 30 30 | A000
30 31 55 1C 20 1C       | 01U 

It might be the bytes after the U that's causing the trouble. I'm trying to use Andy Orrock's method of using jPOS's FSDMsg to create the messages to the simulator.

Feb 11, 2011 at 1:31 PM

Hello Nick,

Based on what you said, I removed the "optional" fields from my schema descriptor (aka message ends with the U), and no field separators are added at the end, and it works. Thankee kindly.

Coordinator
Feb 11, 2011 at 1:49 PM

That might work in the way you use A0 but it won't work if you need to use Mode 1. After seeing the trace, I think that the problem are the trailing 0x1C 0x20 0x1C characters. If that's a standard trailer, you can change the simulator's configuration so that it expects those characters.