{"id":21362,"library":"ftd2xx","title":"ftd2xx","description":"A Python interface to FTDI's D2XX driver (ftd2xx.dll on Windows, libftd2xx on Linux/macOS) using ctypes. Currently at v1.3.8, with a relatively stable release cadence. Compatible with Python >=3.8.","status":"active","version":"1.3.8","language":"python","source_language":"en","source_url":"https://github.com/ftd2xx/ftd2xx","tags":["ftdi","d2xx","usb","serial","gpio"],"install":[{"cmd":"pip install ftd2xx","lang":"bash","label":"PyPI"}],"dependencies":[],"imports":[{"note":"","wrong":"","symbol":"ftd2xx","correct":"import ftd2xx"},{"note":"","wrong":"","symbol":"DeviceError","correct":"from ftd2xx import DeviceError"}],"quickstart":{"code":"import ftd2xx\n\n# List connected devices\ndevice_count = ftd2xx.createDeviceInfoList()\nprint(f\"Found {device_count} device(s)\")\n\n# Open first device by serial number (or index)\ntry:\n    dev = ftd2xx.open(0)\n    print(f\"Opened device: {dev.description}\")\n    # Reset and set bit mode to reset default\n    dev.reset()\n    dev.setBitMode(0, 0)\n    # Write data\n    dev.write(b\"Hello FTDI\")\n    # Read data\n    data = dev.read(100)\n    print(f\"Read: {data}\")\n    dev.close()\nexcept ftd2xx.DeviceError as e:\n    print(f\"Error: {e}\")","lang":"python","description":"Basic usage: list, open, reset, read/write, and close a device."},"warnings":[{"fix":"dev = ftd2xx.open(0, update=False)","message":"open() and openEx() by default call createDeviceInfoList which can be slow on some systems. Use update=False to avoid this when you don't need device info.","severity":"gotcha","affected_versions":">=1.3.0"},{"fix":"Install libftd2xx from FTDI's website and add udev rule: SUBSYSTEM==\"usb\", ATTRS{idVendor}==\"0403\", MODE=\"0666\"","message":"On Linux, you may need to install libftd2xx separately and configure udev rules for non-root access. Otherwise you'll get a 'Failed to open device' error.","severity":"gotcha","affected_versions":"all"},{"fix":"Use 'import ftd2xx' instead of 'import d2xx'","message":"The older d2xx library (by Pablo Bleyer) was renamed to ftd2xx. Importing from d2xx is deprecated and will break.","severity":"deprecated","affected_versions":">=1.0.0"}],"env_vars":null,"last_verified":"2026-04-27T00:00:00.000Z","next_check":"2026-07-26T00:00:00.000Z","problems":[{"fix":"Check device is connected and driver (ftd2xx.dll/libftd2xx) is installed. On Linux, add udev rule.","cause":"Device not found or driver not installed.","error":"ftd2xx.DeviceError: FT_Open failed"},{"fix":"Use 'import ftd2xx' then 'ftd2xx.open()'.","cause":"Trying to use old d2xx import pattern like 'from d2xx import open'.","error":"AttributeError: module 'ftd2xx' has no attribute 'open'"},{"fix":"Match bitness of ftd2xx.dll with Python interpreter.","cause":"Using 32-bit ftd2xx.dll with 64-bit Python, or vice versa.","error":"OSError: [WinError 193] %1 is not a valid Win32 application"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}