Cedrus RB-844 not detected by ftd2xx on Linux

Hi,

I am trying to use the RB-844 with Psychopy (v2022.2.5) on Debian 11 (bullseye) but python (v3.8.16) is unable to find the device.

import ftd2xx
devs = ftd2xx.listDevices()
for d in devs:
    dev = ftd2xx.openEx(d)
    dev.setBaudRate(115200)
    dev.setDataCharacteristics(8, 0, 0)
    dev.setTimeouts(50, 50)
    dev.setUSBParameters(64,64)
    dev.setLatencyTimer(10)
    dev.purge()
    dev.write(b'_c1')
    print(dev.read(5))
    print(dev)
    dev.close()

returns the following error:
Traceback (most recent call last):

Cell In[6], line 3
devs = ftd2xx.listDevices()

File ~/Environments/psychopy-py38/lib/python3.8/site-packages/ftd2xx/ftd2xx.py:155 in listDevices
call_ft(_ft.FT_ListDevices, ba, c.byref(n), _ft.DWORD(defines.LIST_ALL | flags))

File ~/Environments/psychopy-py38/lib/python3.8/site-packages/ftd2xx/ftd2xx.py:133 in call_ft
raise DeviceError(status)

DeviceError: DEVICE_NOT_FOUND

On a Windows 11 laptop the response box is successfully detected.

Any ideas or hints will be appreciated!

nantfawr

We cannot assist with debugging code, especially when it doesn’t even involve our own library (D2xx in this case).

Why don’t you use our pyxid2 library? You can get it from PyPi. It has all the basic functions that you would need including listing all devices.

Even if you choose not to use pyxid2 directly, it is open-sourced and you can peak to see how it handles the FTDI’s D2xx driver.

Thank you for your answer. I should of course have mentioned that I initially used pyxid2 to access the device. From the resulting error message I gathered that the error occurs in module ftd2xx and hence only posted the minimally sufficient code to (possibly) reproduce the error. When I use pyxid2 with code from one of your samples provided on github I get the same error:

import pyxid2

# get a list of all attached XID devices
devices = pyxid2.get_xid_devices()

if devices:
    print(devices)
else:
    print("No XID devices detected")
    exit()

Error message:
Traceback (most recent call last):

Cell In[1], line 4
devices = pyxid2.get_xid_devices()

File ~/Environments/psychopy-py38/lib/python3.8/site-packages/pyxid2/init.py:10 in get_xid_devices
scanner = XidScanner()

File ~/Environments/psychopy-py38/lib/python3.8/site-packages/pyxid2/pyxid_impl.py:18 in init
self.detect_xid_devices()

File ~/Environments/psychopy-py38/lib/python3.8/site-packages/pyxid2/pyxid_impl.py:28 in detect_xid_devices
devs = ftd2xx.listDevices()

File ~/Environments/psychopy-py38/lib/python3.8/site-packages/ftd2xx/ftd2xx.py:155 in listDevices
call_ft(_ft.FT_ListDevices, ba, c.byref(n), _ft.DWORD(defines.LIST_ALL | flags))

File ~/Environments/psychopy-py38/lib/python3.8/site-packages/ftd2xx/ftd2xx.py:133 in call_ft
raise DeviceError(status)

DeviceError: DEVICE_NOT_FOUND

Thank you in advance for any pointers!

nantfawr

Thank you for clarifying.

I frankly don’t know what to recommend from here. On Windows or Mac, I would have suggested that you start with our Xidon 2 software to make sure that there is no hardware fault and that the USB driver is installed. Alas, we don’t support Linux.