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. Hardware & Devices
  4. usb communication

usb communication

Scheduled Pinned Locked Moved Hardware & Devices
c++questionhelp
5 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.
  • 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

    C L 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

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

      If you didn't receive any documentation with the device (which is highly doubt), you should contact the supplier of the device because the way to communicate with the device driver is in general specific to the device (so, in other words, we can't help without having much more information).

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

      I 1 Reply Last reply
      0
      • C Cedric Moonen

        If you didn't receive any documentation with the device (which is highly doubt), you should contact the supplier of the device because the way to communicate with the device driver is in general specific to the device (so, in other words, we can't help without having much more information).

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

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

        The problem is that I don't know how to communicate with the driver by using programmming languages. For example I am using Visual C++.What is the code for the communication?I have not the documentation but I will get it. Thanks

        C 1 Reply Last reply
        0
        • I iayd

          The problem is that I don't know how to communicate with the driver by using programmming languages. For example I am using Visual C++.What is the code for the communication?I have not the documentation but I will get it. Thanks

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

          To get a handle to the driver you call CreateFile passing the driver symbolic name (which depends on the device), then you can call ReadFile and WriteFile (if they are implemented by the driver). For more advanced stuff, you can call DeviceIOControl and pass device specific control codes. So, I repeat myself once again (I think you alread asked questions about it yesterday too): we can't help you with more because the codes and the driver symbolic name depends on how they implemented their driver. So, you should have received some documentation with the device. Did you read it before asking questions here ? If you didn't receive documentation, you should contact the supplier of the device.

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

          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

            L Offline
            L Offline
            Lost User
            wrote on last edited by
            #5

            What sort of device is it, and what does it support in the way of IOCTLs? The manufacturer wil know this. To talk to it, as Cedric says, you use CreateFile() DeviceIOControl() etc.

            Morality is indistinguishable from social proscription

            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