question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

What are Types of Ports?

See original GitHub issue

The documentation, list 9 says it this way:

Go into the P. Edit & Create USBMap.kext menu and change the types to match the physical port types and toggle which ports (up to 15) you want to preserve.

Okay, so in the terminal, while using the tool, it says:

  • Change types using this formula T:1,2,3,4,5:t where t is the type

But… what is the type?

I assume the type is written with big and small letters, so it’s why it’s Tt there. Or not?

Is it S or A?

  • S:1,2,3,4,5:sS for speed,
  • or A:1,2,3,4,5:aA for USB-A

Is it 2 and 3?

  • or should it be 2:1,2,3,4,5:22 for USB-2
  • and then 3:1,2,3,4,5:33 for USB-3

Is it HS and SS?

  • or is it HS:1,2,3,4,5:hsHS for High Speed
  • and then SS:1,2,3,4,5:ssSS for Super Speed

Is it H plus s and S plus s?

  • or is it H:1,2,3,4,5:sH and s for High Speed
  • and then S:1,2,3,4,5:sS and s for Super Speed

Is it always T plus only different type in the end of the line?

  • T:1,2,3,4,5: + letter or number?

In my listing I have it written this way:

[#]  1. HS01 | AppleUSB20XHCIPort |  1 (01000000) | 14100000 | Type 3
    Front-Left-USB2
...
[#] 18. SS04 | AppleUSB30XHCIPort | 19 (13000000) | 14200000 | Type 3
    Back-Down-6-USB3

So what a type is here? HS and SS in the beginning of the line, or the number after each Type word? I have 3 for all the ports I have.

I assume this step is needed, that’s why it’s written. But I have absolutely no idea what does it do here, why won’t I skip it and how to make it.

Would be great to explain.

Issue Analytics

  • State:open
  • Created a year ago
  • Comments:7 (1 by maintainers)

github_iconTop GitHub Comments

2reactions
corpnewtcommented, May 31, 2022

Hey there - it seems that you’ve found out what the type values are for (they represent the physical port the port personality is attached to). Yes, type 0 is for USB 2 Type-A, and type 3 is for USB 3 Type-A ports. Worth noting that USBMap also has a T menu in the P. Edit & Create USBMap.kext menu which displays the same table as USBMapInjectorEdit (relevant code linked here).

As for why we set the types - macOS uses that information to determine whether things can be hot-plugged (plugged in after boot), and setting proper port types can help with some sleep issues.

Regarding documentation - I’ve been trying to get the drive to write a full fledged guide on the topic - but there’s tons to cover, and I haven’t gotten around to it yet. I know it’s difficult to locate at times, and there are some cyclic sources out there. If you have other questions, feel free to ask here, and if I know the answers I’ll chime in though.

-CorpNewt

0reactions
walteweisscommented, May 31, 2022

So, summarizing the long post. I think it may be closed, as my issue was solved, by trials and errors.

But before doing that I would recommend to add some info for the type somewhere (at least Readme.md)

Maybe add some more info in the tool, like that:

Change types using this formula T:1,2,3,4,5:t where t is the type (number from 0 to 10, or 255, see the documentation)

But where is that documentation?

or

Change types using this formula T:1,2,3,4,5:t where t is the type (number from 0 to 10, or 255), e.g. T:1:0 for USB-2 A port or T:16:3 for USB-3 A port.


Also, one question is still relevant:

What if we won’t do that? What’s the difference?

Read more comments on GitHub >

github_iconTop Results From Across the Web

16 Types of Computer Ports and Their Functions
A complete guide on 16 types of Computer Ports like PS/2, USB, HDMI, DVI, RJ45, USB Type C, Serial, Parallel, Audio, VGA, DisplayPort....
Read more >
A visual guide to computer ports and their functions - Recompute
Today's computers and mobile devices are available with a wide array of ports, from traditional USB to newfangled USB Type-C and Thunderbolt 3...
Read more >
What Are Different Types of Ports For Ships? - Marine Insight
There are five major types of natural or artificial ports: Inland port, fishing port, dry port, warm water port and seaport. Among all...
Read more >
Types Of Computer Ports And Their Function - TechNewsToday
Different Types of Computer Ports · PS/2 Port · Serial Port · Parallel Port · FireWire Port · Game Port · SCSI Port...
Read more >
11 Types of Computer Ports and How To Use Them (With Tips)
11 types of computer ports · 1. HDMI · 2. RCA · 3. USB-A · 4. USB-B · 5. USB-C · 6. USB...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found