Mifareseries 8--d8m1.exe,mifareseries d8m1.exe

Source: Internet
Author: User

Mifareseries 8--d8m1.exe,mifareseries d8m1.exe
Software name: D8M1.exe
Updated on:
Operating System: Firewall Wall
External Device: D8 Card Reader


D8M1 can read and write MIFARE blocks. It supports 1 K and 4 K. Return SAK, QTAQ, and UID after checking the KEY. Developed based on dcrf32.dll provided by D8 card reader.



D8 IC card reader is an essential front-end processing device for Developing IC card-related products and system integration. It can read and write dual-interface RF smart cards or separate non-contact RF cards, use RS232 serial interface or USB port to connect to PC and related devices. USB adopts no-drive technology to facilitate installation and use, its multi-card support can be used for secure card issuance and for those with high security requirements.



The core code is as follows:


Void CD8M1Dlg: Show (CString str) {time = CTime: GetCurrentTime (); CString strTime = time. format ("% H: % M: % S"); int len = editShow. getWindowTextLength (); editShow. setSel (len, len); editShow. replaceSel (strTime + "---->" + str + _ T ("\ r \ n");} void CD8M1Dlg: Beer () {UCHAR SONG_TONE [] = {212,212,190,212,159,169,212,212,190,212,142,159,212,212,106,126,159,169,190,119,119,126,159,142,159, 0}; // The note frequency table of the Happy Birthday Song. different frequencies are determined by different latencies. UCHAR SONG_LONG [] = {9, 3, 12, 12, 12, 24, 9, 3, 12, 12, 12, 24, 9, 3, 12, 12, 12, 12, 12, 9, 3, 12, 12, 12, 24, 0 }; // happy birthday music beat table. The beat determines the playing length of each note. int len = 6; for (int I = 0; I <len; I ++) {dc_beep (icdev, SONG_LONG [I]/3); Sleep (SONG_TONE [I]);} void CD8M1Dlg: OnBnClickedInitcom () {// initialize Serial Port 1, icdev = dc_init (100,960 0 ); if (int) icdev <= 0) {Show ("Init Com Error! ");} Else {Show (" Init Com OK! ");} Dc_beep (icdev, 1); // beep time, in 10 ms Sleep (30); dc_beep (icdev, 1); Sleep (60 ); dc_beep (icdev, 1); // Beer ();} void CD8M1Dlg: OnBnClickedLoadKey () {// download password CString keys; GetDlgItemText (IDC_EDIT_KEY, keys ); int pos = keys. find ("\ r \ n"); UCHAR uKey [6]; while (pos! =-1) {CString key = keys. left (pos ). trim (); keys = keys. mid (pos + 2); unsigned char _ SecNr = StrToIntA (key. left (2); CString keyN = key. mid (3); if (_ SecNr> 40) {Show ("fan area code error, greater than 40 sectors... ");} memset (uKey, 0, 6); Alg: HexToAsc (keyN, uKey); int st = dc_load_key (icdev, GetKeyMode (), _ SecNr, uKey ); if (st! = 0) {Show (IntToStr (_ SecNr) + ": failed to write the sector key... "); return;} pos = keys. find ("\ r \ n");} Show ("loading KEY successful... \ r \ n ");} void CD8M1Dlg: OnBnClickedVerifyCard () {// card retrieval function, // int st = dc_card (icdev, 0, & cardsnr); CString linstr; unsigned short tagType; int st = dc_request (icdev, 0, & tagType); if (st! = 0) {Show ("Find Card Error! "); Return;} else {Show (" Find Card OK! "); Linstr. format ("% 04d", tagType); Show ("ATQA:" + linstr);} st = dc_anticoll (icdev, 0, & cardsnr); if (st! = 0) {Show ("Find Card Error! "); Return;} else {linstr. format ("% X", cardsnr); Show ("UID:" + linstr);} UCHAR size; st = dc_select (icdev, cardsnr, & size); if (st! = 0) {Show ("select Card Error! "); Return;} else {linstr. format ("% X", size); Show ("SAK:" + linstr) ;}// check the password int sec = GetSecNr (); int keyMode = GetKeyMode (); for (int I = 0; I <sec; I ++) {st = dc_authentication (icdev, keyMode, I); if (st! = 0) {Show (IntToStr (I) + ": Auth Card Error... "); return ;}} Show (" password verification is complete... \ r \ n ");} void CD8M1Dlg: OnBnClickedRead () {EditBlock. setWindowTextA (""); ClearShow (); int adrs = GetBlockNr (); CString sData; UCHAR pData [32]; unsigned long _ NSnr; for (int I = 0; I <adrs; I ++) {// int st = dc_read (icdev, I, data); if (IsCheckW ()) {// only read block 3if (I <128) & (I + 1) % 4! = 0) {continue;} if (I> 128) & (I + 1) % 16! = 0) {continue ;}} memset (pData, 0, 32); int st = dc_HL_read (icdev, 0, I, cardsnr, pData, & _ NSnr); Alg:: AscToHex (pData, 16, sData); if (st! = 0) {Show (IntToStr (I) + ": Read failed... "); continue;} else {Show (IntToStr (I) +": read successful, "+ sData);} int len = EditBlock. getWindowTextLength (); EditBlock. setSel (len, len); EditBlock. replaceSel (IntToStr (I) + ":" + sData + _ T ("\ r \ n");} Show ("read block completed... \ r \ n ");} void CD8M1Dlg: OnBnClickedWrite () {ClearShow (); CString blocks; int adrs = GetBlockNr (); GetDlgItemText (IDC_EDIT_BLOCK, blocks ); int pos = blocks. find ("\ r \ n"); UCH AR uData [16]; while (pos! =-1) {CString block = blocks. left (pos ). trim (); blocks = blocks. mid (pos + 2); int posn = block. find (':'); if (posn =-1) {Show ("the block address value is incorrect," + block); return;} unsigned char adr = StrToIntA (block. left (posn); CString data = block. mid (posn + 1); if (data. getLength ()! = 32) {Show ("Incorrect block Value length," + block);} if (adr> adrs) {Show ("block address out-of-bounds:" + IntToStr (adr )); return;} Alg: HexToAsc (data, uData); int st = dc_HL_write (icdev, 0, adr, & cardsnr, uData); if (st! = 0) {Show (IntToStr (adr) + ": Write failed... ");} else {Show (IntToStr (adr) +": Write successful, write value "+ data);} pos = blocks. find ("\ r \ n");} Show ("Write block completed... \ r \ n ");} void CD8M1Dlg: OnClose () {dc_exit (icdev); CDialogEx: OnClose ();}

Software: http://download.csdn.net/detail/yxstars/7675429



How to Use the mifare card 0-sector change Tool

1. Software information editing
Software size: 281KB [1]
Software Version: V1.1
Software nature: Common Software
Software authorization: free version
Last Updated: 23:07:42
Application Platform:/WinXP/| Win7 |/Vista/Win8/

2. Software introduction and editing
Mifare one Card Operation Program: IC card read/write test program. With a password, you can read and modify the data of the 16-sector IC card.
Introduction to the Mifare One Card RF Card (rfcard for short) is an integrated circuit card that transmits data wirelessly, solving the problem of passive (no power in the card) and no contact. RF cards have no contact, long working distance, high precision, fast information collection, and better application environment adaptability.
Chip: uses the Mifare1ICS50 micromodule of Philips.
Storage: 8 K (bit) EEPROM. 8192bit x 1-bit length (1 kb ).
Structure Division: the entire structure is divided into 16 sectors, which are 0-15. Each slice has four blocks: Block 0, Block 1, Block 2, and Block 3. Each block contains 16 bytes. A single slice consists of 16 bytes × 4 = 64 bytes. Each sector has its own password zone KEYA and KEYB.
Sensor distance: 25mm (MCM200 is used as the reader core module)-100mm (MCM500 is used as the reader core module ).
Operating frequency: 13.56 MHZ. (High Frequency)
Communication Rate: 105.94K baud rate.
Antistatic: 2 kV or above.
Data read/write count: more than 0.1 million.
Operation speed: usually 300 ms.
Data Retention Period: more than 10 years.
Usage: Non-contact.
Application field: extensive application fields, it is widely used in smart charging systems, bus/subway ticket check systems, catering fee management systems, canteen meal sales systems, attendance management systems, data center fee management systems, parking lot management systems, access control systems, and other card systems.
References

1. Mifare one Card Operating Program 1.1. Popular software park [reference date:].

Detailed operation steps and procedures of the reader on the MIFARE 1 card

1. Start the reader
Start the computer, open the RFID experiment box, and take out the high-frequency reader and connect the computer with a USB cable. Open the Reader Demo software yx7036democn.exe on your computer, go to the main interface, and open the port.
2. Read lSO14443A protocol card information
1) switch the Reader Demo software option to the lSO14443A protocol (1 in Figure 2-1), and click "switch to lSO14443A mode" (2 in Figure 2-1 ), click "Open RF" (3 in Figure 2-1). The high-frequency reader enters the lSO14443A read/write preparation status.
2) Click "Request" (4 in Figure 2-1). The card type is displayed on the right (12 in Figure 2-1). After the Request command is executed, the "card type" text box displays the type code of the label. Otherwise, the status bar prompts "No 3A electronic tag is available ". Because the command executes Request (All), All tags in any state will respond. If Request (Idle) is called, only tags outside the Halt state can respond.
3) Click "Anticoll" (5 in Figure 2-1). The Mifare One anti-conflict API gets the UID of A Mifare One tag in the RF field. If the anti-conflict API is successfully executed, the "card number" text box displays the obtained 4-byte tag UID (13 in Figure 2-1); otherwise, the status bar displays "conflict prevention failed ". ULAnticoll: UltraLight anti-conflict: gets the UID of an UltraLight tag in the RF field. If the anti-conflict operation is successful, the "card number" text box displays the obtained 7-byte tag UID; otherwise, conflict prevention fails to be displayed in the status bar.
4) Click "Select" (6 in Figure 2-1) and Select the tag of the specified UID. All subsequent operations will be performed on this tag. If the selection is successful, the "card size" text box displays the size of the tag storage area (14 in Figure 2-1 ). Note: The UltraLight label does not need to execute this command. The Select Operation has been performed during the ULAnticoll process.

Figure 2-1
3. Read and Write lSO14443A protocol card data
Before Reading and Writing lSO14443A card data, you must confirm the electronic tag. Click "AuthKey" (8 in Figure 2-1) to read the key in the "read and write" box, confirm the selected sector with the specified key type. If the entered key matches the key on the tag sector, the operation is successful. The status bar displays "AuthKey: Execution successful ". After successful authentication, you can read or modify the content in the Data zone. Select the fan area number (15 in Figure 2-1), select the block number (16 in Figure 2-1), and click "Read" (17 in Figure 2-1 ), if the operation succeeds, you can view the data block data in the numerical control block (19 in Figure 2-1 ). In the data block box (19 in Figure 2-1), enter the data to be written into the data block and click "Write" (18 in Figure 2-1). If the data block is successfully written, the "Write successful" message is displayed in the lower left corner ".
Note:
1. Mifare one S50 (16 sectors in total)
Block 0 ~ Block 2 is the data block, and block 3 is the key block.
Mifare one S70 (40 sectors in total)
When the fan area number is <= 31, the block 0 ~ Block 2 is the data block, and block 3 is the key block;
When the fan area number is greater than 31, the block size ranges from 0 to 31 ~ Block 14 is the data block, and block 15 is the key block.
2. To write data, the data length must be 16 bytes.
3. When reading the UltraLight tag, set the fan area number to 0, and the block number is the page number corresponding to the UltraLight tag. The read content is four consecutive pages starting from the selected page number.
4. When writing an UltraLight tag, the tag is only written with four lower words, and the remaining 12 bytes are 0;
In addition, there is a write command ULWrite dedicated to the UltraLight tag,
Knowledge learning
The S50 card has a total of 16 lk bytes sectors, and each slice has 4 blocks. The first block of the 1st slice is the card serial number, which is read-only and cannot be written. The key is stored in Block 3 of each sector. The algorithm used to calculate the storage key block is: x = s * 4 + 3: Its... the remaining full text>

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.