Not sure if this will be any help to anybody but I also purchased the same RFID reader/writer as Xinyiman yesterday and whilst low cost (£15/18 euros) I must say I expected more information/software. I use Windows 7 at work and straight away had to find/download a working driver!
Anyway I found that the supplied software was not suitable for my needs, it’s a bit clunky and won’t start as a service or even minimise to the system tray. So I decided to have a go at writing a proof of concept application to see is I could come up with anything better. Now there is a good chance I’ve reinvented the wheel and I confess my programming skills are not up to much (so go easy on me folks) but maybe what I have found will be of some help to somebody.
I found the Manufactures web site to be of little use.
The RFID reader is a serial device that connects to the USB using the Prolific USB to Serial chipset.
I had to use a port sniffer to decode the information being passed back and forth.
Ok, first off you need to configure your serial port to the following 38400,8,1
RFID:=SerOpen('COM9');
Sleep(1000);
SerSetParams(RFID,38400,8,NoneParity,1,[]);
To initialize the reader ready for use you need to write to HEX to the port AA DD 00 03 01 02 03 then read the port, wait, and write AA DD 00 04 01 03 0A 08 to the port and then read the port again. If all is well the device should beep and the ID string returned.
RFID:=SerOpen('COM9');
Sleep(1000);
SerSetParams(RFID,38400,8,NoneParity,1,[]);
Buf[0]:=$AA;
Buf[1]:=$DD;
Buf[2]:=$00;
Buf[3]:=$03;
Buf[4]:=$01;
Buf[5]:=$02;
Buf[6]:=$03;
SerWrite(RFID,Buf[0],7);
Sleep(100);
SerRead(RFID,Buf[0],31);
Str:='';
For X:=7 to 31 do
begin
Str:=Str+Char(Buf[X]);
end;
Memo1.Append(Str);
Buf[0]:=$AA;
Buf[1]:=$DD;
Buf[2]:=$00;
Buf[3]:=$04;
Buf[4]:=$01;
Buf[5]:=$03;
Buf[6]:=$0A;
Buf[7]:=$08;
Sleep(100);
SerWrite(RFID,Buf[0],8);
Sleep(100);
SerRead(RFID,Buf[0],8);
To Read from the device is a similar affair, this time writing AA DD 00 03 01 0C 0D then read the port and terminate the command with AA DD 00 04 01 03 0A 08 this will cause the device to beep. The return string is found at bytes 7 - 11.
Buf[0]:=$AA;
Buf[1]:=$DD;
Buf[2]:=$00;
Buf[3]:=$03;
Buf[4]:=$01;
Buf[5]:=$0C;
Buf[6]:=$0D;
SerWrite(RFID,Buf[0],7);
Sleep(100);
SerRead(RFID,Buf[0],13);
Str:='';
For X:=7 to 11 do
begin
Str:=Str+IntToHex(Buf[X],2);
end;
Memo1.Append(Str);
Buf[0]:=$AA;
Buf[1]:=$DD;
Buf[2]:=$00;
Buf[3]:=$04;
Buf[4]:=$01;
Buf[5]:=$03;
Buf[6]:=$0A;
Buf[7]:=$08;
Sleep(100);
SerWrite(RFID,Buf[0],8);
Sleep(100);
SerRead(RFID,Buf[0],8);
That’s as far as I have got, not much granted but a start and not possible without FPC/Lazarus and this most helpful of forums.
Tony