USB switch

USB switch

Home Forums The Tea Room USB switch

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #36419
    Ian Parkin
    Participant
      @ianparkin39383
      #545618
      Ian Parkin
      Participant
        @ianparkin39383

        Does anyone know if theres such a thing as a usb switch to switch 2 devices into one usb socket?

        i bought a lovely one off amazon but its for connecting 2 computers to one device. and it wont work backwards

        i need it the other way…i cant use a hub…it needs to be switched

        TIA

        #545622
        Stuart Smith 5
        Participant
          @stuartsmith5

          This one might be suitable from CPC:

          **LINK**

          They list others as well.

          Stuart

          #545637
          SillyOldDuffer
          Moderator
            @sillyoldduffer

            Can you explain the requirement more please Ian? I'm not sure it's possible, but some devices might reverse through a mechanical switch

            USB usually expects one end of the link to be a host and the other end to be a client. The client can be a hub fanning out to support multiple clients. Some devices can be a hosts and clients.

            USB is a network technology, not just wires. Devices communicate what sort of device they are and each has a unique address. Usually both ends of the link are intelligent.

            Here's what my computer has plugged in at the moment:

            lsusb.jpg

            The client / host relationship is embedded in a protocol which won't work unless the two ends understand each other. Connecting a USB mouse to an MP3 Player has no effect because they are both clients and can't communicate. However, by plugging them into a hub the mouse and MP3 player can both talk to the computer over a single cable, allowing the mouse to point and click on an application that downloads music on to the MP3 player.

            Note the computer knows what hubs it has and has identified exactly what each plugged in device is so that it can be connected to the right device driver. Device 009 is a Unifying Receiver, which is a USB dongle supporting both mouse and keyboard. Device 014 is an MP3 player, and there are two different Bluetooth transceivers. Devices appear and disappear as the cable is plugged in or out, and they can have wildly different capabilities – Cameras, audio, video, ethernet adaptors, Arduinos, printers, plotters, etc.

            Device recognition would be a problem for a switch sharing two devices with one computer . Throwing the switch would disconnect one device, causing the host to kill whatever program was using it, and instantiate the other, setting it up for another program to use it, but not starting anything unless the programmer is clever. Switching is all allowed – no different from pulling the cable out of one device and plugging it into another, but it's a hard reset in both directions. Is that what's wanted?

            Dave

            #545642
            Ian Parkin
            Participant
              @ianparkin39383

              Its a pioneer head unit in my car with one usb socket on the back so well hidden

              theres a usb extension into it so theres a socket in the glove box

              usually theres an ipod plugged in with a 30 pin plug to usb

              when i want to plug my iphone in to use apple car play ( which has a lightning socket)

              that means unplugging cables etc

              if i could leave the ipod connected and with a switch fire up the lightning cable to my iphone that would be great.

              the pioneer instructions say that hubs cant be used

              #545643
              Ian Parkin
              Participant
                @ianparkin39383

                Stuart

                that looks like it may work but needs sockets changing gender

                ideally i'd like 2 type A for inputs and a lead with a type A or another type A socket so i can use a A to A lead

                #545645
                Ian Parkin
                Participant
                  @ianparkin39383

                  Ive ordered a switched hub off amazon so will see if that works

                  #545652
                  Robert Atkinson 2
                  Participant
                    @robertatkinson2

                    A switch can be made to work for this but the power and data lines must be switched in strict sequence. When connecting the power must be connected first followed by the two data lines. when disconnecting the dats must disconnected first followed by power. This needs a special switch, electronic switching or you could use a 4 position rotary switch with the positions USB 1 active, 1power, 2 power, USB 2 active. To switch all 4 wires would need a 4 pole 4 position which which is expensive, but as the 0V can be left connected a 3 pole 4 position can be used

                    usb swt.jpg

                    HTH,

                    Robert G8RPI.

                    #545669
                    Anonymous

                      USB Hubs used to be very common in the early days of USB. The ports were not switched but connected in parallel and the computer talked to whichever port by it's address on the bus.

                      There were two types, powered and unpowered. If the devices needed to draw much from the 5V line, you definitely needed the powered version with its own power supply.

                      As far as I know, similar devices are still available.

                    Viewing 9 posts - 1 through 9 (of 9 total)
                    • Please log in to reply to this topic. Registering is free and easy using the links on the menu at the top of this page.

                    Latest Replies

                    Home Forums The Tea Room Topics

                    Viewing 25 topics - 1 through 25 (of 25 total)
                    Viewing 25 topics - 1 through 25 (of 25 total)

                    View full reply list.