Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. C#
  4. Trap and Read magnetic tripe card reader [modified]

Trap and Read magnetic tripe card reader [modified]

Scheduled Pinned Locked Moved C#
helptutorialquestion
3 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • K Offline
    K Offline
    Kaikus
    wrote on last edited by
    #1

    Hi! I'm triying to read a card using a magnetic card reader. Now it's working perfectly in a quite simple way: reader it is pluged USB, and recognized as a HID, like a keyboard. I.E.: If I have focused a TextBox, and I pass a card, readed text is puted there (all three tracks, one after another, CR/LF inserted), directly. But I need to TRAP and read the text when no TextBox or simmilar is focused. I don't need any help about magnetic stripe encodig. I have this info. Just need to know how to get that text. Could you help me, please? Thanks!

    modified on Friday, January 15, 2010 6:56 AM

    OriginalGriffO R 2 Replies Last reply
    0
    • K Kaikus

      Hi! I'm triying to read a card using a magnetic card reader. Now it's working perfectly in a quite simple way: reader it is pluged USB, and recognized as a HID, like a keyboard. I.E.: If I have focused a TextBox, and I pass a card, readed text is puted there (all three tracks, one after another, CR/LF inserted), directly. But I need to TRAP and read the text when no TextBox or simmilar is focused. I don't need any help about magnetic stripe encodig. I have this info. Just need to know how to get that text. Could you help me, please? Thanks!

      modified on Friday, January 15, 2010 6:56 AM

      OriginalGriffO Offline
      OriginalGriffO Offline
      OriginalGriff
      wrote on last edited by
      #2

      If it only emulates a keyboard, you probably can't. It's going to depend on the card reader - it may be possible to switch it to a delimited format (and then you can trap the delimiters) or use it as a standard serial interface. Either way, your best bet is to look at the manufactureer details, or talk direct to them and explain your problem - it can't be something they haven't met before!

      All those who believe in psycho kinesis, raise my hand.

      "I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
      "Common sense is so rare these days, it should be classified as a super power" - Random T-shirt

      1 Reply Last reply
      0
      • K Kaikus

        Hi! I'm triying to read a card using a magnetic card reader. Now it's working perfectly in a quite simple way: reader it is pluged USB, and recognized as a HID, like a keyboard. I.E.: If I have focused a TextBox, and I pass a card, readed text is puted there (all three tracks, one after another, CR/LF inserted), directly. But I need to TRAP and read the text when no TextBox or simmilar is focused. I don't need any help about magnetic stripe encodig. I have this info. Just need to know how to get that text. Could you help me, please? Thanks!

        modified on Friday, January 15, 2010 6:56 AM

        R Offline
        R Offline
        Roger Wright
        wrote on last edited by
        #3

        A card reader emulates a keyboard - any DOS text program can accept input from one. I used to have fun with customers at Ace Hardware when I worked there for a while by opening Notepad, scanning their credit cards, and showing them exactly what information the stripes contained. :-D You should be able to use the CON device as input for a text stream, and capture the data from that. I've never tried it, mind you, but that's where I'd start looking. When you solve it, this would make a nice article for CP, by the way. This is a useful bit that many members would probably find helpful.

        "A Journey of a Thousand Rest Stops Begins with a Single Movement"

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups