Card reader model: Putian CPIDMR02/TG ID card reader
SDK version: 20200924
Call process:
1. Manual card reading
(1) Call IdcrInitialize to initialize the development kit when the program starts.
(2) The user executes the card reading operation.
(3) Call IdcrOpen to open the port.
(4) Call IdcrValidate to verify the card. Or call IdcrFindCard to find the card, IdcrSelectCard to select the card and IdcrReadCard to read the card to complete the card verification step.
(5) Call IdcrGetIDInfoW/IdcrGetIDInfoA to obtain ID card information according to the type of certificate, call IdcrGetPRInfoW/IdcrGetPRInfoA to obtain permanent residence permit information for foreigners, or call IdcrGetHMTInfoW/IdcrGetHMTInfoA to obtain residence permit information for Hong Kong, Macao and Taiwan residents.
(6) Call IdcrClose to close the port.
(7) Steps (2) to (6) can be executed multiple times.
(8) Call IdcrFinalize to release the development package when the program exits.
2. Automatic card reading
(1) Call IdcrInitialize to initialize the development kit when the program starts.
(2) The program sleeps for half a second.
(3) If the port is not opened, call IdcrOpen to open the port.
(4) Call IdcrFindCard to find the card. If there is an error (if error code 1 occurs, call IdcrClose to close the port first) and return to step (2).
(5) Call IdcrSelectCard to select the card. If there is an error, return to step (2).
(6) Call IdcrReadCard to read the card. If there is an error, return to step (2).
(7) Call IdcrGetIDInfoW/IdcrGetIDInfoA to obtain ID card information according to the type of certificate, call IdcrGetPRInfoW/IdcrGetPRInfoA to obtain permanent residence permit information for foreigners, or call IdcrGetHMTInfoW/IdcrGetHMTInfoA to obtain residence permit information for Hong Kong, Macao and Taiwan residents.
(8) Return to step (2) to continue reading the card.
(9) Call IdcrClose to close the port.
Call IdcrFinalize to release the development package when the program exits.
Precautions:
1. When using the example, please put the four files cardapi7.dll, sdtapi.dll, WltRS.dll, and license.dat in the same path. This path can be different from the path where the application is located.
2. The installation program should copy the license.dat to the root directory of the C disk during the running process.
3. If 0x118 is returned after calling IdcrInitialize, that is, "failed to create the license file", please manually copy the license.dat to the root directory of the C drive.
4. Due to the 64-bit photo decoding library is not stable yet. This development kit currently only provides 32-bit version. The "Target Platform" must be set to "x86" when developing a .net application. 32-bit JDK and JRE must be used when developing Java applications.
error code:
error code |
describe |
0x00 |
Successful operation |
0x01 |
Failed to open port |
0x02 |
PC receiving data timed out |
0x03 |
PC judgment checksum error |
0x05 |
SAM serial port is not available |
0x10 |
SAM judgment checksum error |
0x11 |
SAM receiving data timed out |
0x21 |
Error receiving command from service terminal |
0x23 |
ultra vires operation |
0x24 |
unrecognized error |
0x31 |
Card authentication device failed |
0x32 |
Implement authentication card failed |
0x33 |
Information validation error |
0x34 |
The card has not been found yet, and the operation on the card cannot be performed |
0x37 |
Fingerprint information verification error |
0x3F |
wrong message length |
0x40 |
Unrecognized card type |
0x41 |
Card reading operation failed |
0x47 |
Failed to fetch random number |
0x60 |
Self-test failed, unable to receive command |
0x66 |
SAM is not authorized and cannot be used |
0x80 |
card search failed |
0x81 |
card selection failed |
0x90 |
Successful operation |
0x91 |
There is no such content in the card |
0x9F |
Find the card successfully |
0x100 |
Error calling sdtapi.dll |
0x101 |
photo decoding error |
0x102 |
wlt file suffix error |
0x103 |
wlt file open error |
0x104 |
wlt file format error |
0x105 |
Unlicensed software |
0x106 |
Device connection error |
0x107 |
Other errors in photo decoding |
0x110 |
already initialized |
0x111 |
Uninitialized |
0x112 |
port not opened |
0x113 |
Parameter error |
0x114 |
buffer too small |
0x115 |
Failed to allocate memory |
0x116 |
Failed to read and write file |
0x117 |
Failed to load DLL |
0x118 |
Failed to create authorization file |
0x119 |
response header error |
0x11A |
wrong response length |
0x11B |
card search error |
0x11C |
wrong message length |