万能的坛啊,赐我个 忍术学园 下载地址吧
早上电驴上查资料,无意间发现忍者乱太郎出了剧场版,忍术学园全园出动之段,有在线,没下载,想下下来慢慢品,不知道坛上的GGJJ有高清下载地址么?在此谢过!!! 嘿嘿,找到了,过来分享有,有相同爱好的欢迎下载。。。MKV格式ourdev_677045D8RIFL.rar(文件大小:19K) (原文件名:乱太郎种子.rar) 好怀旧的动画片...80后一代人的记忆。我有TV版。 楼主,我想问下你fm1702的东西,我用Authentication一直返回88.导致以读不到卡
status = Request(RF_CMD_REQUEST_ALL);
if(status==FM1702_OK)
status = AntiColl();
if(status==FM1702_OK)
status=Select_Card();
if(status==FM1702_OK)
status=Load_keyE2_CPY(0x02, RF_CMD_AUTH_LA);
RevBuffer=0x02;
RevBuffer=RF_CMD_AUTH_LA;
if(status==FM1702_OK)
status = Authentication(UID, RevBuffer, RevBuffer);
if(status==FM1702_OK)
status=MIF_READ(&RevBuffer,0x08);
我的函数。。。。帮 看看是出了什么问题。。。我不敢确库函数有什么问题的了~~因为这是大佬给的一个函数。但他做了一点就没做~~~ 怀念,记得忍术学校里面功夫最高的是 食堂大娘
经典名句:不许剩饭,全部给我吃完 回复【3楼】zzw223226
-----------------------------------------------------------------------
Load_keyE2_CPY(0x02, RF_CMD_AUTH_LA);
这个函数发上来,还有你密码是多少?跟卡的密码有对应么?
还有你确定是返回88么?
#define FM1702_OK 0 /* 正确 */
#define FM1702_NOTAGERR 1 /* 无卡 */
#define FM1702_CRCERR 2 /* 卡片CRC校验错误 */
#define FM1702_EMPTY 3 /* 数值溢出错误 */
#define FM1702_AUTHERR 4 /* 验证不成功 */
#define FM1702_PARITYERR 5 /* 卡片奇偶校验错误 */
#define FM1702_CODEERR 6 /* 通讯错误(BCC校验错) */
#define FM1702_SERNRERR 8 /* 卡片序列号错误(anti-collision 错误) */
#define FM1702_SELECTERR 9 /* 卡片数据长度字节错误(SELECT错误) */
#define FM1702_NOTAUTHERR 10 /* 卡片没有通过验证 */
#define FM1702_BITCOUNTERR 11 /* 从卡片接收到的位数错误 */
#define FM1702_BYTECOUNTERR 12 /* 从卡片接收到的字节数错误仅读函数有效 */
#define FM1702_RESTERR 13 /* 调用restore函数出错 */
#define FM1702_TRANSERR 14 /* 调用transfer函数出错 */
#define FM1702_WRITEERR 15 /* 调用write函数出错 */
#define FM1702_INCRERR 16 /* 调用increment函数出错 */
#define FM1702_DECRERR 17 /* 调用decrement函数出错 */
#define FM1702_READERR 18 /* 调用read函数出错 */
#define FM1702_LOADKEYERR 19 /* 调用LOADKEY函数出错 */
#define FM1702_FRAMINGERR 20 /* FM1702帧错误 */
#define FM1702_REQERR 21 /* 调用req函数出错 */
#define FM1702_SELERR 22 /* 调用sel函数出错 */
#define FM1702_ANTICOLLERR 23 /* 调用anticoll函数出错 */
#define FM1702_INTIVALERR 24 /* 调用初始化函数出错 */
#define FM1702_READVALERR 25 /* 调用高级读块值函数出错 */
#define FM1702_DESELECTERR 26
#define FM1702_CMD_ERR 42 /* 命令错误 */ 你的代码跟我用的不一样,返回的错误代码都不同,方便的话可以传部分程序上来 /* 函数错误代码定义 ERR CODE*/
#define FM1702_OK 0 /* 正确 */
#define FM1702_NOTAGERR 1 /* 无卡 */
#define FM1702_CRCERR 2 /* 卡片CRC校验错误 */
#define FM1702_EMPTY 3 /* 数值溢出错误 */
#define FM1702_AUTHERR 4 /* 验证不成功 */
#define FM1702_PARITYERR 5 /* 卡片奇偶校验错误 */
#define FM1702_CODEERR 6 /* 通讯错误(BCC校验错) */
#define FM1702_SERNRERR 8 /* 卡片序列号错误(anti-collision 错误) */
#define FM1702_SELECTERR 9 /* 卡片数据长度字节错误(SELECT错误) */
#define FM1702_NOTAUTHERR 10 /* 卡片没有通过验证 */
#define FM1702_BITCOUNTERR 11 /* 从卡片接收到的位数错误 */
#define FM1702_BYTECOUNTERR 12 /* 从卡片接收到的字节数错误仅读函数有效 */
#define FM1702_RESTERR 13 /* 调用restore函数出错 */
#define FM1702_TRANSERR 14 /* 调用transfer函数出错 */
#define FM1702_WRITEERR 15 /* 调用write函数出错 */
#define FM1702_INCRERR 16 /* 调用increment函数出错 */
#define FM1702_DECRERR 17 /* 调用decrement函数出错 */
#define FM1702_READERR 18 /* 调用read函数出错 */
#define FM1702_LOADKEYERR 19 /* 调用LOADKEY函数出错 */
#define FM1702_FRAMINGERR 20 /* FM1702帧错误 */
#define FM1702_REQERR 21 /* 调用req函数出错 */
#define FM1702_SELERR 22 /* 调用sel函数出错 */
#define FM1702_ANTICOLLERR 23 /* 调用anticoll函数出错 */
#define FM1702_INTIVALERR 24 /* 调用初始化函数出错 */
#define FM1702_READVALERR 25 /* 调用高级读块值函数出错 */
#define FM1702_DESELECTERR 26
#define FM1702_CMD_ERR 42 /* 命令错误 */
/****************************************************************/
/*名称: Authentication */
/*功能: 该函数实现密码认证的过程*/
/*输入: UID: 卡片序列号地址*/
/* SecNR: 扇区号*/
/* mode: 模式*/
/*输出: FM1702_NOTAGERR: 无卡*/
/* FM1702_PARITYERR: 奇偶校验错*/
/* FM1702_CRCERR: CRC校验错*/
/* FM1702_OK: 应答正确*/
/* FM1702_AUTHERR: 权威认证有错*/
/****************************************************************/
uchar Authentication(uchar idata *UID, uchar SecNR, uchar mode)
{
uchar idata i;
uchar idata temp, temp1;
uchar temp0;
if(SecNR >= 0x20)
{
temp0 = SecNR -0x20;
SecNR = 0x20 + temp0 * 4;
}
SPIWrite(CRCPresetLSB,0x63);
SPIWrite(CWConductance,0x3f);
// SPIWrite(ModConductance,0X3f);
// temp1 = SPIRead(Control);
// temp1 = temp1 & 0xf7;
// SPIWrite(Control,temp1);
if(mode == RF_CMD_AUTH_LB)
RevBuffer = RF_CMD_AUTH_LB;
else
RevBuffer = RF_CMD_AUTH_LA;
RevBuffer = SecNR * 4 + 3;
for(i = 0; i < 4; i++)
{
RevBuffer = UID;
}
SPIWrite(ChannelRedundancy,0x0f);
temp = Command_Send(6, RevBuffer, Authent1);
if(temp == FALSE)
{
return 0x99;
}
temp = SPIRead(ErrorFlag); //ErrorFlag address is 0x0A.
if((temp & 0x02) == 0x02) return FM1702_PARITYERR;
if((temp & 0x04) == 0x04) return FM1702_FRAMINGERR;
if((temp & 0x08) == 0x08) return FM1702_CRCERR;
temp = Command_Send(0, RevBuffer, Authent2);
if(temp == FALSE)
{
return 0x88;
}
temp = SPIRead(ErrorFlag);
if((temp & 0x02) == 0x02) return FM1702_PARITYERR;
if((temp & 0x04) == 0x04) return FM1702_FRAMINGERR;
if((temp & 0x08) == 0x08) return FM1702_CRCERR;
temp1 = SPIRead(Control);
temp1 = temp1 & 0x08;
if(temp1 == 0x08)
{
return FM1702_OK;
}
return FM1702_AUTHERR;
}
然后就看不懂了~ yuku好快
居然是WB出品 Load_keyE2_CPY
我想看的是这个函数 /****************************************************************/
/*名称: Load_keyE2 LOADKEY*/
/*功能: 该函数实现把E2中密码存入FM1702的keyRevBuffer中*/
/*输入: Secnr: EE起始地址*/
/*输出: True: 密钥装载成功*/
/* False: 密钥装载失败*/
/****************************************************************/
uchar Load_keyE2_CPY(uchar Secnr, uchar Mode)
{
char idata status;
uchar temp;
uchar msb = 0;
uchar lsb = 0;
uchar coded_keys;
uchar temp1;
if(Secnr >= 0x20)
{
temp1 = Secnr - 0x20;
Secnr = 0x20 + temp1 * 4;
}
temp = Secnr * 12;
if(Mode == RF_CMD_AUTH_LA)
{
if(temp >= 0x80)
{
lsb = temp - 0x80;
msb = 0x01;
}
else
{
lsb = temp + 0x80;
msb = 0x00;
}
}
else
{
msb = 0x01;
lsb = temp + 0x40;
}
status = M500HostCodeKey(&RevBuffer,coded_keys);////////////////
status = Write_E2(lsb, msb, 12, coded_keys); ////////////////
if(status != FM1702_OK)
{
return FALSE;
}
return TRUE;
} status = M500HostCodeKey(&RevBuffer,coded_keys);
从RevBuffer到RevBuffer填充的是什么? 应该是解码的吧,密钥什么的吧。现在在看论坛下的程序,努力理解ing~~~~~~~ 如果RevBuffer到RevBuffer你没有手动填充的话,怎么能验证卡的密码正确不正确呢 不太懂,不过感谢你啦
http://www.ourdev.cn/bbs/bbs_content.jsp?bbs_sn=4921700&bbs_page_no=1&search_mode=4&search_text=zzw223226&bbs_id=9999
这个写得相对好懂点。。。自己菜鸟还需要努力呀~~ 楼主我有点明白了 ./emotion/em100.gif
页:
[1]