TWN3 Scripting

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • coelmay
    • Jun 2025

    #1

    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.
  • morpk
    Technician

    50+ Posts
    • Oct 2010
    • 97

    #2
    Re: TWN3 Scripting

    Originally posted by coelmay
    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

    Comment

    • coelmay

      #3
      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?

      Comment

      • morpk
        Technician

        50+ Posts
        • Oct 2010
        • 97

        #4
        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.

        Comment

        • coelmay

          #5

          Comment

          • vajda65

            #6
            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.

            Comment

            Working...