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. USB3 port: Programmatically force it to operate in USB2 mode

USB3 port: Programmatically force it to operate in USB2 mode

Scheduled Pinned Locked Moved C / C++ / MFC
hardwarequestion
8 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.
  • L Offline
    L Offline
    Leif Simon Goodwin
    wrote on last edited by
    #1

    Is it possible to programmatically under Windows force a USB3 port to operate in USB2 mode, and then at a later time to switch it back into supporting USB3 mode? We need to test that a piece of hardware functions with both USB2 and USB3 connections, and would like to do this programmatically to prevent operator errors.

    L Kornfeld Eliyahu PeterK J 3 Replies Last reply
    0
    • L Leif Simon Goodwin

      Is it possible to programmatically under Windows force a USB3 port to operate in USB2 mode, and then at a later time to switch it back into supporting USB3 mode? We need to test that a piece of hardware functions with both USB2 and USB3 connections, and would like to do this programmatically to prevent operator errors.

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

      It will switch automatically if you plug a USB 2 device in, as the USB 3 pins will not be live. But most PCs these days have both types so it should be fairly simple to do. The only other way I can think of would be in the BIOS somehow, or to remove the 3.0 driver.

      L 1 Reply Last reply
      0
      • L Lost User

        It will switch automatically if you plug a USB 2 device in, as the USB 3 pins will not be live. But most PCs these days have both types so it should be fairly simple to do. The only other way I can think of would be in the BIOS somehow, or to remove the 3.0 driver.

        L Offline
        L Offline
        Leif Simon Goodwin
        wrote on last edited by
        #3

        Yes, I know it will switch to USB 2 mode with a USB 2 device. We need to avoid an operator having to plug the device into a USB 3 port, and then moving it to a USB 2 port, as they can be lazy, or make mistakes. We need the switching to be automatic and fast, and some form of switchable hub that connects to USB 2 and USB 3 ports on the PC may be the answer.

        L 1 Reply Last reply
        0
        • L Leif Simon Goodwin

          Is it possible to programmatically under Windows force a USB3 port to operate in USB2 mode, and then at a later time to switch it back into supporting USB3 mode? We need to test that a piece of hardware functions with both USB2 and USB3 connections, and would like to do this programmatically to prevent operator errors.

          Kornfeld Eliyahu PeterK Offline
          Kornfeld Eliyahu PeterK Offline
          Kornfeld Eliyahu Peter
          wrote on last edited by
          #4

          Do not trust software emulation where you can easily use real hardware... In most computer there are both USB2 and USB3 port, and it is very easy to get a expansion card for $5 if you happened to work with a PC without USB2...

          Skipper: We'll fix it. Alex: Fix it? How you gonna fix this? Skipper: Grit, spit and a whole lotta duct tape.

          "It never ceases to amaze me that a spacecraft launched in 1977 can be fixed remotely from Earth." ― Brian Cox

          1 Reply Last reply
          0
          • L Leif Simon Goodwin

            Yes, I know it will switch to USB 2 mode with a USB 2 device. We need to avoid an operator having to plug the device into a USB 3 port, and then moving it to a USB 2 port, as they can be lazy, or make mistakes. We need the switching to be automatic and fast, and some form of switchable hub that connects to USB 2 and USB 3 ports on the PC may be the answer.

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

            If the device is USB2 then plugging it into a USB3 port will not be a problem, it will run as USB2. I don't quite see what problem you are trying to solve.

            L 1 Reply Last reply
            0
            • L Leif Simon Goodwin

              Is it possible to programmatically under Windows force a USB3 port to operate in USB2 mode, and then at a later time to switch it back into supporting USB3 mode? We need to test that a piece of hardware functions with both USB2 and USB3 connections, and would like to do this programmatically to prevent operator errors.

              J Offline
              J Offline
              Jochen Arndt
              wrote on last edited by
              #6

              You may use an "USB 3 sharing switch" (use that search term). They provide connection of an USB device to two or more computers but may be off course also used to connect to two ports of one computer. These usually have a key to switch the ports and may support auto detection. If you don't want the operator to press the switch key, you may look for one that supports other switching methods. I found at least one that allows switching using a hotkey when connected to a Windows PC. Your test program might then simulate the hotkey activation. If the switch has an auto detection it should be also possible to trigger that by disabling one of the PC USB ports. But I have done such with Linux only so far and don't know how to do that with Windows. Note that this method (like the one initially asked) requires administrative privileges.

              L 1 Reply Last reply
              0
              • J Jochen Arndt

                You may use an "USB 3 sharing switch" (use that search term). They provide connection of an USB device to two or more computers but may be off course also used to connect to two ports of one computer. These usually have a key to switch the ports and may support auto detection. If you don't want the operator to press the switch key, you may look for one that supports other switching methods. I found at least one that allows switching using a hotkey when connected to a Windows PC. Your test program might then simulate the hotkey activation. If the switch has an auto detection it should be also possible to trigger that by disabling one of the PC USB ports. But I have done such with Linux only so far and don't know how to do that with Windows. Note that this method (like the one initially asked) requires administrative privileges.

                L Offline
                L Offline
                Leif Simon Goodwin
                wrote on last edited by
                #7

                Hello Jochen Thank you, that is very helpful. Yours, Leif

                1 Reply Last reply
                0
                • L Lost User

                  If the device is USB2 then plugging it into a USB3 port will not be a problem, it will run as USB2. I don't quite see what problem you are trying to solve.

                  L Offline
                  L Offline
                  Leif Simon Goodwin
                  wrote on last edited by
                  #8

                  Richard, we have a unit that needs to be tested on the production line, prior to shipping to the customer. The unit must work with both USB 2 and USB 3 connections. I won't go into the reasons why we need to test both connections but we do. At present the operator must manually take the USB cable out of the USB 3 socket, and put it into the USB 2 socket, and vice versa, when requested to do so by the test script. This introduces room for error, as they might get confused, and also they might end up damaging the USB socket since they will do this many times each day. So a better solution is to have a software controlled way to switch between USB 2 and USB 3 connections. Jochen's suggestion is a significant improvement on the current scheme.

                  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