corpnewt / USBMap

Python script for mapping USB ports in macOS and creating a custom injector kext.
MIT License
1.06k stars 89 forks source link

Type -1, what's that? #40

Closed oldman20 closed 2 years ago

oldman20 commented 2 years ago

Hi, i followed GUIDE and tested with USBMap and Hackintool, seem clean ports, but i can see some ports in hackintool are PR12, HS01 or PR01, PR12 in USBMap like this, different with USBMapInjectorEdit.command, dont know is it normal? If not, what are they with Type -1? Screen Shot 2022-07-25 at 01 31 11 Screen Shot 2022-07-25 at 01 31 31

And as in picture, i set cardreader hs06 type 255, is it true?

my device has 1 usb3 port and 2 usb2, i checked they work, could i missing any port from 8-17 showed in discover USB Port?

The last, i checked these ports work, so my System doesnt need RHUB SSDT Option Creater in USBMap?? Many thank!

corpnewt commented 2 years ago

Type -1 just means that there is no type defined in ioreg for that port personality - so USBMap doesn't know what type it is, or should be.

-CorpNewt

oldman20 commented 2 years ago

Thank @corpnewt ! In Guide github used USBMap.kext dummy with xhciportlimit fail, no need usbinjectall.kext? for all discover USB2.0 and 3.0 ports at same time? no need to switch xhciportlimit to true and reboot when switch discover 2.0 ports to 3.0 ports?

corpnewt commented 2 years ago

The USBMap.kext dummy injector just gives you a way to choose which personalities you see at any given time (up to 15). If your controller supports more than 15, the idea being that you map in sweeps, then disable any seen yet not absolutely required (for the purpose of mapping) personalities to make room for others.

For instance - if your controller supports 26 port personalities, and in the first sweep of mapping you found that UK01 through UK08 were your USB 2 personalities with your keyboard and mouse attached to UK03 and UK05 - you could disable UK01, UK02, UK04, UK06, UK07, and UK08 to make room for other port personalities in the next sweep. Remember that while you're mapping, everything is temporary. When disabling those values to make room - that doesn't mean they'll be disabled in the final map - we just need space to see them as the OS can only leverage 15 personalities at once.

Using this approach - you can map the first 15 personalities, disable any that are not required for mapping, map the next sweep, and repeat that process until you've gone through all of them. This does not require the use of the XhciPortLimit quirk, or USBInjectAll.kext.

Hopefully that helps?

-CorpNewt

oldman20 commented 2 years ago

very detailed, beyond expectations. Thank Dev too much!

corpnewt commented 2 years ago

You're welcome! As that seemed to answer your questions - I'll go ahead and close this issue. Feel free to respond if I've missed anything though.

-CorpNewt

corpnewt commented 2 years ago

Correct - it just gives you a quick, cross platform way to edit the injector. It makes it easy to toggle ports on or off within an existing injector (like the dummy USBMap.kext).

I also added the ability for it to change types, add nicknames, etc - it's akin to a self-contained copy of the P. Edit & Create USBMap.kext option within USBMap's main menu which works by editing, and not creating a new injector kext.

-CorpNewt

oldman20 commented 2 years ago

Thank, I created new topic, please move to it Thank so much!