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. Visual Basic
  4. Is there anybody could tell me how to read/write data from/to USB Serial by Visual Basic

Is there anybody could tell me how to read/write data from/to USB Serial by Visual Basic

Scheduled Pinned Locked Moved Visual Basic
tutorial
7 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.
  • B Offline
    B Offline
    Billypon
    wrote on last edited by
    #1

    Is there anybody could tell me how to read/write data from/to USB Serial by Visual Basic

    D I 2 Replies Last reply
    0
    • B Billypon

      Is there anybody could tell me how to read/write data from/to USB Serial by Visual Basic

      D Offline
      D Offline
      Dave Kreskowiak
      wrote on last edited by
      #2

      You don't read/write data to the port, you do it to the device attached to the port. How you do this depends on the device itself and what methods it exposes. Since you mentioned Serial, I assume the device exposes itself as being attached to a COM port, in which case, you'd be looking for examples on Serial Communication.

      A guide to posting questions on CodeProject[^]
      Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
           2006, 2007

      B 1 Reply Last reply
      0
      • D Dave Kreskowiak

        You don't read/write data to the port, you do it to the device attached to the port. How you do this depends on the device itself and what methods it exposes. Since you mentioned Serial, I assume the device exposes itself as being attached to a COM port, in which case, you'd be looking for examples on Serial Communication.

        A guide to posting questions on CodeProject[^]
        Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
             2006, 2007

        B Offline
        B Offline
        Billypon
        wrote on last edited by
        #3

        Oh,I see! I guessed I can not read/write data to the port,too! But my friend need to do it,and she tell me nothing about the device. Thanks a lot! Let me try another way to do it, or if somebody has another good idea,tell me,please!

        D 2 Replies Last reply
        0
        • B Billypon

          Oh,I see! I guessed I can not read/write data to the port,too! But my friend need to do it,and she tell me nothing about the device. Thanks a lot! Let me try another way to do it, or if somebody has another good idea,tell me,please!

          D Offline
          D Offline
          Dave Kreskowiak
          wrote on last edited by
          #4

          Billypon wrote:

          But my friend need to do it,

          Like I said, you don't talk to the USB interface directly. You MUST have some API to talk to the device itself. Without knowing anything about the device, there's nothing you can do that will work.

          A guide to posting questions on CodeProject[^]
          Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
               2006, 2007

          1 Reply Last reply
          0
          • B Billypon

            Oh,I see! I guessed I can not read/write data to the port,too! But my friend need to do it,and she tell me nothing about the device. Thanks a lot! Let me try another way to do it, or if somebody has another good idea,tell me,please!

            D Offline
            D Offline
            Dave Kreskowiak
            wrote on last edited by
            #5

            This is not like a serial or parallel port where you can talk to any device plugged into it just by talking to the port. USB is a BUS, not a port. You have to address devices to talk to them. This is something that is left up to the driver of the device. Like I've said before, you need to know about the device and the API exposed by either the driver or some SDK for the device.

            A guide to posting questions on CodeProject[^]
            Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
                 2006, 2007

            1 Reply Last reply
            0
            • B Billypon

              Is there anybody could tell me how to read/write data from/to USB Serial by Visual Basic

              I Offline
              I Offline
              ips_sun
              wrote on last edited by
              #6

              Hi, To Read/Write From USB Port, u will have to use "MSComm" Control. Check this Link : http://msdn.microsoft.com/library/default.asp?url=/library/en-us/comm98/html/vbobjcommx.asp[^]http://support.microsoft.com/kb/194922[^]Regards ips

              B 1 Reply Last reply
              0
              • I ips_sun

                Hi, To Read/Write From USB Port, u will have to use "MSComm" Control. Check this Link : http://msdn.microsoft.com/library/default.asp?url=/library/en-us/comm98/html/vbobjcommx.asp[^]http://support.microsoft.com/kb/194922[^]Regards ips

                B Offline
                B Offline
                Billypon
                wrote on last edited by
                #7

                "MSComm" control is not use for USB Port

                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