1 Star 7 Fork 10

liguang13579/Linux RC522 SPI S50 Read Card Device Drivers

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
rc522_print.txt 9.43 KB
一键复制 编辑 原始数据 按行查看 历史
[root@GT2440 rc522_v1]# insmod gt2440_rc522.ko
gt2440_rc522_init()
gt2440_rc522_probe()
rc522 spi1.0: good to request card: 0x04, 0x00
rc522 spi1.0: good to anticoll card : 0x30, 0x93, 0xb7, 0x4f, 0x5b
rc522 spi1.0: good to select card:
type = 0x04, 0x00
id = 0x30, 0x93, 0xb7, 0x4f, 0x5b
capacity = 0x08 Kbits, 0xb6, 0xdd
1 Read Card:
rc522 spi1.0: good to auth card:
rc522 spi1.0: good to read card: sect=0x0f, blk=0x00
0x00 0x01 0x02 0x03
0x04 0x05 0x06 0x07
0x08 0x09 0x0a 0x0b
0x0c 0x0d 0x0e 0x0f
0x77 0xf5 0x00 0x00
will write card: 0x0f, 0x00
0x00 0x01 0x02 0x03
0x04 0x05 0x06 0x07
0x08 0x09 0x0a 0x0b
0x0c 0x0d 0x0e 0x0f
rc522 spi1.0: good to write card: sect=0x0f, blk=0x00
0x00 0x01 0x02 0x03
0x04 0x05 0x06 0x07
0x08 0x09 0x0a 0x0b
0x0c 0x0d 0x0e 0x0f
2 Read Card:
rc522 spi1.0: good to auth card:
rc522 spi1.0: good to read card: sect=0x0f, blk=0x00
0x00 0x01 0x02 0x03
0x04 0x05 0x06 0x07
0x08 0x09 0x0a 0x0b
0x0c 0x0d 0x0e 0x0f
0x77 0xf5 0x00 0x00
[root@GT2440 rc522_v1]# ls /dev
audio mtd2ro rtc0
console mtd3 shm
controlC0 mtd3ro timer
cpu_dma_latency mtd4 tty
dsp mtd4ro tty0
event0 mtd5 tty1
fb0 mtd5ro tty2
full mtdblock0 tty3
i2c mtdblock1 tty4
kmsg mtdblock2 ttySAC0
log mtdblock3 ttySAC1
mem mtdblock4 ttySAC2
mice mtdblock5 urandom
mixer network_latency usbdev1.1
mmcblk0 network_throughput vcs
mmcblk0p1 null vcs1
mmcblk0p2 pcmC0D0c vcs2
mouse0 pcmC0D0p vcsa
mtd0 ptmx vcsa1
mtd0ro pts vcsa2
mtd1 random watchdog
mtd1ro rc522-1.0 zero
mtd2 root
[root@GT2440 rc522_v1]#
[root@GT2440 rc522_v1]# lsmod
Not tainted
gt2440_rc522 14411 0 - Live 0xbf085000
[root@GT2440 rc522_v1]# ./rc522_test
Request Card:
type: 0x04, 0x00, S50 card
id: 0x30, 0x93, 0xb7, 0x4f, idcsum: 0x5b
id_buf: 0x30, 0x93, 0xb7, 0x4f
cap: 0x08 Kbits, msg: 0xb6, 0xdd
Request Card: end
RC522 Test Card Menu:
lock low sector(0-9) mode:
the user have non permission to write ctrl blk(3)
for low sector(0-9)
Please input the sect number(0-15):15
You select sect: 15
Please select function:
0 : rc522 goto before menu:
1 : rc522 read card test:
2 : rc522 write card test:
3 : rc522 read keya test:
4 : rc522 read keyb test:
5 : rc522 read ctrl area:
6 : rc522 write keya test:
7 : rc522 write keyb test:
8 : rc522 write ctrl area:
9 : rc522 lock low sect test:
10 : rc522 unlock low sect test:
Please input the select number:2
You select 2 function: rc522 write card test:
/***** rc522 write card test: start *****/
write 0x0f sector: start
write 0x00 blk: start
0x03 0x03 0x03 0x03
0x03 0x03 0x03 0x03
0x03 0x03 0x03 0x03
0x03 0x03 0x03 0x03
write 0x00 blk: end
write 0x0f sector: end
/***** rc522 write card test: end *****/
Please select function:
0 : rc522 goto before menu:
1 : rc522 read card test:
2 : rc522 write card test:
3 : rc522 read keya test:
4 : rc522 read keyb test:
5 : rc522 read ctrl area:
6 : rc522 write keya test:
7 : rc522 write keyb test:
8 : rc522 write ctrl area:
9 : rc522 lock low sect test:
10 : rc522 unlock low sect test:
Please input the select number:1
You select 1 function: rc522 read card test:
/***** rc522 read card test: start *****/
read 0x0f sector: start
read 0x00 blk: start
0x03 0x03 0x03 0x03
0x03 0x03 0x03 0x03
0x03 0x03 0x03 0x03
0x03 0x03 0x03 0x03
read 0x00 blk: end
read 0x0f sector: end
/***** rc522 read card test: end *****/
Please select function:
0 : rc522 goto before menu:
1 : rc522 read card test:
2 : rc522 write card test:
3 : rc522 read keya test:
4 : rc522 read keyb test:
5 : rc522 read ctrl area:
6 : rc522 write keya test:
7 : rc522 write keyb test:
8 : rc522 write ctrl area:
9 : rc522 lock low sect test:
10 : rc522 unlock low sect test:
Please input the select number:3
You select 3 function: rc522 read keya test:
/***** rc522 read keya test: start *****/
read 0x0f sector keya: start
0x00 0x00 0x00 0x00
0x00 0x00
read 0x0f sector keya: end
/***** rc522 read keya test: end *****/
Please select function:
0 : rc522 goto before menu:
1 : rc522 read card test:
2 : rc522 write card test:
3 : rc522 read keya test:
4 : rc522 read keyb test:
5 : rc522 read ctrl area:
6 : rc522 write keya test:
7 : rc522 write keyb test:
8 : rc522 write ctrl area:
9 : rc522 lock low sect test:
10 : rc522 unlock low sect test:
Please input the select number:4
You select 4 function: rc522 read keyb test:
/***** rc522 read keyb test: start *****/
read 0x0f sector keyb: start
0xff 0xff 0xff 0xff
0xff 0xff
read 0x0f sector keyb: end
/***** rc522 read keyb test: end *****/
Please select function:
0 : rc522 goto before menu:
1 : rc522 read card test:
2 : rc522 write card test:
3 : rc522 read keya test:
4 : rc522 read keyb test:
5 : rc522 read ctrl area:
6 : rc522 write keya test:
7 : rc522 write keyb test:
8 : rc522 write ctrl area:
9 : rc522 lock low sect test:
10 : rc522 unlock low sect test:
Please input the select number:5
You select 5 function: rc522 read ctrl area:
/***** rc522 read ctrl test: start *****/
read 0x0f sector ctrl: start
0xff 0x07 0x80 0x69
read 0x0f sector ctrl: end
/***** rc522 read ctrl test: end *****/
Please select function:
0 : rc522 goto before menu:
1 : rc522 read card test:
2 : rc522 write card test:
3 : rc522 read keya test:
4 : rc522 read keyb test:
5 : rc522 read ctrl area:
6 : rc522 write keya test:
7 : rc522 write keyb test:
8 : rc522 write ctrl area:
9 : rc522 lock low sect test:
10 : rc522 unlock low sect test:
Please input the select number:6
You select 6 function: rc522 write keya test:
/***** rc522 write keya test: start *****/
write 0x0f sector keya: start
0x00 0x00 0x00 0x00 0x00 0x00
write 0x0f sector keya: end
/***** rc522 write keya test: end *****/
Please select function:
0 : rc522 goto before menu:
1 : rc522 read card test:
2 : rc522 write card test:
3 : rc522 read keya test:
4 : rc522 read keyb test:
5 : rc522 read ctrl area:
6 : rc522 write keya test:
7 : rc522 write keyb test:
8 : rc522 write ctrl area:
9 : rc522 lock low sect test:
10 : rc522 unlock low sect test:
Please input the select number:7
You select 7 function: rc522 write keyb test:
/***** rc522 write keyb test: start *****/
write 0x0f sector keyb: start
0xff 0xff 0xff 0xff 0xff 0xff
write 0x0f sector keyb: end
/***** rc522 write keyb test: end *****/
Please select function:
0 : rc522 goto before menu:
1 : rc522 read card test:
2 : rc522 write card test:
3 : rc522 read keya test:
4 : rc522 read keyb test:
5 : rc522 read ctrl area:
6 : rc522 write keya test:
7 : rc522 write keyb test:
8 : rc522 write ctrl area:
9 : rc522 lock low sect test:
10 : rc522 unlock low sect test:
Please input the select number:8
You select 8 function: rc522 write ctrl area:
rc522 write ctrl test: start *****/
write 0x0f sector ctrl: start
0xff 0x07 0x80 0x69
write 0x0f sector ctrl: end
/***** rc522 write ctrl test: end *****/
Please select function:
0 : rc522 goto before menu:
1 : rc522 read card test:
2 : rc522 write card test:
3 : rc522 read keya test:
4 : rc522 read keyb test:
5 : rc522 read ctrl area:
6 : rc522 write keya test:
7 : rc522 write keyb test:
8 : rc522 write ctrl area:
9 : rc522 lock low sect test:
10 : rc522 unlock low sect test:
Please input the select number:9
You select 9 function: rc522 lock low sect test:
unlock 0x0f sector: end
/***** rc522 unlock low sect test: end *****/
lock low sector(0-9) mode:
the user have non permission to write ctrl blk(3)
for low sector(0-9)
Please select function:
0 : rc522 goto before menu:
1 : rc522 read card test:
2 : rc522 write card test:
3 : rc522 read keya test:
4 : rc522 read keyb test:
5 : rc522 read ctrl area:
6 : rc522 write keya test:
7 : rc522 write keyb test:
8 : rc522 write ctrl area:
9 : rc522 lock low sect test:
10 : rc522 unlock low sect test:
Please input the select number:10
You select 10 function: rc522 unlock low sect test:
/***** rc522 unlock low sect test: start *****/
unlock 0x0f sector: start
unlock low sector(0-9) mode:
the user have all permission to write ctrl blk(3)
for all sector(0-15)
Please select function:
0 : rc522 goto before menu:
1 : rc522 read card test:
2 : rc522 write card test:
3 : rc522 read keya test:
4 : rc522 read keyb test:
5 : rc522 read ctrl area:
6 : rc522 write keya test:
7 : rc522 write keyb test:
8 : rc522 write ctrl area:
9 : rc522 lock low sect test:
10 : rc522 unlock low sect test:
Please input the select number:
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
C
1
https://gitee.com/liguang13579/Linux-RC522-SPI-S50-Read-Card-Device-Drivers.git
git@gitee.com:liguang13579/Linux-RC522-SPI-S50-Read-Card-Device-Drivers.git
liguang13579
Linux-RC522-SPI-S50-Read-Card-Device-Drivers
Linux RC522 SPI S50 Read Card Device Drivers
master

搜索帮助