Arduino Sketch to read and write rfid tags with Gwiot 7941E and Gwiot 7941W
7941E card reader module, integrated high performance card reading radio frequency circuit and antenna and users can select wiegand or UART interface. Rich application support, it supports various cards card reading operation
- Voltage: DC 5V
- Current: 40mA
- Support 125KHz card reading
- Interface: Wiegand, UART
- Size: 47265mm
- Operating Temperature: -20~70 Celsius
- EM4100 Card Reading Distance: >8cm
1.Power: DC 5V power supply, choose linearity power can gain better effects 2.D1 D0: wiegand data output DATA1, DATA0 3.FOR: format selection (hanging means W26, ground connection means W34)
- When it sensors the card, the serial number will be output via Data 0, Data 1 two data wire
- Data 0 and Data 1 are high level when there is no data output
- Data Bit 0: it will generate 400us low level on Data 0 wire
- Data Bit 1: it will generate 400us low level on Data 1 wire
- Every data length is 2400us
- Every Mifare card has a serial number with 4 bytes, users should output the last three bytes
- Add the first 12-bit even check bit in the front and add the last 12-bit odd check bit in the back, 26-bit data in total
- Card number is 6B 3D 12 D6
- Output data is 3D 12 D6
- Weigand 26 Code
0
111101
10010
11010110
1
Even Check 3D
12
D6
Odd Check
- Weigand 34 Code Weigand 34 Code 0
1101011
111101
10010
11010110
0 Even Check 6B
3D
12
D6
Odd Check
- UART Interface Output UART Interface Output
Data Head Length Card Type Card Type BCC Check Data End
0x02 0x09 0x01 SN0~SN3 XOR Check Except Data Head And Data End 0x03
- Card Type: 0x02 EM4100
0x01 MIFARE 1K
0x03 MIFARE 4K
0x10 HID Card
0x11 T5567
0x20 2nd Card
0x21 ISO14443B
0x22 FELICA
0x30 15693 Label
0x50 CPU Card
0x51 Sector Information
0xFF Keyboard Data
For example: the data received by serial port tool is 02 0A 02 2E 00 B6 D7 B5 F2 03, then
The first byte 0x02 means data start
The second byte 0x0A means the whole data length is 10 bytes, which includes data start and data end
The third byte 0x02 means the card type is EM4100
The fourth to eighth byte (0x2E 0x00 0xB6 0xD7 0xB5) means the read card number, and the fourth byte 0x2E is hidden card number
The ninth byte 0xF2 means BCC check of second byte to eighth byte
The tenth byte 0x03 means data end
Keep away from interference source, and strong interference signal may affect card reading. Select linearity power can improve the card reading distance and effect; switch power may attenuate the distance but will not influence normal operation. The module can operate normally in the range of 3-5V, please do not use higher voltage. This module has high frequency signal, so it may cause some interference to the analog circuit. Uses should place the module a little far away from the buzzer; if the distance is too close, the sound of the buzzer will be low.
- Attendance Fingerprint Read Write Module
- Entrance Guard Intercom Read Write Module
- Replicator
- Attendance fingerprint card reader module
- Entrance guard intercom card reader module
7941W is a multi-protocol dual-band read and write module.set IC and ID read and write one.It can read a variety of IC and ID card.Support Mifare1K,UID card,IC card,T5577 ID card.
- Voltage: DC 5V
- Current: 50mA
- Distance: Mifare>3cm; EM>5cm
- Size: 47mmX26mmX5mm
- Interface: UART, Wiegand
- Support Chips: ISO/IEC 14443 A/MIFARE, NTAG, MF1xxS20, MF1xxS70, MF1xxS50
- EM4100, T5577 read and write function
- Operating Temperature: -25~85 Celsius
- 5V: DC 5V power supply pin; if you use linearity power, it will gain better effects
- RX: receive pin
- TX: transmit pin
- GND: power supply ground pin
- IO: definition
Sending Protocol: Protocol Header | Address | Command | Data Length | Data | XOR Check 2 Byte | 1 Byte | 1 Byte | 1 byte | 1-255 Byte | 1 Byte AB BA
Receiving Protocol: Protocol Header | Address | Command | Data Length | Data | XOR Check (2 byte) | (1 byte) | (1 byte) | (1 byte) | (1 - 255) | (1 byte) CD DC
- Protocol Header: send (0xAB 0xBA)
- Return: (0xCD 0xDC)
- Address: default 0x00
- Command:
- 0x10 read UID number
- 0x11 write UID number (4 bytes), use default password ffffffffffff
- 0x12 read specified sector
- 0x13 write specified sector
- 0x14 modify the password of group A or group B
- 0x15 read ID number
- 0x16 write T5577 number
- 0x17 read all sector data (M1-1K card)
-
0x81 return operation succeeded
-
0x80 return operation failed
-
Data Length: means following data length; if it’s 0, then the following data will not occur
-
Data: read and written data
Sending Data: 1. Read Specified Sector: the first byte of the data represents sector; the second byte means the certain block of the sector; the third byte means A or B group password (0x0A/0x0B); then it comes with password of 6 bytes. 2. Write Specified Sector: the first byte of the data represents sector; the second byte means the certain block of the sector; the third byte means A or B group password (0x0A/0x0B); then it comes with password of 6 bytes and block data of 16 bytes. 3. Modify Password: the first byte means the certain sector; the second byte means A or B group password (0x0A/0x0B); then it comes with old password of 6 byte and new password
Receiving Data: Read specified sector return data format, the first byte is sector; the second byte is the certain block of sector; then it comes with block data of 16 bytes
- XOR check: result of other bytes check except protocol header
AB BA 00 10 00 10
AB BA 00 11 04 6D E9 5C 17 DA
AB BA 00 12 09 00 01 0A FF FF FF FF FF FF 10
AB BA 00 13 19 00 01 0A FF FF FF FF FF FF 00 01 02 03 04 05 06 07 08 09 01 02 03 04 05 06 07
AB BA 00 14 0E 00 0A FF FF FF FF FF FF 01 02 03 04 05 06 17
AB BA 00 15 00 15
AB BA 00 16 05 2E 00 B6 A3 02 2A
AB BA 17 07 0A FF FF FF FF FF FF 1A
- Attendance Fingerprint Read Write Module
- Entrance Guard Intercom Read Write Module
- Replicator