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. Visual Basic
  4. USB

USB

Scheduled Pinned Locked Moved Visual Basic
tutorialquestion
10 Posts 2 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.
  • S Offline
    S Offline
    Sushmadm
    wrote on last edited by
    #1

    Hi all, Can someone tell me how to use USB port for communication in VB? Thanks in advance, sushma

    D 1 Reply Last reply
    0
    • S Sushmadm

      Hi all, Can someone tell me how to use USB port for communication in VB? Thanks in advance, sushma

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

      That depends entirely on the device you want to talk to. There is no such thing as "generic" code that lets you talk to any device on USB. Most of teh time, this will require lower level calls to the devices drivers. RageInTheMachine9532 "...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome

      S 1 Reply Last reply
      0
      • D Dave Kreskowiak

        That depends entirely on the device you want to talk to. There is no such thing as "generic" code that lets you talk to any device on USB. Most of teh time, this will require lower level calls to the devices drivers. RageInTheMachine9532 "...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome

        S Offline
        S Offline
        Sushmadm
        wrote on last edited by
        #3

        Thanx so much for responding to my post.I must establish communication between two PCs through USB port.I have no idea of how to go about it.Please tell me what are the pre-requisits for programming a USB port. Thanx again, sushma

        D 1 Reply Last reply
        0
        • S Sushmadm

          Thanx so much for responding to my post.I must establish communication between two PCs through USB port.I have no idea of how to go about it.Please tell me what are the pre-requisits for programming a USB port. Thanx again, sushma

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

          First, you need a special USB host-to-host cable to connect them. Using any old USB cable you get for connecting devices to the PC can blow the ports on both PC's. After that, you install the drivers and end up with a 2 machine network that works over TCP/IP. There's nothing you do in your source code to specially handle USB networks. To your code, it looks just like any other TCP/IP network. USB PC to PC Network Cable TCP/IP[^] RageInTheMachine9532 "...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome -- modified at 7:48 Monday 19th December, 2005

          S 1 Reply Last reply
          0
          • D Dave Kreskowiak

            First, you need a special USB host-to-host cable to connect them. Using any old USB cable you get for connecting devices to the PC can blow the ports on both PC's. After that, you install the drivers and end up with a 2 machine network that works over TCP/IP. There's nothing you do in your source code to specially handle USB networks. To your code, it looks just like any other TCP/IP network. USB PC to PC Network Cable TCP/IP[^] RageInTheMachine9532 "...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome -- modified at 7:48 Monday 19th December, 2005

            S Offline
            S Offline
            Sushmadm
            wrote on last edited by
            #5

            Hi Dave, I got few modules(hidinterface,osinterface,USBmAPI) and DLLs(USBm.dll,APIGID32.DLL).I got these from intel site(u may be knowing about these). Cant i work on my program using these?

            D 1 Reply Last reply
            0
            • S Sushmadm

              Hi Dave, I got few modules(hidinterface,osinterface,USBmAPI) and DLLs(USBm.dll,APIGID32.DLL).I got these from intel site(u may be knowing about these). Cant i work on my program using these?

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

              Why? So you can take 10 times longer to write your app? Do you have any idea how USB works? How to enumerate devices on the bus, select a device, communicate with another host on the bus? This is very specialized stuff and there is not alot of documentation out there on how to do it. You won't find any code in VB.NET that show you how to do this. You're re-inventing the wheel when you don't have to... RageInTheMachine9532 "...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome

              S 1 Reply Last reply
              0
              • D Dave Kreskowiak

                Why? So you can take 10 times longer to write your app? Do you have any idea how USB works? How to enumerate devices on the bus, select a device, communicate with another host on the bus? This is very specialized stuff and there is not alot of documentation out there on how to do it. You won't find any code in VB.NET that show you how to do this. You're re-inventing the wheel when you don't have to... RageInTheMachine9532 "...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome

                S Offline
                S Offline
                Sushmadm
                wrote on last edited by
                #7

                Thanks so much for ur suggestion.Please tell me which driver software i must install?What is the cost of the driver software?What are the necessary steps to be followed after installing that?.I have worked on RS232 serial communication using MScomm activex control in VB.I just want to know whether i will be able to implement the same with USB? Will the driver software be flexible like an activex control?. Initially i will be working on PC to PC communication.Later on i must write program for establishing communication between PC and Hand Held Controller.Please do help me with this, i will be very greatful to u. Thanx again, Sushma

                D 1 Reply Last reply
                0
                • S Sushmadm

                  Thanks so much for ur suggestion.Please tell me which driver software i must install?What is the cost of the driver software?What are the necessary steps to be followed after installing that?.I have worked on RS232 serial communication using MScomm activex control in VB.I just want to know whether i will be able to implement the same with USB? Will the driver software be flexible like an activex control?. Initially i will be working on PC to PC communication.Later on i must write program for establishing communication between PC and Hand Held Controller.Please do help me with this, i will be very greatful to u. Thanx again, Sushma

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

                  Sushmadm wrote:

                  Please tell me which driver software i must install?

                  Usually comes with the cable you need...

                  Sushmadm wrote:

                  What is the cost of the driver software?

                  Comes with the cable!

                  Sushmadm wrote:

                  What are the necessary steps to be followed after installing that?

                  Read the documentation that comes with the cable!

                  Sushmadm wrote:

                  I have worked on RS232 serial communication using MScomm activex control in VB.I just want to know whether i will be able to implement the same with USB?

                  No. Like I said before, it works just like any other TCP/IP network. Your Serial Comm experience won't help you.

                  Sushmadm wrote:

                  Will the driver software be flexible like an activex control?.

                  How should I know? I've never done this before. The information you're getting is from the small amount of YOUR homework I've done!

                  Sushmadm wrote:

                  Hand Held Controller.Please do help me with this,

                  Like I said, no experience with it. This part will depend HEAVILY on your device and your application on it. Look, you're going to have to do your own homework on this. What your doing is rarely done and adding a "handheld device" to this will further restrict the help you get from anyone because of the VERY specialized nature of what your trying to do. If you don't already understand TCP/IP networking, if your device and application even support this, start picking up some books on it. You're most definately going to need them. RageInTheMachine9532 "...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome

                  S 2 Replies Last reply
                  0
                  • D Dave Kreskowiak

                    Sushmadm wrote:

                    Please tell me which driver software i must install?

                    Usually comes with the cable you need...

                    Sushmadm wrote:

                    What is the cost of the driver software?

                    Comes with the cable!

                    Sushmadm wrote:

                    What are the necessary steps to be followed after installing that?

                    Read the documentation that comes with the cable!

                    Sushmadm wrote:

                    I have worked on RS232 serial communication using MScomm activex control in VB.I just want to know whether i will be able to implement the same with USB?

                    No. Like I said before, it works just like any other TCP/IP network. Your Serial Comm experience won't help you.

                    Sushmadm wrote:

                    Will the driver software be flexible like an activex control?.

                    How should I know? I've never done this before. The information you're getting is from the small amount of YOUR homework I've done!

                    Sushmadm wrote:

                    Hand Held Controller.Please do help me with this,

                    Like I said, no experience with it. This part will depend HEAVILY on your device and your application on it. Look, you're going to have to do your own homework on this. What your doing is rarely done and adding a "handheld device" to this will further restrict the help you get from anyone because of the VERY specialized nature of what your trying to do. If you don't already understand TCP/IP networking, if your device and application even support this, start picking up some books on it. You're most definately going to need them. RageInTheMachine9532 "...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome

                    S Offline
                    S Offline
                    Sushmadm
                    wrote on last edited by
                    #9

                    Thanks so much for ur suggestion.It will be of great help to me. Thanx again, Sushma

                    1 Reply Last reply
                    0
                    • D Dave Kreskowiak

                      Sushmadm wrote:

                      Please tell me which driver software i must install?

                      Usually comes with the cable you need...

                      Sushmadm wrote:

                      What is the cost of the driver software?

                      Comes with the cable!

                      Sushmadm wrote:

                      What are the necessary steps to be followed after installing that?

                      Read the documentation that comes with the cable!

                      Sushmadm wrote:

                      I have worked on RS232 serial communication using MScomm activex control in VB.I just want to know whether i will be able to implement the same with USB?

                      No. Like I said before, it works just like any other TCP/IP network. Your Serial Comm experience won't help you.

                      Sushmadm wrote:

                      Will the driver software be flexible like an activex control?.

                      How should I know? I've never done this before. The information you're getting is from the small amount of YOUR homework I've done!

                      Sushmadm wrote:

                      Hand Held Controller.Please do help me with this,

                      Like I said, no experience with it. This part will depend HEAVILY on your device and your application on it. Look, you're going to have to do your own homework on this. What your doing is rarely done and adding a "handheld device" to this will further restrict the help you get from anyone because of the VERY specialized nature of what your trying to do. If you don't already understand TCP/IP networking, if your device and application even support this, start picking up some books on it. You're most definately going to need them. RageInTheMachine9532 "...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome

                      S Offline
                      S Offline
                      Sushmadm
                      wrote on last edited by
                      #10

                      Hi Dave, Thanks so much for all ur suggestions. I have baught a USB cable which comes along with a driver.The driver after installed creates a COM port for USB port as soon as the USB cable is plugged in.Hence i can access the USB port just like a com port. It made my job very easy! Thanx again, Sushma

                      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