【问题标题】:Add VID that contains string to to FTDI driver Info.plist file将包含字符串的 VID 添加到 FTDI 驱动程序 Info.plist 文件
【发布时间】:2018-01-08 16:31:08
【问题描述】:

我正在尝试将设备驱动程序添加到 Info.plist 文件中,以便使用 Xcode 运行 High Sierra (10.13.2) 的 MacBook Pro 上的 FTDI 驱动程序。我一直在这里遵循说明:https://embeddedartistry.com/blog/2017/6/23/osx-getting-pesky-ftdi-debugging-devices-to-work

可以在此处找到 Info.plist 文件中的设备示例:

    <key>microHAM USB&lt;-&gt;RS-232-RS232</key>
    <dict>
        <key>CFBundleIdentifier</key>
        <string>com.FTDI.driver.FTDIUSBSerialDriver</string>
        <key>IOClass</key>
        <string>FTDIUSBSerialDriver</string>
        <key>IOProviderClass</key>
        <string>IOUSBInterface</string>
        <key>bConfigurationValue</key>
        <integer>1</integer>
        <key>bInterfaceNumber</key>
        <integer>0</integer>
        <key>idProduct</key>
        <integer>61166</integer>
        <key>idVendor</key>
        <integer>1027</integer>
    </dict>

对于我的设备,idProduct 包含一个字符串(字母“E”),这意味着我无法将其格式化为整数,就像这里的示例一样。是否可以将不只包含整数的 VID 添加到 FTDI 驱动程序的 Info.plist 中,如果可以,如何?

谢谢。

【问题讨论】:

    标签: xcode macos driver


    【解决方案1】:

    您设备的 idProduct 仍然是一个数字,如果它包含一个“E”,这只是意味着它被格式化为十六进制,您需要将其转换为十进制以放入 plist。

    Google 可以进行 hex->decimal 转换,例如,如果您 google “0x10e4 in decimal”,它会显示 4324 是结果。

    【讨论】:

      猜你喜欢
      • 2011-04-24
      • 2014-10-12
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2017-10-06
      • 1970-01-01
      相关资源
      最近更新 更多