jamesbowman / i2cdriver

I2CDriver open source tools
https://i2cdriver.com/
BSD 3-Clause "New" or "Revised" License
184 stars 57 forks source link

Incomplete documentation for MacOS #64

Open wolfch opened 1 year ago

wolfch commented 1 year ago

This issue could be related to #46

Currently, the i2cdriver.pdf claims in the "Overview" section:

It uses a standard FTDI USB serial chip to talk to the PC, so no special drivers need to be installed.

This may be true for Windows, but not for MacOS, at least for 12.6.3 - "Monterey", when I plugged in the i2cdriver board, I never saw a new character device entry appear matching /dev/cu.usbserial-*. However, after performing a device scan with the "System Information" app, I saw:

FT230X Basic UART:

  Product ID:   0x6015
  Vendor ID:    0x0403  (Future Technology Devices International Limited)
  [...more omitted...]

So I knew the board was being seen on the USB bus. Long story short - needed to install an additional driver. I went to this page: https://ftdichip.com/drivers/vcp-drivers/ ...and chose version 1.5.0 for MacOS 11 or 12 - the direct URL being: https://ftdichip.com/wp-content/uploads/2022/06/FTDIUSBSerialDextInstaller_1_5_0.dmg

For the latest MacOS releases, rather then installing a kext from a *.pkg installer, you drag and drop a standard app from the mounted *.dmg to the /Applications directory (it has to be run from the /Applications directory). When you start the app and click the "install" button, remember to approve the installation by opening System Preferences... then selecting the option to approve pending driver installation.

I did not have to reboot - just unplug and re-plug the i2cdriver board back in the USB - only then did I see the new character mode device, /dev/tty.usbserial-* appear and I was able to scan and see attached i2c device addresses.

BTW, forget about being able to use the wxWidget GUI app out-of-the-box on MacOS - you'll get this error message:

Please run with a Framework build of python, and only when you are logged in on the main display of your Mac

You might be able to get it to work using the https://github.com/pyenv/pyenv version manager to build a whole special Python version from source, as suggested here: https://stackoverflow.com/questions/48531006/wxpython-this-program-needs-access-to-the-screen