简体   繁体   中英

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. What i need mainly from this device is Magnetic Stripe Write, i need to write data to a blank HiCo magnetic card.

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

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 . i haven't tested MagOpen() with MSR_Write() . Inside the API folder there is Lib160.dll and 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. 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.

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):

在此处输入图像描述

Magnetic cards are read-only.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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