|
发表于 2014-4-15 10:40:11
|
显示全部楼层
楼主
blockAddr = 7; //数据块7
if (rfid.auth(PICC_AUTHENT1A, blockAddr, sectorKeyA[blockAddr/4], rfid.serNum) == MI_OK) //认证
{
//写数据
status = rfid.write(blockAddr, sectorNewKeyA[blockAddr/4]);
Serial.print("set the new card password, and can modify the data of the Sector: ");
Serial.println(blockAddr/4,DEC);
//写数据
blockAddr = blockAddr - 3 ; //数据块4
status = rfid.write(blockAddr, writeDate);
if(status == MI_OK)
{
Serial.println("Write card OK!");
}
}
这里也不明白 status = rfid.write(blockAddr, sectorNewKeyA[blockAddr/4]);是写到 控制块 7吗,然后我改了unsigned char sectorNewKeyAAA[16][16] = 的{0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xff,0x07,0x80,0x69, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF},为{0x1F, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xff,0x07,0x80,0x69, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF}就不能读出来了,就是密码改了一下就不行了,这么改密码呢? |
|