Hellou all,
i would like to ask anybody for help with modify script for TWN3.
Now we are using standard script for reading standard 125 KHZ EM MARINE cards.
Problem is that we receive this
080034DC8B
01004D280D
0000053C66
and we would like to get only
34DC8B
4D280D
053C66
i think cut first 4 bytes.
Is here anyboady who can help us and modify script?
Thanks a lot in advance.
Here is source code when anybody wants to help
#include <sys.twn.h>
const byte MAXIDBYTES = 8;
const byte MAXIDBITS = MAXIDBYTES*8;
byte ID[MAXIDBYTES];
byte IDBitCnt;
byte TagType;
byte LastID[MAXIDBYTES];
byte LastIDBitCnt;
byte LastTagType;
void main()
{
Beep(BEEPSUCCESS);
SetVolume(4);
if (GetConnection() == V24)
{
HostSendVersion();
HostSendChar('\r');
}
LEDSet(GREEN,ON);
LEDSet(RED,OFF);
LastTagType = TAGTYPE_NONE;
while (TRUE)
{
if (TagSearch(ID,IDBitCnt,TagType))
{
if (TagType != LastTagType || IDBitCnt != LastIDBitCnt || !CompBits(ID,LastID,MAXIDBITS))
{
CopyBits(LastID,0,ID,0,MAXIDBITS);
LastIDBitCnt = IDBitCnt;
LastTagType = TagType;
Beep(BEEPHIGH);
LEDSet(GREEN,OFF);
LEDSet(RED,BLINK);
if (TagType == TAGTYPE_HIDPROX)
{
if (IDBitCnt < 45)
{
if (IDBitCnt > 32)
{
CopyBits(ID,0,ID,IDBitCnt-32,31);
HostSendDec(ID,31,0);
}
else
{
IDBitCnt -= 2;
CopyBits(ID,0,ID,1,IDBitCnt);
HostSendDec(ID,IDBitCnt,0);
}
}
else
HostSendDec(ID,IDBitCnt,0);
}
else
{
HostSendHex(ID,IDBitCnt,(IDBitCnt+7)/8*2);
}
HostSendChar('\r');
}
StartTimer(0,20);
}
if (TestTimer(0))
{
LEDSet(GREEN,ON);
LEDSet(RED,OFF);
LastTagType = TAGTYPE_NONE;
}
}
}