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. virtual USB device

virtual USB device

Scheduled Pinned Locked Moved C#
csharpjsonhelpquestion
7 Posts 4 Posters 1 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.
  • G Offline
    G Offline
    Grimes
    wrote on last edited by
    #1

    Hi there I am currently looking for help in writing a C# application that would 'trick' the OS into thinking there is a USB device connected. I would like to know if this is even possible and whether it is even possible in C#. Well, I'll explain in greater detail what I am trying to do. The company I work for has bought software that interfaces with USB devices (Smart card readers), we develop smart cards, and we also have several applications that simulate smart cards to test with. It would help us a lot if it was possible to let the software we bought interface with our simulators instead of the smart card readers. This is unfortunately not possible, their software can't be configured to communicate with anything other than smart card readers. I am hoping it is possible to create an application that is a virtual smart card reader, and this application would relay all the data their software sends to the virtual card reader to our simulator. (is this possible or am I living in a dream world?? which I tend to do a lot :) ). If this is possible, can it be done in C# or will I have to use WIN API calls? I have found many C# projects that have classes to communicate with USB devices, but I have not found any that emulates a USB device. Any help will be greatly appreciated or if you can point me to reading material regarding the matter, that will also help me a lot. :) Regards Riaan

    KOM UIT DAAAAA!!!

    R B J 3 Replies Last reply
    0
    • G Grimes

      Hi there I am currently looking for help in writing a C# application that would 'trick' the OS into thinking there is a USB device connected. I would like to know if this is even possible and whether it is even possible in C#. Well, I'll explain in greater detail what I am trying to do. The company I work for has bought software that interfaces with USB devices (Smart card readers), we develop smart cards, and we also have several applications that simulate smart cards to test with. It would help us a lot if it was possible to let the software we bought interface with our simulators instead of the smart card readers. This is unfortunately not possible, their software can't be configured to communicate with anything other than smart card readers. I am hoping it is possible to create an application that is a virtual smart card reader, and this application would relay all the data their software sends to the virtual card reader to our simulator. (is this possible or am I living in a dream world?? which I tend to do a lot :) ). If this is possible, can it be done in C# or will I have to use WIN API calls? I have found many C# projects that have classes to communicate with USB devices, but I have not found any that emulates a USB device. Any help will be greatly appreciated or if you can point me to reading material regarding the matter, that will also help me a lot. :) Regards Riaan

      KOM UIT DAAAAA!!!

      R Offline
      R Offline
      Rutvik Dave
      wrote on last edited by
      #2

      I am not sure but this[^] might be useful. (I think it's the reverse way...)

      G 1 Reply Last reply
      0
      • R Rutvik Dave

        I am not sure but this[^] might be useful. (I think it's the reverse way...)

        G Offline
        G Offline
        Grimes
        wrote on last edited by
        #3

        Hi, thanks for the reply. That project looks very interesting, however it seems like they use a cellphone or some other mobile device that runs the emulation software, it seems like it is only a replacement for an actual smart card reader, so this is not exactly what I am looking for. thanks for the reply though.

        KOM UIT DAAAAA!!!

        1 Reply Last reply
        0
        • G Grimes

          Hi there I am currently looking for help in writing a C# application that would 'trick' the OS into thinking there is a USB device connected. I would like to know if this is even possible and whether it is even possible in C#. Well, I'll explain in greater detail what I am trying to do. The company I work for has bought software that interfaces with USB devices (Smart card readers), we develop smart cards, and we also have several applications that simulate smart cards to test with. It would help us a lot if it was possible to let the software we bought interface with our simulators instead of the smart card readers. This is unfortunately not possible, their software can't be configured to communicate with anything other than smart card readers. I am hoping it is possible to create an application that is a virtual smart card reader, and this application would relay all the data their software sends to the virtual card reader to our simulator. (is this possible or am I living in a dream world?? which I tend to do a lot :) ). If this is possible, can it be done in C# or will I have to use WIN API calls? I have found many C# projects that have classes to communicate with USB devices, but I have not found any that emulates a USB device. Any help will be greatly appreciated or if you can point me to reading material regarding the matter, that will also help me a lot. :) Regards Riaan

          KOM UIT DAAAAA!!!

          B Offline
          B Offline
          Bernhard Hiller
          wrote on last edited by
          #4

          There exist some virtualization softwares which let you access USB devices connected to a different computer as if they were connected to your local computer, e.g. http://www.fabulatech.com/usb-over-network.html[^]. Hence I think that your emulator should be possible, as the virtualization software somehow pretends the presence of a local USB device. But I do not know how to write it.

          G 1 Reply Last reply
          0
          • B Bernhard Hiller

            There exist some virtualization softwares which let you access USB devices connected to a different computer as if they were connected to your local computer, e.g. http://www.fabulatech.com/usb-over-network.html[^]. Hence I think that your emulator should be possible, as the virtualization software somehow pretends the presence of a local USB device. But I do not know how to write it.

            G Offline
            G Offline
            Grimes
            wrote on last edited by
            #5

            Thanks for the Reply. I actually stumbled onto the same program, so I am also convinced it must be possible, but how remains the big question :)

            KOM UIT DAAAAA!!!

            1 Reply Last reply
            0
            • G Grimes

              Hi there I am currently looking for help in writing a C# application that would 'trick' the OS into thinking there is a USB device connected. I would like to know if this is even possible and whether it is even possible in C#. Well, I'll explain in greater detail what I am trying to do. The company I work for has bought software that interfaces with USB devices (Smart card readers), we develop smart cards, and we also have several applications that simulate smart cards to test with. It would help us a lot if it was possible to let the software we bought interface with our simulators instead of the smart card readers. This is unfortunately not possible, their software can't be configured to communicate with anything other than smart card readers. I am hoping it is possible to create an application that is a virtual smart card reader, and this application would relay all the data their software sends to the virtual card reader to our simulator. (is this possible or am I living in a dream world?? which I tend to do a lot :) ). If this is possible, can it be done in C# or will I have to use WIN API calls? I have found many C# projects that have classes to communicate with USB devices, but I have not found any that emulates a USB device. Any help will be greatly appreciated or if you can point me to reading material regarding the matter, that will also help me a lot. :) Regards Riaan

              KOM UIT DAAAAA!!!

              J Offline
              J Offline
              John Clegg
              wrote on last edited by
              #6

              I had a similar problem a few years back. The solution I came up with was to access the card reader through a DLL. For automated testing the DLL was replaced with a test version that allowed virtual smart card "images" to be inserted/removed (data stored in files one per virtual card). This also allowed testing without someone physically swapping cards. Of course you need to ensure that the release code can't be duped into accepting a test DLL+virtual card.

              G 1 Reply Last reply
              0
              • J John Clegg

                I had a similar problem a few years back. The solution I came up with was to access the card reader through a DLL. For automated testing the DLL was replaced with a test version that allowed virtual smart card "images" to be inserted/removed (data stored in files one per virtual card). This also allowed testing without someone physically swapping cards. Of course you need to ensure that the release code can't be duped into accepting a test DLL+virtual card.

                G Offline
                G Offline
                Grimes
                wrote on last edited by
                #7

                This is an interesting approach to the problem I am having. I found C# libraries to interact with existing devices, I could try to forward all the Data that is sent to a card reader to our simulator. It's kind of a hack but it could work! Thanks for the reply!

                KOM UIT DAAAAA!!!

                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