The following shows a typical run through installing and setting things up on Linux.
sudo apt-get install libusb-1.0 libudev-dev
and answer Y to the prompt. This should install libusb and libudev.
Setup udev rules
Use a text editor to create and edit the file /etc/udev/rules.d/99-mcp2221.rules and add the following contents.
SUBSYSTEM=="usb", ATTRS{idVendor}=="04d8", ATTR{idProduct}=="00dd", MODE="0666"
Here we use nano, so run:
like this:
and add the contents from above:
and then press CTRL-X and Y to save and exit.
The settings will take effect the next time you plug in the MCP2221.
pip3 install hidapi
Remove Native MCP2221 Driver
Starting with Linux Kernel 5.7, a native MCP2221 driver (hid_mcp2221) is included with the installation. This will interfere with the HID generic driver (hid_generic) used by Blinka. The native driver can be temporarily removed (disabled) with:
sudo rmmod hid_mcp2221
To prevent the driver from loading again at boot or when reinserting the MCP2221, update the kernel module blacklist configuration. Add this line to /etc/modprobe.d/blacklist.conf
blacklist hid_mcp2221
Then run the following command to also update the configuration in initramfs (details):
sudo update-initramfs -u
Reboot the system.
pip3 install adafruit-blinka
Set environment variable
We need to manually signal to Blinka that we have a MCP2221 attached. To do this, we set the environment variable BLINKA_MCP2221. The value doesn't matter, just use 1:
export BLINKA_MCP2221=1
Text editor powered by tinymce.