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
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. usb communication

usb communication

Scheduled Pinned Locked Moved C / C++ / MFC
c++questionhelp
6 Posts 4 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.
  • I Offline
    I Offline
    iayd
    wrote on last edited by
    #1

    Hi, I want to communicate with a USB device from my PC by using Visual C++.The device is a RF-ID.So I do not need to transfer large files, I only need to read the ID from RF-ID. How can I do that simply? I search the web some but the sources that I found are more advanced than I can understand. Can you seggest me a simple way because I am not much experienced? Thanks for any help ibrahim

    CPalliniC C 2 Replies Last reply
    0
    • I iayd

      Hi, I want to communicate with a USB device from my PC by using Visual C++.The device is a RF-ID.So I do not need to transfer large files, I only need to read the ID from RF-ID. How can I do that simply? I search the web some but the sources that I found are more advanced than I can understand. Can you seggest me a simple way because I am not much experienced? Thanks for any help ibrahim

      CPalliniC Offline
      CPalliniC Offline
      CPallini
      wrote on last edited by
      #2

      I think you'll get more help here [^]. :)

      If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
      This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain Clarke

      In testa che avete, signor di Ceprano?

      1 Reply Last reply
      0
      • I iayd

        Hi, I want to communicate with a USB device from my PC by using Visual C++.The device is a RF-ID.So I do not need to transfer large files, I only need to read the ID from RF-ID. How can I do that simply? I search the web some but the sources that I found are more advanced than I can understand. Can you seggest me a simple way because I am not much experienced? Thanks for any help ibrahim

        C Offline
        C Offline
        Cedric Moonen
        wrote on last edited by
        #3

        You have to get a handle to the driver that is supplied with the USB device (using CreateFile). Then you can communicate with the driver using WriteFile and ReadFile. For more advanced stuff, you can then use DeviceIOControl. Anyway, all of that should be documented with the device. You also need to have the device driver.

        Cédric Moonen Software developer
        Charting control [v1.4]

        I 1 Reply Last reply
        0
        • C Cedric Moonen

          You have to get a handle to the driver that is supplied with the USB device (using CreateFile). Then you can communicate with the driver using WriteFile and ReadFile. For more advanced stuff, you can then use DeviceIOControl. Anyway, all of that should be documented with the device. You also need to have the device driver.

          Cédric Moonen Software developer
          Charting control [v1.4]

          I Offline
          I Offline
          iayd
          wrote on last edited by
          #4

          Firstly I have not the control codes for the device. I am understanding that I should want the control codes from the producer company? And If I know the contol code how can I use it?

          C I 2 Replies Last reply
          0
          • I iayd

            Firstly I have not the control codes for the device. I am understanding that I should want the control codes from the producer company? And If I know the contol code how can I use it?

            C Offline
            C Offline
            Cedric Moonen
            wrote on last edited by
            #5

            Where did you get this device from ? I guess you should have received some documentation with it. Did you take a look at it ?

            Cédric Moonen Software developer
            Charting control [v1.4]

            1 Reply Last reply
            0
            • I iayd

              Firstly I have not the control codes for the device. I am understanding that I should want the control codes from the producer company? And If I know the contol code how can I use it?

              I Offline
              I Offline
              Iain Clarke Warrior Programmer
              wrote on last edited by
              #6

              iayd wrote:

              And If I know the contol code how can I use it?

              No information about the device = use it a paperweight, depending on how pretty it is. I've had to deal with some odd devices in my time, and most supplier companies are quite good at emailling you the obsolete device pdfs if you ask politely and give them some time. After all, you're not spending money with them at the moment... That's already happened. Or get numbers off it, and google it. You'd be surprised just how much info on odd wacky stuff is floating about out there. Once you have the information, you may even get a COM object that does the work for you, or you'll need WriteFile / ReadFile / DeviceIOControl to talk directly to the driver. Iain. -- Edited once I reread original post!

              Plz sir... CPallini CPallini abuz drugz, plz plz help urgent.

              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