简体   繁体   English

YL160磁条四合一编码器如何实现读/写?

[英]how to achieve Read/Write on YL160 Magnetic Stripe 4in 1 encoder?

i have recently bought a Magnetic Reader/Writer from China ( YL160 4 in 1 Reader/Writer ) and it came with the Demo application along with the API.我最近从中国购买了一台磁性读写器( YL160 4 合 1 读写器),它附带了演示应用程序以及 API。 What i need mainly from this device is Magnetic Stripe Write, i need to write data to a blank HiCo magnetic card.我主要从这个设备需要的是磁条写入,我需要将数据写入空白的 HiCo 磁卡。

When i open the demo application under the magnetic stripe tab they are two columns当我在磁条选项卡下打开演示应用程序时,它们是两列

  1. Read-Only只读
  2. Read Write读写

演示应用程序

the Read-Only works but the Read/Write doesn't, it refers me to Read-only which suggests the devices doesn't have write capabilities so i went into an API to check in case the demo app is buggy and here is what i found inside 160.h Header file只读有效,但读/写无效,它指的是只读,这表明设备没有写功能,所以我进入 API 以检查演示应用程序是否有问题,这就是我在160.h Header 文件中找到

extern int _stdcall MSR_Init(void);
extern void _stdcall MSR_Exit(void);
extern int _stdcall MSR_DoCancel(void);
extern int _stdcall MSR_Read(void);
extern int _stdcall MSR_Write(unsigned char *TK1Dat, unsigned char *TK2Dat, unsigned char *TK3Dat);
extern int _stdcall MSR_Read_ASCII(void);
extern int _stdcall MSR_Write_ASCII(char *trace1, char *trace2, char *trace3);
extern int _stdcall MSR_Erase(unsigned char mode);
extern int _stdcall MSR_GetTrackData(unsigned char *TK1Dat, unsigned char *TK2Dat, unsigned char *TK3Dat);

extern int _stdcall MSR_Set_HiCo ();
extern int _stdcall MSR_Set_LoCo ();
extern int _stdcall MSR_Get_CoStatus(unsigned char *status);
extern int _stdcall Msr_ChangeAscii(unsigned char *TK1Dat, unsigned char *TK2Dat, unsigned char *TK3Dat);
extern int _stdcall MSR_Write_status(void);
extern int _stdcall MSR_Fast_Init(int portnum);
extern int _stdcall MSR_Get_HwInfo (char *info);
extern void _stdcall MSR_BeepOff (void);
extern void _stdcall MSR_BeepOn (void);
extern int _stdcall MSR_Erase_status(void);
extern int _stdcall MSR_ASC_Read(void);
extern int __stdcall auto_init(void)

And Then This然后这个

extern void __stdcall   MagOpen(void);
extern void __stdcall   MagClose(void);
extern void  __stdcall   MagReset(void);
extern unsigned char __stdcall   MagSwiped(void);
extern unsigned char  __stdcall  MagRead(unsigned char *Track1, unsigned char *Track2,unsigned char *Track3);

Then i thought maybe the demo application is using the MagOpen() to switch the device to Read Mode but there is no function to switch the device to Write Mode .然后我想也许演示应用程序正在使用MagOpen()将设备切换到读取模式,但没有 function 将设备切换到写入模式 i haven't tested MagOpen() with MSR_Write() .我没有用 MSR_Write() 测试MagOpen () Inside the API folder there is Lib160.dll and Lib160.lib在 API 文件夹内有 Lib160.dll 和 Lib160.lib

i have tried to disassemble the Lib160.dll with IDA Pro to see whats happening in MagOpen so i can maybe implement the Write Mode Switch but IDA Pro shows an error about Input.我试图用IDA Pro拆卸Lib160.dll以查看MagOpen中发生的情况,因此我可以实现写入模式切换,但 IDA Pro 显示有关输入的错误。 Further more this device appears in the Device Manager as Microsoft Usbccid Smart Card Reader (WUDF) under Smart Card Readers not on COM Port or HID.此外,此设备在设备管理器中显示为Microsoft Usbccid 智能卡读卡器 (WUDF) ,位于智能卡读卡器下,不在 COM 端口或 HID 上。

Now Here are My questions现在这是我的问题

Is it possible to Check if the Magnetic Head is capable of Write?是否可以检查磁头是否能够写入? if yes How?如果是怎么办?

Can i Replace the Magnetic head with the one with Write Capabilities?我可以用具有写入功能的磁头替换磁头吗?

Please help i need help, Coding is not a problem but the problem is where to start请帮助我需要帮助,编码不是问题,但问题是从哪里开始

Thank you谢谢

Per the product image on Amazon (See ASIN # B09L17C3PG):根据亚马逊上的产品图片(参见 ASIN #B09L17C3PG):

在此处输入图像描述

Magnetic cards are read-only.磁卡是只读的。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM