<tr id="e4x9y"><fieldset id="e4x9y"></fieldset></tr>
    
    

    <sub id="e4x9y"><p id="e4x9y"></p></sub>
      <blockquote id="e4x9y"><p id="e4x9y"><noscript id="e4x9y"></noscript></p></blockquote>

      <meter id="e4x9y"><td id="e4x9y"></td></meter>
      <cite id="e4x9y"><track id="e4x9y"></track></cite>
      3P免费视频,三上悠亚日韩精品二区,一亚洲一区二区中文字幕,综合色天天久久,中文字幕乱码无码人妻系列蜜桃 ,亚洲中文字幕有码,欧美顶级metart祼体全部自慰,午夜无码福利

      DONSEE東信智能 - 身份證社??ㄗx卡智能終端應用服務商

      eastcoms@qq.com
      400-6722-705
      首頁 > 服務支持專區 > 產品支持 > SDK二次開發包和軟件下載

      EST系列身份證讀卡器Linux串口COM系列SDK開發包(含libwlt2bmp.so身份證照片解碼庫)

      來源:www.www.yjcsbsb.cn   標簽:Linux 串口 COM SDK 身份證 照片解碼 相片解碼 libwlt2bmp   發布時間: 2018-11-7 10:20:18

      此SDK為廣東東信智能科技有限公司Linux串口系列身份證閱讀器,支持Linux相片解碼以及獲取身份證文字信息,另外還包括了非接IC卡、M1卡、CPU等卡的讀取指令,含Linux系統libwlt2bmp.so相片解碼庫。

      廣東東信智能科技有限公司EST系列身份證讀卡器Linux串口COM系列SDK開發包

      廣東東信智能科技有限公司EST系列身份證讀卡器Linux串口COM系列SDK開發包

      版本:V2018.11.07

      相片解碼說明:

      #ifndef _dev_serial_H

      #define _dev_serial_H

      #define IC_UnConnect -1001 /*設備通訊超時*/

      #define NoOpenCom        -120   /* 串口沒打開*/

      #define SendDataError    -121   /* 發送數據失敗*/

      #define TermParaError    -122/* 終端參數錯*/

      #define TermTypeError    -123   /* 終端類型錯誤*/

      #define RevTimeOut       -101/* 接收數據超時*/

      #define IFD_SendAgain -40           /*如果返回此錯誤,需重發數據*/

      #define IFD_TypeA_Find_Error -28/*TYPE A尋卡錯誤*/

      #define IFD_TypeA_MoreCard_Error -27/*TYPE A檢測到多張卡片*/

      #define IFD_TypeA_Anticoll_Error -26/*TYPE A防碰撞錯誤*/

      #define IFD_TypeA_Select_Error -25/*TYPE A選卡錯誤*/

      #define IFD_TypeA_RATS_Error -24/*TYPE A RATS錯誤*/

      #define IFD_M1_Auth_Error -23/*Mifare one Auth錯誤*/

      #define IFD_TypeB_Find_Error -22/*TYPE B尋卡錯誤*/

      #define IFD_TypeB_attrib_Error -21/*TYPE B attrib錯誤*/

      /*狀態碼*/

      #define IFD_OK0 /*執行成功*/

      #define IFD_ICC_TypeError-1 /*卡片類型不對*/

      #define IFD_ICC_NoExist-2 /*無卡*/

      #define IFD_ICC_NoPower-3 /*有卡未上電*/

      #define IFD_ICC_NoResponse-4     /*卡片無應答*/

      #define IFD_ConnectError-11     /*讀卡器連接錯*/

      #define IFD_UnConnected-12         /*未建立連接(沒有執行打開設備函數)*/

      #define IFD_BadCommand-13         /*(動態庫)不支持該命令*/

      #define IFD_ParameterError-14     /*(發給動態庫的)命令參數錯*/

      #define IFD_CheckSumError-15     /*信息校驗和出錯*/

      #ifdef __cplusplus

      extern "C" {

      #endif

      /******************************************************************************************************************************************\

      \   /

      /身份證   \

      \   /

      \******************************************************************************************************************************************/

      /*****************************************

      * 功能: 讀取證件(居民身份證 + 外國人永久居留證 + 港澳臺居民居住證)

      * 參數: 

      *ReaderHandle:[IN] 執行ICC_Reader_Open 函數成功時的返回值

      * 返回值: 

      *成功返回0,執行成功后可調用下列get函數獲取相應的信息

      ***********************************************************************/

      long PICC_ReadIDCard(long ReaderHandle);

      /*****************************************

      * 功能: 讀取證件,包含指紋(居民身份證 + 外國人永久居留證 + 港澳臺居民居住證)

      * 參數: 

      *ReaderHandle:[IN] 執行ICC_Reader_Open 函數成功時的返回值

      * 返回值: 

      *成功返回0,執行成功后可調用下列get函數獲取相應的信息

      ***********************************************************************/

      long PICC_ReadIDCardFP(long ReaderHandle);

      /*****************************************

      * 功能: 獲取證件類型

      * 參數: 

      *

      * 返回值: 

      *0:表示居民身份證

      *1:表示外國人永久居留證

      *2:表示港澳臺居民居住證

      *****************************************/

      int GetCardType();

      /*****************************************

      * 功能: 獲取姓名

      * 參數: 

      *pName: [OUT] 姓名

      * 返回值: 

      *成功返回0

      * 包含證件類型:0、1、2

      *****************************************/

      int GetName(char* pName);

      /*****************************************

      * 功能: 獲取性別

      * 參數: 

      *pSex: [OUT] 性別

      * 返回值: 

      *成功返回0

      * 包含證件類型:0、1、2

      *****************************************/

      int GetSex(char* pSex);

      /*****************************************

      * 功能: 獲取民族

      * 參數: 

      *pNation: [OUT] 民族

      * 返回值: 

      *成功返回0

      * 包含證件類型:0

      *****************************************/

      int GetNation(char* pNation);

      /*****************************************

      * 功能: 獲取出生日期

      * 參數: 

      *pBirth: [OUT] 出生日期

      * 返回值: 

      *成功返回0

      * 包含證件類型:0、1、2

      *****************************************/

      int GetBirth(char* pBirth);

      /*****************************************

      * 功能: 獲取住址

      * 參數: 

      *pAddress: [OUT] 住址

      * 返回值: 

      *成功返回0

      * 包含證件類型:0、2

      *****************************************/

      int GetAddress(char* pAddress);

      /*****************************************

      * 功能: 獲取證件號碼

      * 參數: 

      *pCertNo: [OUT] 證件號碼

      * 返回值: 

      *成功返回0

      * 包含證件類型:0、1、2

      *****************************************/

      int GetCertNo(char* pCertNo);

      /*****************************************

      * 功能: 獲取簽發機關

      * 參數: 

      *pDepartemt: [OUT] 簽發機關

      * 返回值: 

      *成功返回0

      * 包含證件類型:0、2

      *****************************************/

      int GetDepartemt(char* pDepartemt);

      /*****************************************

      * 功能: 獲取有效起始日期

      * 參數: 

      *pEffectDate: [OUT] 有效起始日期

      * 返回值: 

      *成功返回0

      * 包含證件類型:0、1、2

      *****************************************/

      int GetEffectDate(char* pEffectDate);

      /*****************************************

      * 功能: 獲取有效截止日期

      * 參數: 

      *pExpireDate: [OUT] 有效截止日期

      * 返回值: 

      *成功返回0

      * 包含證件類型:0、1、2

      *****************************************/

      int GetExpireDate(char* pExpireDate);

      /*****************************************

      * 功能: 獲取通行證號碼

      * 參數: 

      *pTXZHM: [OUT] 通行證號碼

      * 返回值: 

      *成功返回0

      * 包含證件類型:2

      *****************************************/

      int GetTXZHM(char* pTXZHM);

      /*****************************************

      * 功能: 獲取通行證簽發次數

      * 參數: 

      *pTXZQFCS: [OUT] 通行證簽發次數

      * 返回值: 

      *成功返回0

      * 包含證件類型:2

      *****************************************/

      int GetTXZQFCS(char* pTXZQFCS);

      /*****************************************

      * 功能: 獲取英文名

      * 參數: 

      *pEnName: [OUT] 外國人英文名

      * 返回值: 

      *成功返回0

      * 包含證件類型:1

      *****************************************/

      int GetEnName(char* pEnName);

      /*****************************************

      * 功能: 獲取國籍代碼

      * 參數: 

      *pNationalityCode: [OUT] 外國人國籍代碼

      * 返回值: 

      *成功返回0

      * 包含證件類型:1

      *****************************************/

      int GetNationalityCode(char* pNationalityCode);

      /*****************************************

      * 功能: 獲取證件版本

      * 參數: 

      *pCardVersion: [OUT] 外國人居留證證件版本

      * 返回值: 

      *成功返回0

      * 包含證件類型:1

      *****************************************/

      int GetCardVersion(char* pCardVersion);

      /*****************************************

      * 功能: 獲取照片

      * 參數: 

      *dlpath: [IN] so路徑, 例如:"../lib/libwltdecode.so"

      *pBmpfilepath: [IN] 照片路徑, 例如:"../list/zp.bmp"

      * 返回值: 

      *成功返回0

      * 包含證件類型:0、1、2

      *****************************************/

      int GetBmpFile(const char* dlpath, char* pBmpfilepath);

      /*****************************************

      * 功能: 是否含指紋信息

      * 參數: 

      *

      * 返回值: 

      *成功返回指紋數據長度,0表示沒有

      * 包含證件類型:0、1、2

      *****************************************/

      int IsFingerExist();

      /*****************************************

      * 功能: 獲取指紋信息

      * 參數: 

      *fpInfo: [OUT] 指紋數據

      * 返回值: 

      *成功返回獲取到的指紋數據長度,0表示沒有

      * 包含證件類型:0、1、2

      *****************************************/

      int GetFingerprint(unsigned char* fpInfo);

      /******************************************************************************************************************************************\

      \   /

      /設備類   \

      \   /

      \******************************************************************************************************************************************/

      /*****************************************

      * 功能:連接讀卡器 

      * 參數: 

      *comm:[IN] 串口號,例如"/dev/ttyS3"  

      * 返回值: 

      *返回大于0的設備句柄 

      ******************************************/

      long ICC_Reader_Open(char * comm);

      /*****************************************

      * 功能:斷開讀卡器連接

      * 參數: 

      *ReaderHandle:[IN] 執行ICC_Reader_Open 函數成功時的返回值

      * 返回值: 

      *成功返回0

      ***************************************************************/

      long ICC_Reader_Close(long ReaderHandle);

      /*****************************************

      * 功能: 蜂鳴 

      * 參數: 

      *ReaderHandle:[IN] 執行ICC_Reader_Open 函數成功時的返回值

      *timeout: [IN] 超時時間,固定為5

      * 返回值: 

      *成功返回0 

      ******************************************/

      long ICC_PosBeep(long ReaderHandle, unsigned char timeout);

      /******************************************************************************************************************************************\

      \   /

      /接CPU   \

      \   /

      \******************************************************************************************************************************************/

      /*****************************************

      * 功能: 接觸CPU卡上電(冷復位)

      * 參數: 

      *ReaderHandle:[IN] 執行ICC_Reader_Open 函數成功時的返回值

      *ICC_Slot_No:[IN] 卡座號 0x01(大卡座),0x11~0x14(SAM1~SAM4)

      *Response:[OUT] ATR

      * 返回值: 

      *成功返回數據長度

      ***************************************************************/

      long ICC_Reader_pre_PowerOn(long ReaderHandle, unsigned char ICC_Slot_No, unsigned char* Response);

      /*****************************************

      * 功能: 接觸CPU卡下電

      * 參數: 

      *ReaderHandle:[IN] 執行ICC_Reader_Open 函數成功時的返回值

      *ICC_Slot_No:[IN] 卡座號 0x01(大卡座),0x11~0x14(SAM1~SAM4)

      * 返回值: 

      *成功返回0

      ***************************************************************/

      long ICC_Reader_PowerOff(long ReaderHandle,unsigned char ICC_Slot_No);

      /*****************************************

      * 功能: 接觸CPU卡執行APDU命令

      * 參數: 

      *ReaderHandle:[IN] 執行ICC_Reader_Open 函數成功時的返回值

      *ICC_Slot_No:[IN] 卡座號 0x01(大卡座),0x11~0x14(SAM1~SAM4)

      *Lenth_of_Command_APDU: [IN] APDU命令的長度

      *Command_APDU:[IN] APDU命令

      *Response_APDU: [OUT] 響應信息

      * 返回值: 

      *成功返回響應信息數據的長度

      ***************************************************************/

      long ICC_Reader_Application(long ReaderHandle,unsigned char ICC_Slot_No, long Lenth_of_Command_APDU,unsigned char* Command_APDU,unsigned char* Response_APDU);  

      /******************************************************************************************************************************************\

      \   /

      /非接類   \

      \   /

      \******************************************************************************************************************************************/

      /*****************************************

      * 功能: 獲取卡片UID(M1 & TypeA)

      * 參數: 

      *ReaderHandle:[IN] 執行ICC_Reader_Open 函數成功時的返回值

      *UID: [OUT] 4字節UID

      * 返回值: 

      *成功返回0

      ***************************************************************/

      long PICC_Reader_GetUID(long fd,unsigned char* UID);

      /*****************************************

      * 功能: M1卡認證秘鑰

      * 參數: 

      *ReaderHandle:[IN] 執行ICC_Reader_Open 函數成功時的返回值

      *Mode: [IN] 0x60 表示認證KeyA, 0x61表示認證KeyB

      *SecNr:[IN] 扇區號 S50系列卡 0~15, S70系列卡 0~63

      *Key: [IN] 6字節秘鑰

      * 返回值: 

      *成功返回0

      ***************************************************************/

      long PICC_Reader_Authentication_Pass(long ReaderHandle,unsigned char Mode, unsigned char SecNr,unsigned char *Key);

      /*****************************************

      * 功能: M1讀卡

      * 參數: 

      *ReaderHandle:[IN] 執行ICC_Reader_Open 函數成功時的返回值

      *Addr:[IN] 塊地址 S50系列卡 0~63, S70系列卡 0~255, 例如:1扇區1塊,這里Addr=5=1*4 + 1(扇區號*4 + 塊號)

      *Data:[OUT] 16字節塊數據

      * 返回值: 

      *成功返回0

      *****************************************************************************************************************/

      long PICC_Reader_Read(long ReaderHandle,unsigned char Addr,unsigned char *Data);

      /*****************************************

      * 功能: M1寫卡

      * 參數: 

      *ReaderHandle:[IN] 執行ICC_Reader_Open 函數成功時的返回值

      *Addr:[IN] 塊地址 S50系列卡 0~63, S70系列卡 0~255, 例如:1扇區1塊,這里Addr=5=1*4 + 1(扇區號*4 + 塊號)

      *Data: [IN] 16字節待寫入數據

      * 返回值: 

      *成功返回0

      ***************************************************************************************************************/

      long PICC_Reader_Write(long ReaderHandle,unsigned char Addr,unsigned char *Data);

      /*****************************************

      * 功能: TypeA卡上電

      * 參數: 

      *ReaderHandle:[IN] 執行ICC_Reader_Open 函數成功時的返回值

      *Response: [OUT] 上電返回數據

      * 返回值: 

      *成功返回數據長度

      ***************************************************************/

      long PICC_Reader_PowerOnTypeA(long ReaderHandle,unsigned char* Response);

      /*****************************************

      * 功能: TypeB卡上電

      * 參數: 

      *ReaderHandle:[IN] 執行ICC_Reader_Open 函數成功時的返回值

      *Response: [OUT] 上電返回數據

      * 返回值: 

      *成功返回數據長度

      ***************************************************************/

      long PICC_Reader_PowerOnTypeB(long ReaderHandle,unsigned char* Response);

      /*****************************************

      * 功能: TypeA & B 卡執行APDU命令

      * 參數: 

      *ReaderHandle:[IN] 執行ICC_Reader_Open 函數成功時的返回值

      *Lenth_of_Command_APDU: [IN] APDU命令的長度

      *Command_APDU:[IN] APDU命令

      *Response_APDU: [OUT] 響應信息

      * 返回值: 

      *成功返回響應信息數據的長度

      ***************************************************************/

      long PICC_Reader_Application(long ReaderHandle,long Lenth_of_Command_APDU,unsigned char* Command_APDU,unsigned char* Response_APDU);

      /******************************************************************************************************************************************\

      \   /

      /磁條卡   \

      \   /

      \******************************************************************************************************************************************/

      /*****************************************

      * 功能: 讀磁條卡

      * 參數: 

      *ReaderHandle:[IN] 執行ICC_Reader_Open 函數成功時的返回值

      *ctime:[IN] 等待刷卡的超時時間,單位:秒

      *track:[IN] 磁道 1~3

      *rlen: [OUT] 返回的磁道數據長度

      *Data: [OUT] 返回的磁道數據

      * 返回值: 

      *成功返回0

      ****************************************************************/

      long Rcard(long ReaderHandle,unsigned char ctime,int track,unsigned char *rlen,char *Data);

      #ifdef __cplusplus

      }

      #endif

      #endif

      #include "../inc/dev_serial.h"

      #include <string.h>

      #include <stdio.h>

      static long handle;

      static void printchar(char ch, int len)

      {

      while(len--)

      {

      printf("%c", ch);

      }

      printf("\n");

      }

      static void printchar_txt(char ch, char *pText)

      {

      printf("%c\t%s\n", ch, pText);

      }

      static void printByteArray(char *Tag, unsigned char *pSrc, int ilen)

      {

      inti = 0;

      printf( "%s", Tag );

      while( i<ilen )

      {

      printf( "%02X ", pSrc[i] );

      i++;

      }

      printf( "\n" );

      }

      static void ShowToEdit(const char* tag, const char* msg)

      {

      printf( "%s\t%s\n", tag, msg );

      }

      static void CertCard_Test()

      {

      intnRt, i;

      char pName[50]={0};

      char pSex[10]={0};

      char pNation[10]={0};

      char pBirth[50]={0};

      char pAddress[100]={0};

      char pCertNo[50]={0};

      char pDepartment[100]={0};

      char pEffectData[50]={0};

      char pExpire[20]={0};

      char pErrMsg[50]={0};

      char pEnName[150] = { 0 };

      char pEnNation[50] = { 0 };

      char pAuthorCode[150] = { 0 };

      char pCardVersion[150] = { 0 };

      char pTXZHM[50] = { 0 };

      char pTXZQFCS[10] = { 0 };

      nRt = PICC_ReadIDCard(handle);

      if ( nRt != 0 )

      {

      printf( "ReadCertCard fail! nRet=%d\n", nRt );

      return;

      }

      if(GetCardType() == 0)

      {

      GetName(pName);

      GetSex(pSex);

      GetNation(pNation);

      GetBirth(pBirth);

      GetAddress(pAddress);

      GetCertNo(pCertNo);

      GetDepartemt(pDepartment);

      GetEffectDate(pEffectData);

      GetExpireDate(pExpire);

      ShowToEdit( "姓名:", (pName));

      ShowToEdit( "性別:", (pSex));

      ShowToEdit( "民族:", (pNation));

      ShowToEdit( "出生日期:", (pBirth));

      ShowToEdit( "地址:", (pAddress));

      ShowToEdit( "身份證號:", (pCertNo));

      ShowToEdit( "簽發機關:", (pDepartment));

      ShowToEdit( "有效起始日期:", (pEffectData));

      ShowToEdit( "有效截止日期:", (pExpire));

      }

      if(GetCardType() == 1)

      {

      GetName(pName);

      GetEnName(pEnName);

      GetSex(pSex);

      GetNationalityCode(pEnNation);

      GetBirth(pBirth);

      GetCertNo(pCertNo);

      GetEffectDate(pEffectData);

      GetExpireDate(pExpire);

      GetCardVersion(pCardVersion);

      ShowToEdit( "中文姓名:", (pName));

      ShowToEdit( "英文姓名:", (pEnName));

      ShowToEdit( "性別:", (pSex));

      ShowToEdit( "國籍代碼:", (pEnNation));

      ShowToEdit( "永久居留證號碼:", (pCertNo));

      ShowToEdit( "出生日期:", (pBirth));

      ShowToEdit( "證件簽發日期:", (pEffectData));

      ShowToEdit( "證件終止日期:", (pExpire));

      ShowToEdit( "證件版本:", (pCardVersion));

      }

      if(GetCardType() == 2)

      {

      GetName(pName);

      GetSex(pSex);

      GetBirth(pBirth);

      GetAddress(pAddress);

      GetCertNo(pCertNo);

      GetDepartemt(pDepartment);

      GetEffectDate(pEffectData);

      GetExpireDate(pExpire);

      GetTXZHM(pTXZHM);

      GetTXZQFCS(pTXZQFCS);

      ShowToEdit( "姓名:", (pName));

      ShowToEdit( "性別:", (pSex));

      ShowToEdit( "出生日期:", (pBirth));

      ShowToEdit( "地址:", (pAddress));

      ShowToEdit( "身份證號:", (pCertNo));

      ShowToEdit( "簽發機關:", (pDepartment));

      ShowToEdit( "有效起始日期:", (pEffectData));

      ShowToEdit( "有效截止日期:", (pExpire));

      ShowToEdit( "通行證號碼:", (pTXZHM));

      ShowToEdit( "通行證簽發次數:", (pTXZQFCS));

      }

      char szPhotoPath[255] = { 0 };

      sprintf(szPhotoPath, "../list/%s.bmp", pCertNo);

      GetBmpFile("../lib/libwltdecode.so", szPhotoPath);

      }

      static void ICC_CPUCard_Test()

      {

      intnRt, i;

      unsigned char slot = 0x01;

      unsigned char cmd[255] = { 0 };

      unsigned charresp[255]= { 0 };

      unsigned charATR[60] = { 0 };

      intlenth_of_cmd;

      // Get 8 byte Random

      cmd[0] = 0x00;

      cmd[1] = 0x84;

      cmd[2] = 0x00;

      cmd[3] = 0x00;

      cmd[4] = 0x08;

      lenth_of_cmd = 5;

      //CPU Card PowerOn

      nRt = ICC_Reader_pre_PowerOn( handle, slot, resp );

      if( nRt < 0 )

      {

      printf( "CPU Card PowerOn fail! ret=%d\n", nRt );

      return;

      }

      printByteArray( "ATR: ", resp, nRt );

      printByteArray( "CMD: ", cmd, lenth_of_cmd );

      //Send APDU CMD

      memset( resp, 0, 250 );

      nRt = ICC_Reader_Application( handle, slot, lenth_of_cmd, cmd, resp );

      if( nRt < 0 )

      {

      printf( "send APDU CMD fail! ret=%d\n", nRt );

      return;

      }

      printByteArray( "Resp: ", resp, nRt );

      }

      static void PICC_CPUCard_Test()

      {

      int             nRt, i;

      unsigned char   uid[15]  = { 0 };

      unsigned char   cmd[255] = { 0 };

      unsigned char   resp[255]= { 0 };

      unsigned char   ATR[60]  = { 0 };

      int             lenth_of_cmd;

      // Get 8 byte Random

      cmd[0] = 0x00;

      cmd[1] = 0x84;

      cmd[2] = 0x00;

      cmd[3] = 0x00;

      cmd[4] = 0x08;

      lenth_of_cmd = 5;

      //CPU Card PowerOn

      nRt = PICC_Reader_PowerOnTypeA( handle, resp );

      if( nRt < 0 )

      {

      printf( "TypeA CPU Card PowerOn fail! ret=%d\n", nRt );

      return;

      }

      printByteArray( "ATR: ", resp, nRt );

      printByteArray( "CMD: ", cmd, lenth_of_cmd );

      memset( resp, 0, 250 );

      nRt = PICC_Reader_Application( handle, lenth_of_cmd, cmd, resp );

      if( nRt < 0 )

      {

      printf( "send APDU CMD fail! ret=%d\n", nRt );

      return;

      }

      printByteArray( "Resp: ", resp, nRt );

      }

      static void M1Card_Test()

      {

      int             nRt, i;

      unsigned char   uid[15]= { 0 };

      unsigned char   password[7] = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00 };

      unsigned char   resp[255]= { 0 };

      unsigned charaddr= 0x04;

      unsigned charsncr= 0x01;

      unsigned charmode= 0x61;

      if( PICC_Reader_GetUID( handle, uid ) <= 0 )

      {

      printf( "PICC_Reader_anticoll fail! ret=%d\n", nRt );

      return;

      }

      printByteArray( "UID: ", uid, 4 );


      nRt = PICC_Reader_Authentication_Pass( handle, mode, sncr, password );

      if ( nRt != 0 )

      {

      printf( "PICC_Reader_Authentication_Pass fail! ret=%d\n", nRt );

      return;

      }

      nRt = PICC_Reader_Read( handle, addr, resp );

      if( nRt != 0 )

      {

      printf( "PICC_Reader_Read fail! ret=%d\n", nRt );

      return;

      }

      printByteArray( "Data: ", resp, 16 );

      }

      int main(void)

      {

      long nRt;

      intnval;

      handle = ICC_Reader_Open( "/dev/ttyUSB0" );

      if( handle <= 0 )

      {

      printf( "open fail! \n" );

      return 0;

      }

      printchar( '#', 80 );

      printchar_txt( '#', "please choose the action you want:" );

      printchar_txt( '#', "1.opt ICC CPU Card." );

      printchar_txt( '#', "2.opt PICC CPU(A) Card." );

      printchar_txt( '#', "3.opt M1 Card." );

      printchar_txt( '#', "4.opt CertCard." );

      printchar( '#', 80 );

      scanf( "%d", &nval );

      //nRt = ICC_PosBeep( handle, 10 );

      switch( nval )

      {

      case 1:

      {

      printf( "\tICC_CPU_CARD.\n" );

      ICC_CPUCard_Test();

      }

      break;

      case 2:

      {

      printf( "\tPICC_CPU(A)_CARD.\n" );

      PICC_CPUCard_Test();

      }

      break;

      case 3:

      {

      printf( "\tM1_CARD.\n" );

      M1Card_Test();

      }

      break;

      case 4:

      {

      printf( "\tCertCard.\n" );

      CertCard_Test();

      }

      break;

      default:

      printf( "enter err!\n" );

      break;

      }

      ICC_PosBeep(handle, 10);

      ICC_Reader_Close(handle);

      return 0;

      }

       

       
      QQ在線咨詢
      主站蜘蛛池模板: 亚洲国产天堂久久综合226114| 被暴雨淋湿爆乳少妇正在播放 | 无码精品人妻一区二区三区湄公河?2026-01-30?8465?1252 | 美女18禁一区二区三区视频| 精品国产911在线观看| 日韩av一区二区精品不卡| 无码午夜福利片| 亚洲精品无码久久久久sm| 3P在线观看视频| 欧美视频精品免费覌看| 97在线观看永久免费视频下载| 九九热这里| 亚洲精品一区二区区别| 玩两个丰满老熟女久久网| 日韩美少妇大胆一区二区| 国产在亚洲线视频观看| 东京热人妻无码一区二区av| 免费无码中文字幕A级毛片| 国产无码AV| 九九视频免费精品视频| ww.国产| 久久国产精品乱子乱精品| 久久免费在线视频| 国产女人的高潮国语对白| 中文字幕精品熟女| 国产成人亚洲日韩欧美| 色人妻中文字幕| 亚洲无码丝袜| …日韩人妻无码精品一专区| 免费无码成人AV片在线| 五月色情网| 久久人人97超碰国产精品| 在线播放国产91精品| 又粗又大又硬又长又爽| 伊人久久大香线蕉AV网| 亚洲无码AAA| 日本一区二区无卡高清视频| 97一期涩涩97片久久久久久久 | 宫西光在线| av中文在线天堂| 日韩精品一区二区蜜臀av|