The following shows a typical run through installing and setting things up on Linux.

Install libusb and libudev

Run the following:

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.

Install hidapi

To install hidapi, run:

pip3 install hidapi

Remove Native MCP2221 Driver

Starting with Linux Kernel 5.7, a native MCP2221 is included with the installation. It can be removed with:

sudo rmmod hid_mcp2221

And then excluded from loading at boot by adding the line below to /etc/modprobe.d/blacklist.conf

blacklist hid_mcp2221

Install Blinka

To install Blinka and its dependencies, run:

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
Don't forget this step. Things won't work unless BLINKA_MCP2221 is set.

Run the sanity check.

Now move on to the Post Install Checks section and run the commands there to make sure everything is installed correctly.

This guide was first published on Dec 22, 2019. It was last updated on Dec 22, 2019.

This page (Linux) was last updated on Nov 27, 2021.

Text editor powered by tinymce.