Bulk Update Script failure

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Bulk Update Script failure

Jump to solution
2,819 Views
huckym
Contributor II

I received a bulk update script from my nxp rep to update JCOP4.5 add-on modules on my D600 card. I am hitting the following error on trying to run this bulk update via jcshell. Any clues?

Welcome to NXP JCShell
(c) 2021 NXP Semiconductors
------------------------------------------------------------------------------

- /term PCSC
> /card
Warning: Usage of /atr with no preceding of /reset is deprecated. /reset is invoked.
ATR: 3BEA00FF8131FE000031C173C84000009000C0
ATR: 
         T = 1                   
cm> '/Users/huckym/Downloads/JCOP_0002B21F624F2F60D3D58ECE_4K-bu-0002B19F6B9F7859BE3FAB20.jcsh'
TRIGGER
=> 9fff 
APDU #1 / 92 
jcshell: /Users/huckym/Downloads/JCOP_0002B21F624F2F60D3D58ECE_4K-bu-0002B19F6B9F7859BE3FAB20.jcsh[13]: Error code: -8 (Failed (no diagnosis))
jcshell: /Users/huckym/Downloads/JCOP_0002B21F624F2F60D3D58ECE_4K-bu-0002B19F6B9F7859BE3FAB20.jcsh[13]: Command failed: Manage channel command not allowed, use openLogicalChannel()
jcshell: /Users/huckym/Downloads/JCOP_0002B21F624F2F60D3D58ECE_4K-bu-0002B19F6B9F7859BE3FAB20.jcsh [13] : DEFUN: Check Execution

 

0 Kudos
1 Solution
2,758 Views
huckym
Contributor II

ok so managed to fix the problem. I had to setup windows as a dual boot (via bootcamp) instead of a virtual-machine on my macbook. Without that /list-readers don't enlist any readers although /term PCSC would still work fine. Bulk update needs to connect via /term SCComm:1 in order to successfully update.

The final stack that worked for me was this:
X86 macbook pro + ACS1252u card-reader
windows 10 home 64-bit dual-boot (via bootcamp)
Adoptium JDK 17

I was fortunate enough to have an older x86 based mac lying around to be able to setup dual-boot via bootcamp. As you are well aware, x86-based macbook are out of production now so this is a pretty serious restriction. Kindly have your engineering team extend support for a more reasonable development setup 

View solution in original post

0 Kudos
10 Replies
2,759 Views
huckym
Contributor II

ok so managed to fix the problem. I had to setup windows as a dual boot (via bootcamp) instead of a virtual-machine on my macbook. Without that /list-readers don't enlist any readers although /term PCSC would still work fine. Bulk update needs to connect via /term SCComm:1 in order to successfully update.

The final stack that worked for me was this:
X86 macbook pro + ACS1252u card-reader
windows 10 home 64-bit dual-boot (via bootcamp)
Adoptium JDK 17

I was fortunate enough to have an older x86 based mac lying around to be able to setup dual-boot via bootcamp. As you are well aware, x86-based macbook are out of production now so this is a pretty serious restriction. Kindly have your engineering team extend support for a more reasonable development setup 

0 Kudos
1,573 Views
msjcard
Contributor III

You solved the first problem - that you need to use /term SCComm:1 vs /term PCSC to run the bulk update script, but there are actually two problems you encountered.  The second one being the missing links for JNISCCommWrapper_64.dll

The second problem here occurs because, that for reasons only known to the programmer, JNISCCommWrapper_64.dll and its ilk are  linked against the 2010 C++ Redistributables and those are not installed by default on a Windows 10 machine.  When you moved to the MAC, chances are your MAC had that installed at some point in the past by some other program and it's been kept up to date since.

This problem exists at least as late at jcshell version 6.9.0.12.

The redist can be be downloaded from https://www.microsoft.com/en-US/download/details.aspx?id=26999 or search for microsoft c++ redistributable 2010.  It's also possible that other NXP software will require later but also obsolete redist files.  Current redist installed by default on windows 10 at least is of the 2015-2022 version.

If you find yourself moving to a new windows system, (as I did) make sure you install this redist.

0 Kudos
2,805 Views
huckym
Contributor II

Thanks for the information but using SCComm:1 is throwing a different error. Not sure what dependent library it is missing. I have installed the
Visual C++ Redistributable for Visual Studio 2012 Update 4, as mentioned in the JCShell user manual.

Welcome to NXP JCShell
(c) 2021 NXP Semiconductors
------------------------------------------------------------------------------

enabling modes echo and trace...
- /term SCComm:1
jcshell: Cannot init/open terminal: java.lang.RuntimeException: Found wrapper DLL (C:\Users\huckym\jcshell\JCShell\os\win32\x86\JNISCCommWrapper_64.dll) not valid: C:\Users\huckym\jcshell\JCShell\os\win32\x86\JNISCCommWrapper_64.dll: Can't find dependent libraries

 

0 Kudos
2,801 Views
Kan_Li
NXP TechSupport
NXP TechSupport

Hi @huckym ,

 

Would you please tell me more info such as:

what version of :

  • JCShell
  • Windows
  • Java

Thanks for your patiene!

 

Have a great day,
Kan


-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!
- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

0 Kudos
2,799 Views
huckym
Contributor II

- version
current version is 6.1.0.12 [1]
build timestamp is 16-02-2021 14:12:16

openjdk version "17.0.5" 2022-10-18
OpenJDK Runtime Environment Temurin-17.0.5+8 (build 17.0.5+8)
OpenJDK 64-Bit Server VM Temurin-17.0.5+8 (build 17.0.5+8, mixed mode, sharing)

Windows 11 64bit

0 Kudos
2,785 Views
huckym
Contributor II
This is a blocker for our Q1 launch so I am starting a private support ticket to try and escalate.
0 Kudos
2,778 Views
Kan_Li
NXP TechSupport
NXP TechSupport

Hi @huckym ,

 

Thanks for the information! The workaround should be just to install the 32 bit version of the JAVA JDK:

• Install Oracle JAVA JDK 1.8 32 bit version
• Set JAVA Home to JDK 1.8 32 bit version

 

Please kindly let me know if the problem is still there.

 

Have a great day,
Kan


-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!
- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

0 Kudos
2,761 Views
huckym
Contributor II

Thanks for the suggestion but it is still the same error except now about the 32 bit dll

Welcome to NXP JCShell
(c) 2021 NXP Semiconductors
------------------------------------------------------------------------------

enabling modes echo and trace...
- /list-readers
----------------------
Name ( Type )
----------------------
- /term SCComm:1
jcshell: Cannot init/open terminal: java.lang.RuntimeException: Found wrapper DLL (C:\Users\huckym\jcshell\JCShell\os\win32\x86\JNISCCommWrapper_32.dll) not valid: C:\Users\huckym\jcshell\JCShell\os\win32\x86\JNISCCommWrapper_32.dll: Can't find dependent libraries
- /term PCSC
Note: /term PCSC is deprecated. PCSC is supported only for backward compatibility.
      Instead use supported '/term SCComm:1'.

      Limited support for Logical channels on PCSC terminals.
--Opening terminal
Session ID: 158BB950A12D42BA7EC6267135DA9AAF
> /card
Warning: Usage of /atr with no preceding of /reset is deprecated. /reset is invoked.
ATR: 3B8A80010031C173C8400000900090
ATR:
         T = 0
         T = 1
 => 00 A4 04 00 00                                     .....
 (30663 usec [SYS])
 <= 6F 10 84 08 A0 00 00 01 51 00 00 00 A5 04 9F 65    o.......Q......e
    01 FF 90 00                                        ....
Status: No Error
cm> get-cplc
 => 80 CA 9F 7F 00                                     .....
 (20766 usec [SYS])
 <= 9F 7F 2A 47 90 D6 00 47 00 00 00 00 00 22 22 00    ..*G...G....."".
    00 01 95 64 73 00 00 00 00 00 00 00 00 01 33 02    ...ds.........3.
    30 30 30 30 31 00 00 00 00 00 00 00 00 90 00       00001..........
Status: No Error
  IC Fabricator                      : 4790
  IC Type                            : D600
  Operating System ID                : 4700
  Operating System release date      : 0000
  Operating System release level     : 0000
  IC Fabrication Date                : 2222 (10.8.20X2)
  IC Serial Number                   : 00000195
  IC Batch Identifier                : 6473
  IC Module Fabricator               : 0000
  IC Module Packaging Date           : 0000
  ICC Manufacturer                   : 0000
  IC Embedding Date                  : 0000
  IC Pre-Personalizer                : 0133
  IC Pre-Perso. Equipment Date       : 0230 (17.8.20X0)
  IC Pre-Perso. Equipment ID         : 30303031
  IC Personalizer                    : 0000
  IC Personalization Date            : 0000
  IC Perso. Equipment ID             : 00000000

Something else I am noticing that may help debug. /list-readers on windows (10 or 11) shows an empty list but /term PCSC connects fine to the ACS1252 reader.  On osx, /list-readers does enlist properly but then /term SCComm:1 isn't an option there

- /list-readers
----------------------
Name ( Type )
----------------------
ACS ACR1252 Dual Reader ( PCSC )
- /term PCSC:1
jcshell: Cannot init/open terminal: com.nxp.id.jc.terminal.PCSCJCTerminal
- /term SCComm:1
jcshell: SCComm is supported only on Windows platform SCComm:1
jcshell: Try /term PCSC for PCSC Readers on linux/Mac.

 

Taking a step back:
1) are we sure that my bulk update failure is definitely because I am not connecting via /term SCComm:1 or is that just one of the many possible causes including an incorrect BU script? are we are just doing a trial-and-error?

2) Can you tell me the exact stacks of OS,JDK,card-reader that is known to work for your bulk-update process? 

 

 

0 Kudos
1,475 Views
msjcard
Contributor III

1) are we sure that my bulk update failure is definitely because I am not connecting via /term SCComm:1 or is that just one of the many possible causes including an incorrect BU script? are we are just doing a trial-and-error?

Yes - one of the things that seems to be happening in the BU script is the use of  APDUs that look like a MANAGE CHANNEL apdu.  They aren't isn't, but the underlying Java PCSC code doesn't allow you to use that APDU directly and filters out pretty much anything with an INS of 0x70.  (e.g. all those APDUs with 4F70 at the beginning) You need to call javax.smartcardio.Card.openLogicalChannel() to do that with the PCSC code, which wouldn't make any sense for this script.

And you're going to need to do this on a Windows box, because SCComm is not implemented on anything but Windows.

0 Kudos
2,808 Views
Kan_Li
NXP TechSupport
NXP TechSupport

Hi @huckym ,

 

This issue relates to the lower layers of JCShell when /term is used.  Not quire figured out what on the PC is interfering with it but using /term SCComm:1 works.

 

The following should work when using JCShell:

 

/term SCComm:1

/atr

/reset

/card

 

Then run the bulk update script.

 

Hope that helps,

 

Have a great day,
Kan


-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!
- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

0 Kudos