Thanks Thanks:  0
Likes Likes:  0
Dislikes Dislikes:  0
Results 1 to 6 of 6

Thread: TWN3 Scripting

  1. #1
    coelmay
    Guest

    TWN3 Scripting

    Hi,

    First post and all, so if I muck up, please let me know.

    I have spent considerable time recently working with PaperCut and Elatec TWN3 Mifare card readers. I have documentation which lists all the function and variables for the scripting of these readers, and have enjoyed trying things out (I pretend like it doesn't matter if it things break and do what I want).

    There is one function
    Code:
    void HostSendNumber(byte &Data, byte FirstBit, byte BitCnt, byte Radix, byte MinWidth, byte MaxWidth)
    which I have played with but am yet do get to do anything (my attempts have resulted in the reader beeping, but nothing being sent to the host).

    Has anyone had experience scripting these devices and using this function? I have been unable to find any example code other than what is in the manual.

    This is more for testing purposes at the moment, in event that one day I need to implement a script that uses it.

    Any assistance appreciated.

  2. #2
    Trusted Tech 50+ Posts morpk's Avatar
    Join Date
    Oct 2010
    Location
    Gold Coast
    Posts
    97
    Rep Power
    28

    Re: TWN3 Scripting

    Quote Originally Posted by coelmay View Post
    Hi,

    First post and all, so if I muck up, please let me know.

    I have spent considerable time recently working with PaperCut and Elatec TWN3 Mifare card readers. I have documentation which lists all the function and variables for the scripting of these readers, and have enjoyed trying things out (I pretend like it doesn't matter if it things break and do what I want).

    There is one function
    Code:
    void HostSendNumber(byte &Data, byte FirstBit, byte BitCnt, byte Radix, byte MinWidth, byte MaxWidth)
    which I have played with but am yet do get to do anything (my attempts have resulted in the reader beeping, but nothing being sent to the host).

    Has anyone had experience scripting these devices and using this function? I have been unable to find any example code other than what is in the manual.

    This is more for testing purposes at the moment, in event that one day I need to implement a script that uses it.

    Any assistance appreciated.


    I'm not quite sure what you are trying to achieve here ? could you explain in more detail. i have been working with PaperCut MF for the past few years with Konica Minolta embedded and Y-soft Mifare reader so i will try and help you were i can just need more info

  3. #3
    coelmay
    Guest

    Re: TWN3 Scripting

    Thanks morpk.


    In short, I am testing.


    In this case, I am wanting to test how the function acts when I scan a mifare card (or other depending on reader) and how I can manipulate the data it sends to the host.


    I am trying to use this in place of the HostSendHex() and HostSendDec() functions.


    Normally you would use


    Code:
    HostSendHex( ID, IDBitCnt, (IDBitCnt+7)/8*2 );
    to return a Hexadecimal value to the host.


    Would that then become


    Code:
    HostSendNumber( ID, 0, IDBitCnt, 16, 0, (IDBitCnt+7)/8*2 );
    or do I have this arse-about?

  4. #4
    Trusted Tech 50+ Posts morpk's Avatar
    Join Date
    Oct 2010
    Location
    Gold Coast
    Posts
    97
    Rep Power
    28

    Re: TWN3 Scripting

    oh ok is there a format that you need to use or are you just experimenting, also PaperCut bought in a feature in 12.3 (i think) were it can handle the conversion for you.


    so if you have a reader that supports dec and you might have other readers that support Hex only you can make that device do a dec2hex conversion, i had this with a Government client we had 10 Konica's with reader that supported dec only, then (sales didnt check) when we started putting in more Konica's they put reader that did hex only now PaperCut dosent care if it's one or the other but were the confusion came in a user would register the ID at a machine that supported dec then so the card/ID number papercut registed was 12345 but when they swiped at a machine that did hex they wouldn't sign in because the number was hex and PaperCut had a dec number next to that user. eventually we changed out the readers to all hex readers and all was good in the world but having papercut do the conversion in the mean time helped a lot.


    as for your code, the reader i have used have a utility that i interface with and change it through that so i have never had to worry about code so i wont be much help their.

  5. #5
    coelmay
    Guest

    Re: TWN3 Scripting

    Yeah, I'm just experimenting at the moment (the more I know about it, the better equipped I will be should anything pop up in the future requiring something out of the ordinary—or so I might have myself believe!)

    I can relate to the dec/hex problem you mentioned: I had a similar one recently working with a Toshiba 5520C and several fast release terminals attached to Lanier printers. Unfortunately, the readers on the FRTs read the hex value differently to that of the Toshiba. Turns out the Toshi uses a SwapBytes() function before sending the hex string to the host (PaperCut), so 825DC359 became 59C35D82 when coming from the Toshiba.
    Caused me no end of headache finding the solution, (which, as always, was simpler than initially thought).

    Thanks for replying Moprk

  6. #6
    vajda65
    Guest

    Re: TWN3 Scripting CUT dec

    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.

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Get the Android App
click or scan for the Copytechnet Mobile App

-= -= -= -= -=


IDrive Remote Backup

Lunarpages Internet Solutions

Advertise on Copytechnet

Your Link Here