<td id="n3ws3"></td>
          <th id="n3ws3"></th>
            <b id="n3ws3"><menuitem id="n3ws3"></menuitem></b>
            <del id="n3ws3"><form id="n3ws3"></form></del>
            <b id="n3ws3"><menuitem id="n3ws3"></menuitem></b>
          1. <dd id="n3ws3"><dl id="n3ws3"></dl></dd>

            智能卡讀寫器,IC卡讀卡器

            RFID讀卡器包含低頻ID卡讀卡器,高頻IC卡讀卡器,NFC讀寫器,超高頻UHF讀卡器以及相應(yīng)的模組,智能卡包含印刷彩卡,CPU卡,電子標簽

            Java JNI調(diào)用IC卡讀卡器

            Java調(diào)用IC卡讀卡器的DLL一般有以下2種方式:

            1.使用JNative第三方庫調(diào)用IC卡讀卡器dll的接口.

            2.使用JNI調(diào)用IC卡讀卡器dll的接口.


            JNative調(diào)用IC卡讀卡器dll很方便,只要知道接口名稱和參數(shù)類型即可調(diào)用, 缺點是僅支持32位的程序, 不支持64位。


            JNI調(diào)用IC卡讀卡器的DLL,既支持64位程序也支持32位程序, 調(diào)用也非常方便,下面將介紹JNI調(diào)用IC卡讀卡器DLL的方式。

            對于經(jīng)常使用的普通IC卡為例, 首先聲明相關(guān)的api接口:

            public native int YW_USBHIDInitial();
            public native int YW_USBHIDFree();
            public native int YW_Buzzer(int ReaderID,int Time_ON, int Time_OFF, int Cycle);
            public native int YW_Led(int ReaderID,int LEDIndex, int Time_ON, int Time_OFF, int Cycle, int LedIndexOn);
            public native int YW_AntennaStatus(int ReaderID,boolean Status);
            public native int YW_SearchCardMode(int ReaderID,int Mode);
            public native int YW_RequestCard(int ReaderID,int RequestMode, short CardType[]);
            public native int YW_AntiCollide(int ReaderID, byte LenSNO[], byte SNO[]);
            public native int YW_CardSelect(int ReaderID,byte LenSNO, byte SNO[]);
            public native int YW_DownLoadKey(int ReaderID,int KeyIndex, byte Key[]);
            public native int YW_KeyDown_Authorization(int ReaderID,int KeyMode, int BlockAddr, byte KeyIndex);
            public native int YW_KeyAuthorization(int ReaderID,int KeyMode, int BlockAddr, byte[]Key);
            public native int YW_ReadaBlock(int ReaderID,int BlockAddr, int LenData, byte pData[]);
            public native int YW_WriteaBlock(int ReaderID,int BlockAddr, int LenData, byte pData[]);
            public native int YW_Purse_Initial(int ReaderID,int BlockAddr, int IniMoney);
            public native int YW_Purse_Read(int ReaderID,int BlockAddr,  int Money[]); 
            public native int YW_Purse_Decrease(int ReaderID,int BlockAddr, int Decrement);
            public native int YW_Purse_Charge(int ReaderID,int BlockAddr, int Charge);
            public native int YW_CardHalt(int ReaderID);
            public native int YW_Restore(int ReaderID,int BlockAddr);
            public native int YW_Transfer(int ReaderID,int BlockAddr);
            public native int YW_AntiCollideAndSelect(int ReaderID,byte ReturnMode,  byte CardMem[],  byte SNLen[], byte SN[]);


            然后靜態(tài)裝載dll,64位程序裝載64位的dll,32位裝載32位的dll。

            static {

            System.loadLibrary("YW60X-32");

            }


            經(jīng)過以上聲明后,就可以直接調(diào)用接口了,如:

            YOWORFID rfidreader = new YOWORFID();

            rfidreader.YW_USBHIDInitial();

            int rt =0;

            rt =rfidreader.YW_RequestCard(ReaderID,Requestmode,Cardtype);

            rt = rfidreader.YW_AntiCollide(ReaderID,LenSn,CardNo);

            HexToStr(CardNo,LenSn[0]);

            rt =rfidreader.YW_CardSelect(ReaderID,LenSn[0],CardNo);

            rt =rfidreader.YW_KeyAuthorization(ReaderID,96,4,Key);

            System.out.printf("KeyAuthorization=%d",rt);System.out.println();

            rt =rfidreader.YW_ReadaBlock(ReaderID,4,16,BlockData);

            System.out.printf("YW_ReadaBlock=%d",rt);System.out.println();

            if(rt>0){HexToStr(BlockData,16);}

            rfidreader.YW_Led(ReaderID,1,1,1,3,0);

            rfidreader.YW_USBHIDFree();



            相關(guān)聯(lián)的產(chǎn)品
            YW-605RA
            YW-605RA

            串口射頻卡RFID讀寫器

            USB免驅(qū)動IC卡讀卡器,支持Windows,安卓和linux,型號YW-605RA

            高頻RFID讀寫器,Linux讀卡器

            YW-605HA
            YW-605HA

            USB免驅(qū)IC卡讀卡器發(fā)卡器YW-605HA

            USB免驅(qū)動IC卡讀卡器,支持web,安卓和linux,型號YW-605HA

            高頻RFID讀寫器,WEB讀卡器,安卓讀卡器,Linux讀卡器

            YW-607HC
            YW-607HC

            NFC讀寫器YW-607HC

            支持web瀏覽器,windows,安卓,linux的NFC讀寫器YW-607HC

            高頻RFID讀寫器,WEB讀卡器,安卓讀卡器,Linux讀卡器

            RFID讀寫器,IC卡讀卡器, 智能卡讀卡器,RFID讀卡器, 電子標簽,CPU卡讀寫器,讀卡模塊
            北京友我科技有限公司 版權(quán)所有 (C)2025-2025
            客戶服務(wù)中心信箱:[email protected]
            熱線直撥: 010-57049038 18910685939 電話微信:13691531038,13671114914
            京ICP備14016005號
            微信掃一掃聯(lián)系我們

            微信掃一掃聯(lián)系我們

            友我科技

              <td id="n3ws3"></td>
                    <th id="n3ws3"></th>
                      <b id="n3ws3"><menuitem id="n3ws3"></menuitem></b>
                      <del id="n3ws3"><form id="n3ws3"></form></del>
                      <b id="n3ws3"><menuitem id="n3ws3"></menuitem></b>
                    1. <dd id="n3ws3"><dl id="n3ws3"></dl></dd>
                      xxxxx日本18 | 欧美性成人1819 | 国产黄色一级大片 | 国产综合精品久久久久成人AV | 最新草比视频网站 |