Hi Fred,
On 2025-03-29 20:45, 'fred brooks' via Comedi: Linux Control and
Measurement Device Interface wrote:
>
> Trying to get this to work with a DT9812 but am having some strange
> problems. The first thing is the returned product ID is sort of reversed
> from the device model.
> usb 4-1: New USB device found, idVendor=0867, idProduct=1298,
> bcdDevice= 0.00
>
> The driver dt9812_usb_table in dt9812.c was changed to match that number.
>
> static const struct usb_device_id dt9812_usb_table[] = {
> { USB_DEVICE(0x0867, 0x1298) },
> { }
> };
>
> The original value inthe driver struct was (0x0867, 0x9812)
>
> Now the recompiled dt9812 module actually loads and tried to run but
> this is the result:
>
> [240608.280804] comedi: version 0.7.76 -
http://www.comedi.org <http://
>
www.comedi.org/>
> [240608.298984] comedi comedi0: Wrong number of endpoints
> [240608.298990] dt9812 3-9.3:1.0: driver 'dt9812' failed to auto-
> configure device.
> [240608.299072] usbcore: registered new interface driver dt9812
>
> The number of end points returned is zero.
[snip]
> Running Debian 6.12.20-amd64 and I also tried with an Orange PI arm64
> machine with the same result after the driver modifications to match
> the idProduct=1298
>
> Source of the error message.
> static int dt9812_find_endpoints(struct comedi_device *dev)
> {
> struct usb_interface *intf = comedi_to_usb_interface(dev);
> struct usb_host_interface *host = intf->cur_altsetting;
> struct dt9812_private *devpriv = dev->private;
> struct usb_endpoint_descriptor *ep;
> int i;
>
> if (host->desc.bNumEndpoints != 5) {
> dev_err(dev->class_dev, "Wrong number of endpoints\n");
> return -ENODEV;
> }
>
> Yes, the DT9812 works using the Windows driver running Win11
Looking at the "DT9812_Kmdf.inf" file from the Windows drivers installed
by the "Omni-CD"
https://files.digilent.com/#downloads/DTSoftware/Omni-CD/
, in
C:\Program Files (x86)\Data Translation\DeviceDriversEV\DT9812
, the device ID USB\VID_0867&PID_1298 appears to be a "DT9812 Firmware
Loader" device. That .inf file also supports "DT9812" (PID 0x9812),
"DT9813" (PID 0x9813), and "DT9814" (PID 0x9814). The "DT9812 Firmware
Loader" device uses a different kernel driver (.sys) file than the others:
* DT9812 Firmware Loader: DT9812ld_x86.sys or dt9812ld_x64.sys
* DT9812, DT9813, DT9814: DT9812k.sys or DT9812k_x64.sys
Perhaps the ID changes after the firmware is updated? Or perhaps the
"DT9812 Firmware Loader" device is a hardware re-spin of the old device?
I don't really know, to be honest.
--
-=( Ian Abbott <
abb...@mev.co.uk> || MEV Ltd. is a company )=-
-=( registered in England & Wales. Regd. number: 02862268. )=-
-=( Regd. addr.: S11 & 12 Building 67, Europa Business Park, )=-
-=( Bird Hall Lane, STOCKPORT, SK3 0XA, UK. ||
www.mev.co.uk )=-