How to communicate with the SIM card in the external SIM card slot of the surface pro9 device?

junzilan 0 Reputation points
2023-10-25T03:14:19.5433333+00:00

I want to use the surface pro9 device to access the SIM card in the external SIM card slot. After inserting the card, the device can log in to the 5G network.

In my application, I can list Microsoft UICC ISO card readers. Resetting can return the correct ATR information for this SIM card.

When I want to transfer the apdu command: 00a40004023f00 to the card. Functional interface: 'SCardTransmit' returned error code 0x57

Is there any way to send commands to the card?

Windows API - Win32
Windows API - Win32
A core set of Windows application programming interfaces (APIs) for desktop and server applications. Previously known as Win32 API.
2,476 questions
{count} votes

2 answers

Sort by: Most helpful
  1. Tong Xu - MSFT 2,116 Reputation points Microsoft Vendor
    2023-10-25T03:46:57.69+00:00

    Hi, @junzilan.
    Welcome to Microsoft Q&A!

    Please set the type LONG of return value for SCardTransmit. If anything wrong, it will return the value from this list.

    In order to send commands to the card, you can refer to windows-classic-samples.
    If you want to test it, you might need to add the Winscard.lib for APIs (SCardTransmit, SCardEstablishContext, etc.) and initialize the pointer.

    You're so kind of providing a reproducible minimal sample.

    Thank you.

    Tong


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments

  2. Deleted

    This answer has been deleted due to a violation of our Code of Conduct. The answer was manually reported or identified through automated detection before action was taken. Please refer to our Code of Conduct for more information.


    Comments have been turned off. Learn more