WFS_CMD_IDC_READ_RAW_DATA always returns WFS_EXEE_IDC_INVALIDMEDIA event in my application

408 views Asked by At

I'm creating an application using CEN/XFS API and i'm using PIN and IDC modules.

In the first step(after startup/open/register), i want to let user insert it's id-card. So i call WFS_CMD_IDC_READ_RAW_DATA with WFSAsyncExecute command. After this command completed(after: Messages WFS_EXECUTE_COMPLETE event), i expect to have WFS_EXEE_IDC_MEDIAINSERTED event, but i always get WFS_EXEE_IDC_INVALIDMEDIA in my application. What's going on?

Edit: To ensure that the card reader doesn't contain any card inside of it, i also add a checking that checks status of it, if it's status = WFS_EXEE_IDC_MEDIAINSERTED, i reset it(retain all cards) and after that call: WFS_CMD_IDC_READ_RAW_DATA. But again, i always get WFS_EXEE_IDC_INVALIDMEDIA event.

1

There are 1 answers

0
Fagner Souza On

Would be for the best if you could point what version of specitication you are using for CEN\XFS.

According to the document 4 of CEN\XFS specification version CWA15748:

WFS_EXEE_IDC_INVALIDMEDIA: The user is attempting to insert the media in the wrong orientation. The card has not been accepted into the device. The device is still ready to accept a card inserted in the correct orientation.

So, I would check:

  1. Is everthing OK with the card you are using? Have you inserted the card in the correct way?
  2. Is everthing OK with the card reader?
  3. Is everything OK with that SP that you are using? I would probably ask support with the provider.

Besides, check the following: If your application can handle track data and chip data, make sure you are selecting the right flags in the lpwReadData.

Well, if someone needs more background information about cen\xfs development, I would suggest this Playlist: https://www.youtube.com/playlist?list=PL3Sb2aDULGt5Wj6I4KJW526H8cd-vOvgG