项目作者: nickolasburr

项目描述 :
macOS serial bus inspection tool.
高级语言: C
项目地址: git://github.com/nickolasburr/sbctl.git
创建时间: 2017-12-15T03:36:45Z
项目社区:https://github.com/nickolasburr/sbctl

开源协议:MIT License

下载


sbctl

sbctl is a macOS serial bus controller.

Installation

There are two installation methods: Homebrew and manual.

Homebrew

  1. brew tap nickolasburr/pfa
  2. brew install sbctl

Manual

  1. make
  2. make install

Commands

  • list, ls: List all known serial devices.
  • get, show: Get information about device.
  • set: Set, modify properties of device.
  • unset, rm: Remove properties of device.
  • [--]help: Show usage information.
  • [--]version: Show current release version.

Options

Options are command-specific and can be found via sbctl <COMMAND> [-h|--help].

Examples

List all known USB devices.

sbctl ls --usb

  1. ### Spec Mode Type Bus Address Port Power [mA] Speed [Mbps] Serial Number Device ID Vendor Product Description
  2. 01 usb usb --- 029 000 --- 0 480 --- 000 Apple Root Hub Simulation
  3. 02 usb usb --- 026 000 --- 0 480 --- 000 Apple Root Hub Simulation
  4. 03 usb usb --- 029 001 01 500 480 --- 000 --- ---
  5. 04 usb usb --- 026 001 01 500 480 --- 000 --- ---
  6. 05 usb usb --- 029 002 08 500 480 --- 000 --- ---
  7. 06 usb usb --- 029 004 01 500 12 --- 016 Apple BRCM20702 Hub
  8. 07 usb usb --- 029 005 03 500 12 --- 048 Apple Apple Internal Keyb
  9. 08 usb usb --- 029 007 03 500 12 --- 019 Apple Bluetooth USB Host
  10. 09 usb usb --- 026 002 02 500 480 --- 000 --- ---
  11. 10 usb usb --- 026 003 01 500 480 --- 016 --- ---
  12. 11 usb usb --- 026 004 03 500 480 --- 048 --- ---
  13. 12 usb usb --- 026 005 02 500 480 --- 032 --- ---
  14. 13 usb usb --- 026 006 04 500 480 --- 064 --- ---
  15. 14 usb usb --- 026 007 02 500 480 000000000000 018 Apple Keyboard Hub
  16. 15 usb usb --- 026 008 03 500 12 KFV49920 019 Matrox DualHead2Go SE
  17. 16 usb usb --- 026 009 04 500 12 --- 052 Logite USB Receiver
  18. 17 usb usb --- 026 010 02 500 1.5 --- 018 Apple Apple Keyboard
  19. 18 usb usb --- 029 003 02 500 1.5 --- 032 Apple IR Receiver

List all known devices with Thunderbolt support.

sbctl ls --thun

  1. ### Spec Mode Type Bus Address Port Power [mA] Speed [Mbps] Serial Number Device ID Vendor Product Description
  2. 19 pci thun port 006 --- 06 --- 10000 --- 021 --- Thunderbolt Native
  3. 20 pci thun port 006 --- 01 --- 10000 --- 021 --- Thunderbolt Port
  4. 21 pci thun port 006 --- 03 --- 10000 --- 021 --- Thunderbolt Port
  5. 22 pci thun port 006 --- 01 --- 10000 --- 021 --- Thunderbolt Port
  6. 23 pci thun port 006 --- 02 --- 10000 --- 021 --- Thunderbolt Port
  7. 24 pci thun port 006 --- 04 --- 10000 --- 021 --- Thunderbolt Port
  8. 25 pci thun port 006 --- 06 --- 10000 --- 021 --- PCIe Adapter
  9. 26 pci thun port 006 --- 07 --- 10000 --- 021 --- PCIe Adapter
  10. 27 pci thun port 006 --- 08 --- 10000 --- 021 --- PCIe Adapter
  11. 28 pci thun port 006 --- 10 --- 10000 --- 021 --- DP or HDMI Adapter
  12. 29 pci thun port 006 --- 02 --- 10000 --- 021 --- Thunderbolt Port
  13. 30 pci thun port 006 --- 07 --- 10000 --- 021 --- PCIe Adapter
  14. 31 pci thun port 006 --- 08 --- 10000 --- 021 --- PCIe Adapter
  15. 32 pci thun port 006 --- 09 --- 10000 --- 021 --- PCIe Adapter
  16. 33 pci thun port 006 --- 10 --- 10000 --- 021 --- PCIe Adapter
  17. 34 pci thun port 006 --- 12 --- 10000 --- 021 --- DP or HDMI Adapter
  18. 35 pci thun port 006 --- 13 --- 10000 --- 021 --- DP or HDMI Adapter
  19. 36 pci thun brid 000 --- --- --- --- --- --- --- pci8086,154
  20. 37 pci thun brid 000 --- --- --- --- --- --- --- pci-bridge
  21. 38 pci thun brid 000 --- --- --- --- --- --- --- display
  22. 39 pci thun brid 000 --- --- --- --- --- --- --- pci8086,1e31
  23. 40 pci thun brid 000 --- --- --- --- --- --- --- pci8086,1e3a
  24. 41 pci thun brid 000 --- --- --- --- --- --- --- pci8086,1e2d
  25. 42 pci thun brid 000 --- --- --- --- --- --- --- pci8086,1e20
  26. 43 pci thun brid 000 --- --- --- --- --- --- --- pci-bridge
  27. 44 pci thun brid 000 --- --- --- --- --- --- --- pci-bridge
  28. 45 pci thun brid 000 --- --- --- --- --- --- --- pci-bridge
  29. 46 pci thun brid 000 --- --- --- --- --- --- --- pci8086,1e26
  30. 47 pci thun brid 000 --- --- --- --- --- --- --- pci8086,1e03
  31. 48 pci thun brid 000 --- --- --- --- --- --- --- pci8086,1e22
  32. 49 pci thun brid 001 --- --- --- --- --- --- --- ethernet
  33. 50 pci thun brid 000 --- --- --- --- --- --- --- pci8086,1e57
  34. 51 pci thun brid 002 --- --- --- --- --- --- --- pci14e4,4331
  35. 52 pci thun brid 003 --- --- --- --- --- --- --- pci11c1,5901
  36. 53 pci thun brid 001 --- --- --- --- --- --- --- pci14e4,16bc
  37. 54 pci thun brid 004 --- --- --- --- --- --- --- pci-bridge
  38. 55 pci thun brid 005 --- --- --- --- --- --- --- pci-bridge
  39. 56 pci thun brid 005 --- --- --- --- --- --- --- pci-bridge
  40. 57 pci thun brid 005 --- --- --- --- --- --- --- pci-bridge
  41. 58 pci thun brid 005 --- --- --- --- --- --- --- pci-bridge
  42. 59 pci thun brid 005 --- --- --- --- --- --- --- pci-bridge
  43. 60 pci thun brid 006 --- --- --- --- --- --- --- pci8086,1513
  44. 61 pci thun brid 191 --- --- --- --- --- --- --- pci-bridge
  45. 62 pci thun brid 192 --- --- --- --- --- --- --- pci-bridge
  46. 63 pci thun brid 192 --- --- --- --- --- --- --- pci-bridge
  47. 64 pci thun brid 192 --- --- --- --- --- --- --- pci-bridge
  48. 65 pci thun brid 193 --- --- --- --- --- --- --- pci10de,fb9
  49. 66 pci thun brid 193 --- --- --- --- --- --- --- display
  50. 67 pci thun swit 006 --- 06 --- 10000 --- 021 Apple MacBook Pro
  51. 68 pci thun swit 006 --- 03 --- 20000 --- 021 inXtr AKiTiO Thunder 2 Bo

Get device at index 15

sbctl get %15

  1. DualHead2Go SE
  2. Spec: usb
  3. Mode: usb
  4. Type: ---
  5. Bus: 026
  6. Address: 008
  7. Port: 03
  8. Power: 500mA
  9. Speed: 12Mbps [Full]
  10. Serial: KFV49920
  11. Device ID: 19
  12. Vendor: Matrox