Is there a way to determine what specific physical USB port a device is connected to in macOS?












3














I have a Nexus 7 tablet attached to a Mac Mini, and I need to figure out what port it is connected to. I am managing someone else’s code, in which they litearally define the port:



/dev/tty.usbserial-A20e1sNr


This port has now changed, and there seem to be about 20 different USB devices hooked up to this computer. Is there a way to figure out what specific port corresponds to the USB port the Nexus 7 tablet is connected to?










share|improve this question















migrated from serverfault.com Jun 28 '13 at 3:11


This question came from our site for system and network administrators.




















    3














    I have a Nexus 7 tablet attached to a Mac Mini, and I need to figure out what port it is connected to. I am managing someone else’s code, in which they litearally define the port:



    /dev/tty.usbserial-A20e1sNr


    This port has now changed, and there seem to be about 20 different USB devices hooked up to this computer. Is there a way to figure out what specific port corresponds to the USB port the Nexus 7 tablet is connected to?










    share|improve this question















    migrated from serverfault.com Jun 28 '13 at 3:11


    This question came from our site for system and network administrators.


















      3












      3








      3







      I have a Nexus 7 tablet attached to a Mac Mini, and I need to figure out what port it is connected to. I am managing someone else’s code, in which they litearally define the port:



      /dev/tty.usbserial-A20e1sNr


      This port has now changed, and there seem to be about 20 different USB devices hooked up to this computer. Is there a way to figure out what specific port corresponds to the USB port the Nexus 7 tablet is connected to?










      share|improve this question















      I have a Nexus 7 tablet attached to a Mac Mini, and I need to figure out what port it is connected to. I am managing someone else’s code, in which they litearally define the port:



      /dev/tty.usbserial-A20e1sNr


      This port has now changed, and there seem to be about 20 different USB devices hooked up to this computer. Is there a way to figure out what specific port corresponds to the USB port the Nexus 7 tablet is connected to?







      macos usb






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Jun 11 '18 at 0:15









      JakeGould

      31k1093137




      31k1093137










      asked Jun 27 '13 at 15:52







      jojo











      migrated from serverfault.com Jun 28 '13 at 3:11


      This question came from our site for system and network administrators.






      migrated from serverfault.com Jun 28 '13 at 3:11


      This question came from our site for system and network administrators.
























          2 Answers
          2






          active

          oldest

          votes


















          0














          /dev/tty.usbserial is USB to serial connection, so other USB devices doesn't show up here. I would recommend listing all usb.serial devices using:



          ls -la /dev/tty.usbserial*


          If there is more than one, disconnect Nexus tablet and list USB connected devices again and check which one disappeared.






          share|improve this answer































            0














            Partial answer:



            You can use ioreg -p IOUSB to see the USB tree is it is registered with the IOKit (or use the System Information app, under Hardware/USB).



            Additionally, ioreg -l -p IOUSB prints properties, among these USB Address (which seems to be the port number of the parent hub), and locationID, which according to the docs is a




            32 bit number which is unique among all USB devices in the system, and which will not change on a system reboot unless the topology of the bus itself changes.




            The value returned by IORegistryEntryGetLocationInPlane, which is displayed after the @ in the ioreg output, also seems to contain some sort of port path, or at least a unique identifier.



            I don't have USB serial devices to play around with here, so I don't know how this information is related to the identifier after tty.usbserial, or if you can obtain this identifier with iokit in another way.






            share|improve this answer





















              Your Answer








              StackExchange.ready(function() {
              var channelOptions = {
              tags: "".split(" "),
              id: "3"
              };
              initTagRenderer("".split(" "), "".split(" "), channelOptions);

              StackExchange.using("externalEditor", function() {
              // Have to fire editor after snippets, if snippets enabled
              if (StackExchange.settings.snippets.snippetsEnabled) {
              StackExchange.using("snippets", function() {
              createEditor();
              });
              }
              else {
              createEditor();
              }
              });

              function createEditor() {
              StackExchange.prepareEditor({
              heartbeatType: 'answer',
              autoActivateHeartbeat: false,
              convertImagesToLinks: true,
              noModals: true,
              showLowRepImageUploadWarning: true,
              reputationToPostImages: 10,
              bindNavPrevention: true,
              postfix: "",
              imageUploader: {
              brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
              contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
              allowUrls: true
              },
              onDemand: true,
              discardSelector: ".discard-answer"
              ,immediatelyShowMarkdownHelp:true
              });


              }
              });














              draft saved

              draft discarded


















              StackExchange.ready(
              function () {
              StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f613041%2fis-there-a-way-to-determine-what-specific-physical-usb-port-a-device-is-connecte%23new-answer', 'question_page');
              }
              );

              Post as a guest















              Required, but never shown
























              2 Answers
              2






              active

              oldest

              votes








              2 Answers
              2






              active

              oldest

              votes









              active

              oldest

              votes






              active

              oldest

              votes









              0














              /dev/tty.usbserial is USB to serial connection, so other USB devices doesn't show up here. I would recommend listing all usb.serial devices using:



              ls -la /dev/tty.usbserial*


              If there is more than one, disconnect Nexus tablet and list USB connected devices again and check which one disappeared.






              share|improve this answer




























                0














                /dev/tty.usbserial is USB to serial connection, so other USB devices doesn't show up here. I would recommend listing all usb.serial devices using:



                ls -la /dev/tty.usbserial*


                If there is more than one, disconnect Nexus tablet and list USB connected devices again and check which one disappeared.






                share|improve this answer


























                  0












                  0








                  0






                  /dev/tty.usbserial is USB to serial connection, so other USB devices doesn't show up here. I would recommend listing all usb.serial devices using:



                  ls -la /dev/tty.usbserial*


                  If there is more than one, disconnect Nexus tablet and list USB connected devices again and check which one disappeared.






                  share|improve this answer














                  /dev/tty.usbserial is USB to serial connection, so other USB devices doesn't show up here. I would recommend listing all usb.serial devices using:



                  ls -la /dev/tty.usbserial*


                  If there is more than one, disconnect Nexus tablet and list USB connected devices again and check which one disappeared.







                  share|improve this answer














                  share|improve this answer



                  share|improve this answer








                  edited Jun 11 '18 at 0:16









                  JakeGould

                  31k1093137




                  31k1093137










                  answered Jun 28 '13 at 13:53









                  BobC

                  1462




                  1462

























                      0














                      Partial answer:



                      You can use ioreg -p IOUSB to see the USB tree is it is registered with the IOKit (or use the System Information app, under Hardware/USB).



                      Additionally, ioreg -l -p IOUSB prints properties, among these USB Address (which seems to be the port number of the parent hub), and locationID, which according to the docs is a




                      32 bit number which is unique among all USB devices in the system, and which will not change on a system reboot unless the topology of the bus itself changes.




                      The value returned by IORegistryEntryGetLocationInPlane, which is displayed after the @ in the ioreg output, also seems to contain some sort of port path, or at least a unique identifier.



                      I don't have USB serial devices to play around with here, so I don't know how this information is related to the identifier after tty.usbserial, or if you can obtain this identifier with iokit in another way.






                      share|improve this answer


























                        0














                        Partial answer:



                        You can use ioreg -p IOUSB to see the USB tree is it is registered with the IOKit (or use the System Information app, under Hardware/USB).



                        Additionally, ioreg -l -p IOUSB prints properties, among these USB Address (which seems to be the port number of the parent hub), and locationID, which according to the docs is a




                        32 bit number which is unique among all USB devices in the system, and which will not change on a system reboot unless the topology of the bus itself changes.




                        The value returned by IORegistryEntryGetLocationInPlane, which is displayed after the @ in the ioreg output, also seems to contain some sort of port path, or at least a unique identifier.



                        I don't have USB serial devices to play around with here, so I don't know how this information is related to the identifier after tty.usbserial, or if you can obtain this identifier with iokit in another way.






                        share|improve this answer
























                          0












                          0








                          0






                          Partial answer:



                          You can use ioreg -p IOUSB to see the USB tree is it is registered with the IOKit (or use the System Information app, under Hardware/USB).



                          Additionally, ioreg -l -p IOUSB prints properties, among these USB Address (which seems to be the port number of the parent hub), and locationID, which according to the docs is a




                          32 bit number which is unique among all USB devices in the system, and which will not change on a system reboot unless the topology of the bus itself changes.




                          The value returned by IORegistryEntryGetLocationInPlane, which is displayed after the @ in the ioreg output, also seems to contain some sort of port path, or at least a unique identifier.



                          I don't have USB serial devices to play around with here, so I don't know how this information is related to the identifier after tty.usbserial, or if you can obtain this identifier with iokit in another way.






                          share|improve this answer












                          Partial answer:



                          You can use ioreg -p IOUSB to see the USB tree is it is registered with the IOKit (or use the System Information app, under Hardware/USB).



                          Additionally, ioreg -l -p IOUSB prints properties, among these USB Address (which seems to be the port number of the parent hub), and locationID, which according to the docs is a




                          32 bit number which is unique among all USB devices in the system, and which will not change on a system reboot unless the topology of the bus itself changes.




                          The value returned by IORegistryEntryGetLocationInPlane, which is displayed after the @ in the ioreg output, also seems to contain some sort of port path, or at least a unique identifier.



                          I don't have USB serial devices to play around with here, so I don't know how this information is related to the identifier after tty.usbserial, or if you can obtain this identifier with iokit in another way.







                          share|improve this answer












                          share|improve this answer



                          share|improve this answer










                          answered Dec 18 '18 at 6:57









                          dirkt

                          9,04231121




                          9,04231121






























                              draft saved

                              draft discarded




















































                              Thanks for contributing an answer to Super User!


                              • Please be sure to answer the question. Provide details and share your research!

                              But avoid



                              • Asking for help, clarification, or responding to other answers.

                              • Making statements based on opinion; back them up with references or personal experience.


                              To learn more, see our tips on writing great answers.





                              Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


                              Please pay close attention to the following guidance:


                              • Please be sure to answer the question. Provide details and share your research!

                              But avoid



                              • Asking for help, clarification, or responding to other answers.

                              • Making statements based on opinion; back them up with references or personal experience.


                              To learn more, see our tips on writing great answers.




                              draft saved


                              draft discarded














                              StackExchange.ready(
                              function () {
                              StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f613041%2fis-there-a-way-to-determine-what-specific-physical-usb-port-a-device-is-connecte%23new-answer', 'question_page');
                              }
                              );

                              Post as a guest















                              Required, but never shown





















































                              Required, but never shown














                              Required, but never shown












                              Required, but never shown







                              Required, but never shown

































                              Required, but never shown














                              Required, but never shown












                              Required, but never shown







                              Required, but never shown







                              Popular posts from this blog

                              How do I know what Microsoft account the skydrive app is syncing to?

                              Grease: Live!

                              When does type information flow backwards in C++?