Contact-less Smart Card Reader/Writer & Mifare One Card (6)

类别:编程语言 点击:0 评论:0 推荐:

Contact-less Smart Card Reader & Mifare one Card 二次開發文檔

Author: Dennis Lan

Date: 2003/12/17

Copyright© Universal Master Information Co(sz)., Ltd  轉載請說明出處

續http://www.csdn.net/Develop/read_article.asp?id=22904

寫卡的步驟如下:

     1. Create a Connection between Smart Card Reader and Computer via COM port

     2. Verify the Introduction area for find the card (檢查讀寫器的感應區是否有可感應的 IC Card)

     3. 調用防卡衝突的函式, 讓讀寫器一次只寫一張卡.

     4. 設定 Smart Card Reader Sector N 的 Key 為“FFFFFFFFFFFF”, 讓其和卡的出廠預設值相同.

     5. 卡、機互相驗證 Sector N的 Key

       5.1 如果驗證通過 Jump to 6

       5.2 如果驗證失敗

               5.2.1 設定 Smart Card Reader Sector n 的 Key 為  0xXXX***XXX ***

          5.2.2 再次執行卡、機互相驗證 Sector N的 Key

             5.2.2.1 失敗 -> exit ->Close Connection

                  5.2.2.2 成功

                    5.2.2.2.1 詢問是否重寫 Sector N? 否-> GOTO 5.2.2.1

                 5.2.2.2.1.1 是 -> 擦除 Sector N 塊1 、2、 3 中的資料

     6. 從塊 Sector n*4 開始寫入資料

     7. 設定 IC Card Sector n 的 Key 0xXXX***XXX ***(以後讀卡的 Smart Card Reader 上的這一個扇區的 Key 要與之相同)

     8. 斷開 Smart Card Reader 和電腦的連結

寫卡 Flowchart

待續 ...

附錄:

 參考資料:

<<D&C® RD 系列IC卡讀寫器使用說明書>> Oracle Forms6i Reference Manuals <<關於非接觸式 IC 智能(射頻)卡及其讀寫設備內核技術的研究與應用開發>> 張敏 上海華東磁記錄電子公司

本文地址:http://com.8s8s.com/it/it29006.htm