MAXOSX : how to find out which port /dev/## the USB use
In my case, I try to connect a EspressoBin on my MACintosh, but I'm not able to find which port is using or connected to.
But it is for every possible USB, how to detect which port /dev/### it uses
Via command line, I'm able to find back the name of the vendor, the ID of the Vendor and product;
or
https://support.apple.com/en-us/HT202875
1. Press and hold the Option key on your keyboard, and click the Apple menu ().
2. Choose System Information or System Profiler.
3. In the window that appears, select USB from the left column.
But unfortunately I don't the responding key like discribed in the article
http://www.planet-rcs.de/article/mac_serial_port/
Is there a possibility to write a similar script to figure out which port is used.
https://unix.stackexchange.com/ques...-determine-ports-of-a-device-like-dev-ttyusb0
In my case, I try to connect a EspressoBin on my MACintosh, but I'm not able to find which port is using or connected to.
But it is for every possible USB, how to detect which port /dev/### it uses
Code:
$ uname -a
Darwin MAC-MBP-197.lan 16.7.0 Darwin Kernel Version 16.7.0: Thu Jun 15 17:36:27 PDT 2017; root:xnu-3789.70.16~2/RELEASE_X86_64 x86_64
Code:
$ system_profiler
$ system_profiler SPUSBDataType
USB-Serial Controller D:
Product ID: 0x2303 / 0x2303(16) = 8963(10)
Vendor ID: 0x067b (Prolific Technology, Inc.)
/ 0x067b(16) – 1659(10)
Version: 4.00
Speed: Up to 12 Mb/sec
Manufacturer: Prolific Technology Inc.
Location ID: 0x14100000 / 19 / 0x14100000(16) = 3365928969(10)
Current Available (mA): 500
Current Required (mA): 100
Extra Operating Current (mA): 0
or
https://support.apple.com/en-us/HT202875
1. Press and hold the Option key on your keyboard, and click the Apple menu ().
2. Choose System Information or System Profiler.
3. In the window that appears, select USB from the left column.
Code:
$ ioreg -p IOUSB -l -w 0 > testUSB.txt
| "IOClassNameOverride" = "IOUSBDevice"
| }
|
+-o USB-Serial Controller D@14100000 <class AppleUSBDevice, id 0x1000063ae, registered, matched, active, busy 0 (2 ms), retain 17>
{
"sessionID" = 133574464882554
"iManufacturer" = 1
"bNumConfigurations" = 1
"idProduct" = 8963 / 0x2303(16) = 8963(10)
"bcdDevice" = 1024
"Bus Power Available" = 250
"USB Address" = 15
"bMaxPacketSize0" = 64
"iProduct" = 2
"iSerialNumber" = 0
"bDeviceClass" = 0
"Built-In" = No
"locationID" = 336592896 / 0x14100000(16) = 3365928969(10)
"bDeviceSubClass" = 0
"bcdUSB" = 272
"USB Product Name" = "USB-Serial Controller D"
"PortNum" = 1
"non-removable" = "no"
"IOCFPlugInTypes" = {"9dc7b780-9ec0-11d4-a54f-000a27052861"="IOUSBFamily.kext/Contents/PlugIns/IOUSBLib.bundle"}
"bDeviceProtocol" = 0
"IOUserClientClass" = "IOUSBDeviceUserClientV2"
"IOPowerManagement" = {"DevicePowerState"=0,"CurrentPowerState"=3,"CapabilityFlags"=65536,"MaxPowerState"=4,"DriverPowerState"=3}
"kUSBCurrentConfiguration" = 1
"Device Speed" = 1
"USB Vendor Name" = "Prolific Technology Inc. "
"idVendor" = 1659 / 0x067b(16) – 1659(10)
"IOGeneralInterest" = "IOCommand is not serializable"
"IOClassNameOverride" = "IOUSBDevice"
}
But unfortunately I don't the responding key like discribed in the article
http://www.planet-rcs.de/article/mac_serial_port/
Code:
$ cat /System/Library/Extensions/IOUSBFamily.kext/Contents/PlugIns/IOUSBLib.bundle/Contents/Info.plist
$ cat /System/Library/Extensions/IOUSBFamily.kext/Contents/Info.plist
Code:
5 <key>BuildMachineOSBuild</key>
7 <key>CFBundleDevelopmentRegion</key>
9 <key>CFBundleExecutable</key>
11 <key>CFBundleGetInfoString</key>
13 <key>CFBundleIdentifier</key>
15 <key>CFBundleInfoDictionaryVersion</key>
17 <key>CFBundleName</key>
19 <key>CFBundlePackageType</key>
21 <key>CFBundleShortVersionString</key>
23 <key>CFBundleSignature</key>
25 <key>CFBundleSupportedPlatforms</key>
29 <key>CFBundleVersion</key>
31 <key>DTCompiler</key>
33 <key>DTPlatformBuild</key>
35 <key>DTPlatformVersion</key>
37 <key>DTSDKBuild</key>
39 <key>DTSDKName</key>
41 <key>DTXcode</key>
43 <key>DTXcodeBuild</key>
45 <key>IOKitPersonalities</key>
47 <key>AppleUSBLegacyRoot</key>
49 <key>CFBundleIdentifier</key>
51 <key>IOClass</key>
53 <key>IOProbeScore</key>
55 <key>IOProviderClass</key>
59 <key>OSBundleCompatibleVersion</key>
61 <key>OSBundleLibraries</key>
63 <key>com.apple.iokit.IOPCIFamily</key>
65 <key>com.apple.iokit.IOUSBHostFamily</key>
67 <key>com.apple.kpi.bsd</key>
69 <key>com.apple.kpi.iokit</key>
71 <key>com.apple.kpi.libkern</key>
73 <key>com.apple.kpi.mach</key>
75 <key>com.apple.kpi.unsupported</key>
78 <key>OSBundleRequired</key>
80 <key>OSBundleRequiredPromotion</key>
Is there a possibility to write a similar script to figure out which port is used.
https://unix.stackexchange.com/ques...-determine-ports-of-a-device-like-dev-ttyusb0
Last edited: