IC卡读卡器Wince开发指南
  • 168网官方开奖结果

    RFID读写模块Wince开发指南

    支持RFID读写模块在Wince5.0和Wince6.0系统应用

    目录
    简介
    RFID模块选型
    RFID模块Wince API-基础函数
    RFID模块Wince API-ISO14443A函数
    RFID模块Wince API-CPU卡函数
    RFID模块Wince API-ISO14443B函数
    RFID模块Wince API-ISO15693函数

    友我科技高频RFID读写模块集成了原装进口的高性能射频芯片,配以多重硬件和软件保护,运行稳定可靠。公司在多年的射频开发和现场经验上,不断地完善和开发出新的RFID产品,以适应各个行业和平台的使用需求。这些RFID模块支持ISO14443-A Mifare One S50,S70,UltraLight,MifarePro,ISO14443-B SR176, ISO15693 ,I CODE SL2 和其他相关兼容卡片。针对WINCE系统,我们发布了yw20x.dll,方便工程师将友我科技的模块潜入到wince系统中。

    目前,友我科技的模块和wince动态库yw20x.dll可以使用在wince5.0和wince6.0,net frame 2.0及以上的系统环境。同时,友我科技为客户提供网络tcpip的wince解决方案和动态库dll,相关需求请联系客服。

    RFID模块型号列表

    型号

    支持卡协议

    供电电压

    接口

    尺寸
    (mm)

    支持卡片

    YW-201

    ISO14443A

    +5V

    IIC,UART(TTL)

    20*40

    Mifare S50,S70,CPU

    YW-201C

    ISO14443A

    +5V

    IIC,UART(TTL)

    60*60

    Mifare S50,S70,CPU

    YW-201C3

    ISO14443A

    +3.3V

    IIC,UART(TTL)

    60*60

    Mifare S50,S70,CPU

    YW-202

    ISO14443A
    ISO14443B

    +5V

    IIC,UART(TTL)

    20*40

    Mifare S50,S70,CPU,SR512

    YW-202C

    ISO14443A
    ISO14443B

    +5V

    IIC,UART(TTL)

    60*60

    Mifare S50,S70,CPU,SR512

    YW-203

    ISO15693

    +5V

    IIC,UART(TTL)

    20*40

    ICode,TagIT,, MB89R118B

    YW-203C

    ISO15693

    +5V

    IIC,UART(TTL)

    60*60

    ICode,TagIT,, MB89R118B

    YW-204

    ISO14443A
    ISO14443B
    ISO15693

    +5V

    IIC,UART(TTL)

    20*40

    Mifare S50,S70,CPU,SR512, ICode,TagIT,, MB89R118B

    YW-204C

    ISO14443A
    ISO14443B
    ISO15693

    +5V

    IIC,UART(TTL)

    60*60

    Mifare S50,S70,CPU,SR512, ICode,TagIT,, MB89R118B

    YW-401

    ISO14443A

    +3.3V

    IIC,UART(TTL)

    38*38

    Mifare S50,S70,CPU

    YW-411

    ISO14443A

    +3.3V

    UART(TTL)

    45*45

    Mifare S50,S70

    1 RFID模块Wince API-基础函数

    1.1 DES加解密函数
    方法:public static extern int DES(byte cModel, byte[] pkey, byte[] pInData, byte[] pOutData);
    参数列表:


    参数

    类型

    方向

    说明

    cModel

    byte

    IN

    DES方式:
    0x00->加密
    0x01->解密

    pkey

    byte[]

    IN

    DES 密钥(8 bytes)

    pInData

    byte[]

    IN

    原始数据(8 bytes)

    pOutData

    byte[]

    OUT

    加密后的数据(8 bytes)

    返回值:0x01->成功,<=0 失败

    1.2 3DES加解密函数
    方法:public static extern int DES3(byte cModel, byte[] pKey, byte[] pInData, byte[] pOutData);
    参数列表:

    参数

    类型

    方向

    说明

    cModel

    byte

    IN

    DES方式:
    0x00->加密
    0x01->解密

    pkey

    byte[]

    IN

    DES密钥(16 bytes)

    pInData

    byte[]

    IN

    原始数据(8 bytes)

    pOutData

    byte[]

    OUT

    加密后的数据(8 bytes)

    返回值:0x01->成功,<=0 失败

    1.3 带向量的3DES加解密函数
    方法:public static extern int DES3_CBC(byte cModel, byte[] pKey,byte[] pInData, byte[] pOutData, byte[] pIV);
    参数列表:

    参数

    类型

    方向

    说明

    cModel

    byte

    IN

    DES方式:
    0x00->加密
    0x01->解密

    pkey

    byte[]

    IN

    DES 密钥(16 bytes)

    pInData

    byte[]

    IN

    原始数据(8 bytes)

    pOutData

    byte[]

    OUT

    加密后的数据(8 bytes)

    pIV

    byte[]

    IN

    Vector(8 bytes)

    返回值:0x01->成功,<=0 失败

    1.4 打开串口
    方法:public static extern int YW_ComInitial(int PortIndex, int Baud);
    参数列表:

    参数

    类型

    方向

    说明

    PortIndex

    int

    IN

    串口号

    Baud

    int

    IN

    波特率

    返回值:0x01->成功,<=0 失败

    1.5 关串口
    方法:public static extern int YW_ComFree()
    参数列表:None

    返回值:0x01->成功,<=0 失败

    1.6 修改模块波特率
    方法:public static extern int YW_ComNewBaud(int NewBaudIndex);
    参数列表:

    参数

    类型

    方向

    说明

    NewBaudIndex

    int

    IN

    0x00->9600
    0x01->19200
    0x02->38400
    0x03->57600
    0x04->115200

    返回值:0x01->成功,<=0 失败

    1.7 开关模块射频天线
    方法:public static extern int YW_AntennaStatus(bool AntOpen,bool AutoRequest)
    参数列表:

    参数

    类型

    方向

    说明

    AntOpen

    bool

    IN

    True: 开天线
    False: 关天线;

    AutoRequest

    bool

    IN

    是否自动寻卡,wince系统请设置成false

    返回值:0x01->成功,<=0 失败

    1.8 寻卡类型设置
    方法:public static extern int YW_SearchCardMode(byte Mode);
    参数列表:

    参数

    类型

    方向

    说明

    Mode

    byte

    IN

    0x41‐类型 A(0x41)
    0x42‐类型B(0x42)
    0x31 –ISO15693(0x31)
    0x53‐SR512

    返回值:0x01->成功,<=0 失败

    1.9 写模块内存
    方法:public static extern int YW_WriteReaderMemory(int AddrBegin, int DataLen, byte[] Data)
    参数列表:

    参数

    类型

    方向

    说明

    AddrBegin

    int

    IN

    起始地址

    DataLen

    int

    IN

    数据长度

    Data

    byte[]

    IN

    数据

    返回值:0x01->成功,<=0 失败

    1.10 读模块内存
    方法:public static extern int YW_ReadReaderMemory(int AddrBegin, int DataLen, byte[] DataRead);
    参数列表:

    参数

    类型

    方向

    说明

    AddrBegin

    int

    IN

    起始地址

    DataLen

    int

    IN

    数据长度

    Data

    byte[]

    OUT

    数据

    返回值:0x01->成功,<=0 失败

    1.11 模块休眠,任何指令可以激活
    方法:public static extern int YW_ModuleSleep()
    参数列表:None

    返回值:0x01->成功,<=0 失败

    1.12 获取IIC地址
    方法:public static extern int YW_ GetIICAddr ();
    参数列表:None

    <=0 失败, >0 IIC 地址

    1.13 设置IIC地址
    方法:public static extern int YW_SetIICAddr(byte IICAddr);
    参数列表:

    参数

    类型

    方向

    说明

    IICAddr

    byte

    IN

    新的IIC地址

    返回值:0x01->成功,<=0 失败

    2 RFID模块Wince API-ISO14443A函数

    2.1 ISO14443A 寻卡
    方法:public static extern int YW_RequestCard(byte CardMode, byte[] CardNo,byte[] OtherInfo);
    参数列表:

    参数

    类型

    方向

    说明

    CardMode

    byte

    IN

    0x00: 所有卡
    0x01: 激活的卡

    CardNo

    byte[]

    OUT

    卡号.

    OtherInfo

    byte[]

    OUT

    其他信息

    <=0 失败, else 返回值 value(>0) is the length of CardNo.

    2.2 读M1卡块数据
    方法:public static extern int YW_ReadaBlock(byte KeyAB,byte KeyMode,byte KeyIndx, byte[] Key, int BlockAddr, byte[] pData)
    参数列表:

    参数

    类型

    方向

    说明

    KeyAB

    byte

    IN

    0x00: Key A
    0x01: Key B

    KeyMode

    byte

    IN

    0x00: 命令密钥
    0x01: 系统密钥

    KeyIndx

    byte

    IN

    如果采用系统密钥 KeyIndx =0 to 31
    如果采用命令密钥KeyIndx=0

    Key

    byte[]

    IN

    命令密钥6 bytes.

    BlockAddr

    int

    IN

    pData

    byte[]

    OUT

    16 bytes 数据

    返回值:0x01->成功,<=0 失败

    2.3 写M1卡块数据
    方法:public static extern int YW_ WriteaBlock (byte KeyAB,byte KeyMode,byte KeyIndx, byte[] Key, int BlockAddr, byte[] pData);
    参数列表:

    参数

    类型

    方向

    说明

    KeyAB

    byte

    IN

    0x00: Key A
    0x01: Key B

    KeyMode

    byte

    IN

    0x00: 命令密钥
    0x01: 系统密钥

    KeyIndx

    byte

    IN

    如果采用系统密钥 KeyIndx =0 to 31
    如果采用命令密钥KeyIndx=0

    Key

    byte[]

    IN

    命令密钥6 bytes.

    BlockAddr

    int

    IN

    pData

    byte[]

    IN

    16 bytes 数据

    返回值:0x01->成功,<=0 失败

    2.4 读M1卡扇区数据
    方法:public static extern int YW_ ReadSector (byte KeyAB,byte KeyMode,byte KeyIndx, byte[] Key, int SectorAddr, byte[] pData);
    参数列表:

    参数

    类型

    方向

    说明

    KeyAB

    byte

    IN

    0x00: Key A
    0x01: Key B

    KeyMode

    byte

    IN

    0x00: 命令密钥
    0x01: 系统密钥

    KeyIndx

    byte

    IN

    如果采用系统密钥 KeyIndx =0 to 31
    如果采用命令密钥KeyIndx=0

    Key

    byte[]

    IN

    命令密钥6 bytes.

    SectorAddr

    int

    IN

    扇区号

    pData

    byte[]

    OUT

    64 bytes 数据

    返回值:0x01->成功,<=0 失败

    2.5 M1卡初始化为钱包(值)
    方法:public static extern int YW_InitiaPurse(byte KeyAB,byte KeyMode,byte KeyIndx, byte[] Key,int BlockAddr, int IniMoney);
    参数列表:

    参数

    类型

    方向

    说明

    KeyAB

    byte

    IN

    0x00: Key A
    0x01: Key B

    KeyMode

    byte

    IN

    0x00: 命令密钥
    0x01: 系统密钥

    KeyIndx

    byte

    IN

    如果采用系统密钥 KeyIndx =0 to 31
    如果采用命令密钥KeyIndx=0

    Key

    byte[]

    IN

    命令密钥6 bytes.

    BlockAddr

    int

    IN

    块号

    IniMoney

    int

    IN

    初始值

    返回值:0x01->成功,<=0 失败

    2.6 M1卡读钱包(值)
    方法:public static extern int YW_ ReadPurse (byte KeyAB,byte KeyMode,byte KeyIndx, byte[] Key,int BlockAddr, ref int Money);
    参数列表:

    参数

    类型

    方向

    说明

    KeyAB

    byte

    IN

    0x00: Key A
    0x01: Key B

    KeyMode

    byte

    IN

    0x00: 命令密钥
    0x01: 系统密钥

    KeyIndx

    byte

    IN

    如果采用系统密钥 KeyIndx =0 to 31
    如果采用命令密钥KeyIndx=0

    Key

    byte[]

    IN

    命令密钥6 bytes.

    BlockAddr

    int

    IN

    块号

    Money

    Ref int

    OUT

    返回值:0x01->成功,<=0 失败

    2.7 M1卡充值钱包(加值)
    方法:public static extern int YW_IncPurse( (byte KeyAB,byte KeyMode,byte KeyIndx, byte[] Key,int BlockAddr, int Money);
    参数列表:

    参数

    类型

    方向

    说明

    KeyAB

    byte

    IN

    0x00: Key A
    0x01: Key B

    KeyMode

    byte

    IN

    0x00: 命令密钥
    0x01: 系统密钥

    KeyIndx

    byte

    IN

    如果采用系统密钥 KeyIndx =0 to 31
    如果采用命令密钥KeyIndx=0

    Key

    byte[]

    IN

    命令密钥6 bytes.

    BlockAddr

    int

    IN

    块号

    Money

    int

    IN

    返回值:0x01->成功,<=0 失败

    2.8 M1卡消费钱包(减值)
    方法:public static extern int YW_DecPurse( (byte KeyAB,byte KeyMode,byte KeyIndx, byte[] Key,int BlockAddr, int Money);
    参数列表:

    参数

    类型

    方向

    说明

    KeyAB

    byte

    IN

    0x00: Key A
    0x01: Key B

    KeyMode

    byte

    IN

    0x00: 命令密钥
    0x01: 系统密钥

    KeyIndx

    byte

    IN

    如果采用系统密钥 KeyIndx =0 to 31
    如果采用命令密钥KeyIndx=0

    Key

    byte[]

    IN

    命令密钥6 bytes.

    BlockAddr

    int

    IN

    块号

    Money

    int

    IN

    返回值:0x01->成功,<=0 失败

    2.9 备份钱包(值)
    方法:public static extern int YW_BakPurse(byte KeyAB,byte KeyMode,byte KeyIndx, byte[] Key,int SrcBlockAddr, int DesBlockAddr);
    参数列表:

    参数

    类型

    方向

    说明

    KeyAB

    byte

    IN

    0x00: Key A
    0x01: Key B

    KeyMode

    byte

    IN

    0x00: 命令密钥
    0x01: 系统密钥

    KeyIndx

    byte

    IN

    如果采用系统密钥 KeyIndx =0 to 31
    如果采用命令密钥KeyIndx=0

    Key

    byte[]

    IN

    命令密钥6 bytes.

    SrcBlockAddr

    int

    IN

    原块号

    DesBlockAddr

    int

    IN

    目的块号
    原块号和目的块号必须在同一个扇区

    返回值:0x01->成功,<=0 失败

    2.10 卡Halt
    方法:public static extern int YW_Halt_();
    参数列表:None

    返回值:0x01->成功,<=0 失败

    2.11 下载密钥
    方法:public static extern int YW_DownKey(int KeyIndex, byte[] Key);
    参数列表:

    参数

    类型

    方向

    说明

    KeyIndex

    byte

    IN

    0 to 31,密钥序号

    Key

    byte[]

    IN

    6 Bytes, 系统密钥

    返回值:0x01->成功,<=0 失败

    2.12 UltraLight读数据
    方法:public static extern int YW_M401UL_Read(byte Block, byte[] pData)
    参数列表:

    参数

    类型

    方向

    说明

    Block

     byte

    IN

    块号

    pData

    byte[]

    OUT

    块数据

    返回值:0x01->成功,<=0 失败

    2.13 UltraLight写数据
    方法:public static extern int YW_M401UL_ Write (byte Block, byte[] pData);
    参数列表:

    参数

    类型

    方向

    说明

    Block

     byte

    IN

    块号

    pData

    byte[]

    IN

    块数据

    返回值:0x01->成功,<=0 失败

    RFID读写器,SDK,IC卡读卡器,开发包,二次开发,智能卡读卡器,RFID读卡器,CPU卡读写器,读卡模块
    168网官方开奖结果 版权所有 (C)2015-2015
    客户服务中心信箱:coodor#126.com(将#改为@).客户服务MSN: coodor#126.com(将#改为@)
    热线直拨: 010-57049038 18910685939 QQ: 896163157,1403463073
    京ICP备14016005号
    友我科技


    1
    RFID读写器产品手册下载
    2
    读写器开发SDK下载
    3
    WEB读卡器开发指南
    4
    Windows读卡器开发指南
    5
    androids读卡器开发指南
    6
    Wince读卡器开发指南
    7
    PLC读卡器开发指南
    8
    Linux读卡器开发指南
    9
    单片机读卡器开发指南
    10
    PCSC读卡器开发指南