Re: [comedi] dt9812.c comedi driver loading issues
fred brooks <[email protected]> Mon, 31 Mar 2025 20:20:43 -0700
| Newsgroups | gmane.linux.comedi |
|---|---|
| Message-ID | <CAJGujSZZv4PuVX8FNbDpJWPw8LDLGf5_Uzd3PAynQ6UTdTVODg@mail.gmail.com> |
--000000000000432ef40631af06a5 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Yes, it looks like the dt1298 is for the firmware uploader function and dt9812 is for the actual DAQ device. I uploaded the latest firmware using windows while on the device driver screen. It doesn't need a download first to operate as it's already been installed. Unsure how to make the DAQ dt9812 productID get detected when the DT9812 module is loaded. Using USB wireshark on windows to see what happens when the device is started and operates to get some hints. Looks like it's not seeing the proper configuration endpoint for dt9812. it sees the firmware upload interface first and only. Mar 31 20:15:26 hpha kernel: usb 3-1.6: USB disconnect, device number 6 Mar 31 20:15:30 hpha kernel: usb 3-1.6: new full-speed USB device number 7 using ehci-pci Mar 31 20:15:30 hpha kernel: usb 3-1.6: New USB device found, idVendor=3D0867, idProduct=3D1298, bcdDevice=3D 0.00 Mar 31 20:15:30 hpha kernel: usb 3-1.6: New USB device strings: Mfr=3D0, Product=3D0, SerialNumber=3D0 Mar 31 20:15:30 hpha kernel: comedi comedi0: Number of endpoints 6, num alts 4 Mar 31 20:15:30 hpha kernel: comedi comedi0: unable to reset configuration Mar 31 20:15:30 hpha kernel: dt9812 3-1.6:1.0: driver 'dt9812' failed to auto-configure device. Mar 31 20:15:30 hpha kernel: dt9812: probe of 3-1.6:1.0 failed with error -22 Mar 31 20:15:30 hpha mtp-probe[2022]: checking bus 3, device 7: "/sys/devices/pci0000:00/0000:00:1d.0/usb3/3-1/3-1.6" Mar 31 20:15:30 hpha mtp-probe[2022]: bus: 3, device: 7 was not an MTP device Mar 31 20:15:30 hpha mtp-probe[2024]: checking bus 3, device 7: "/sys/devices/pci0000:00/0000:00:1d.0/usb3/3-1/3-1.6" Mar 31 20:15:30 hpha mtp-probe[2024]: bus: 3, device: 7 was not an MTP device Thanks for your help again. On Mon, Mar 31, 2025 at 4:48=E2=80=AFAM Ian Abbott <[email protected]> wrot= e: > 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 reverse= d > > from the device model. > > usb 4-1: New USB device found, idVendor=3D0867, idProduct=3D1298, > > bcdDevice=3D 0.00 > > > > The driver dt9812_usb_table in dt9812.c was changed to match that numbe= r. > > > > static const struct usb_device_id dt9812_usb_table[] =3D { > > { 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=3D1298 > > > > Source of the error message. > > static int dt9812_find_endpoints(struct comedi_device *dev) > > { > > struct usb_interface *intf =3D comedi_to_usb_interface(dev); > > struct usb_host_interface *host =3D intf->cur_altsetting; > > struct dt9812_private *devpriv =3D dev->private; > > struct usb_endpoint_descriptor *ep; > > int i; > > > > if (host->desc.bNumEndpoints !=3D 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. > > -- > -=3D( Ian Abbott <[email protected]> || MEV Ltd. is a company )=3D- > -=3D( registered in England & Wales. Regd. number: 02862268. )=3D- > -=3D( Regd. addr.: S11 & 12 Building 67, Europa Business Park, )=3D- > -=3D( Bird Hall Lane, STOCKPORT, SK3 0XA, UK. || www.mev.co.uk )=3D- > > -- > You received this message because you are subscribed to the Google Groups > "Comedi: Linux Control and Measurement Device Interface" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To view this discussion visit > https://groups.google.com/d/msgid/comedi_list/d63c20d2-71b6-4575-b46e-da4= 42161bf05%40mev.co.uk > . > --=20 You received this message because you are subscribed to the Google Groups "= Comedi: Linux Control and Measurement Device Interface" group. To unsubscribe from this group and stop receiving emails from it, send an e= mail to [email protected]. To view this discussion visit https://groups.google.com/d/msgid/comedi_list= /CAJGujSZZv4PuVX8FNbDpJWPw8LDLGf5_Uzd3PAynQ6UTdTVODg%40mail.gmail.com. --000000000000432ef40631af06a5 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable <div dir=3D"ltr">Yes, it looks like the dt1298 is for the firmware uploader= function and dt9812 is for the actual DAQ device. I uploaded the latest fi= rmware using windows=C2=A0while on the device driver screen. It doesn't= need a download first to operate as it's already been installed.<div>U= nsure how to make the DAQ dt9812=C2=A0 productID get detected when the DT98= 12 module is loaded. Using USB wireshark on windows to see what happens whe= n the device is=C2=A0 started and operates to get some hints.</div><div><br= ></div><div>Looks like it's not seeing the proper configuration endpoin= t for dt9812. it sees the firmware upload interface first and only.</div><d= iv><br></div><div>Mar 31 20:15:26 hpha kernel: usb 3-1.6: USB disconnect, d= evice number 6<br>Mar 31 20:15:30 hpha kernel: usb 3-1.6: new full-speed US= B device number 7 using ehci-pci<br>Mar 31 20:15:30 hpha kernel: usb 3-1.6:= New USB device found, idVendor=3D0867, idProduct=3D1298, bcdDevice=3D 0.00= <br>Mar 31 20:15:30 hpha kernel: usb 3-1.6: New USB device strings: Mfr=3D0= , Product=3D0, SerialNumber=3D0<br>Mar 31 20:15:30 hpha kernel: comedi come= di0: Number of endpoints 6, num alts 4<br>Mar 31 20:15:30 hpha kernel: come= di comedi0: unable to reset configuration<br>Mar 31 20:15:30 hpha kernel: d= t9812 3-1.6:1.0: driver 'dt9812' failed to auto-configure device.<b= r>Mar 31 20:15:30 hpha kernel: dt9812: probe of 3-1.6:1.0 failed with error= -22<br>Mar 31 20:15:30 hpha mtp-probe[2022]: checking bus 3, device 7: &qu= ot;/sys/devices/pci0000:00/0000:00:1d.0/usb3/3-1/3-1.6"<br>Mar 31 20:1= 5:30 hpha mtp-probe[2022]: bus: 3, device: 7 was not an MTP device<br>Mar 3= 1 20:15:30 hpha mtp-probe[2024]: checking bus 3, device 7: "/sys/devic= es/pci0000:00/0000:00:1d.0/usb3/3-1/3-1.6"<br>Mar 31 20:15:30 hpha mtp= -probe[2024]: bus: 3, device: 7 was not an MTP device</div><div><br></div><= div>Thanks for your help again.</div></div><br><div class=3D"gmail_quote gm= ail_quote_container"><div dir=3D"ltr" class=3D"gmail_attr">On Mon, Mar 31, = 2025 at 4:48=E2=80=AFAM Ian Abbott <<a href=3D"mailto:[email protected]"= >[email protected]</a>> wrote:<br></div><blockquote class=3D"gmail_quote= " style=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);= padding-left:1ex">Hi Fred,<br> <br> On 2025-03-29 20:45, 'fred brooks' via Comedi: Linux Control and <b= r> Measurement Device Interface wrote:<br> > <br> > Trying to get this to work with a DT9812 but am having some strange <b= r> > problems. The first thing is the returned product ID is sort of revers= ed <br> > from the device model.<br> >=C2=A0 =C2=A0usb 4-1: New USB device found, idVendor=3D0867, idProduct= =3D1298, <br> > bcdDevice=3D 0.00<br> > <br> > The driver dt9812_usb_table in dt9812.c was changed to match that numb= er.<br> > <br> > static const struct usb_device_id dt9812_usb_table[] =3D {<br> >=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 { USB_DEVICE(0x0867, 0x1298) },<br> >=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 { }<br> > };<br> > <br> > The original value inthe driver struct was=C2=A0=C2=A0(0x0867, 0x9812)= <br> > <br> > Now the recompiled=C2=A0 dt9812 module actually loads and tried to run= but <br> > this is the result:<br> > <br> > [240608.280804] comedi: version 0.7.76 - <a href=3D"http://www.comedi.= org" rel=3D"noreferrer" target=3D"_blank">http://www.comedi.org</a> <htt= p:// <br> > <a href=3D"http://www.comedi.org/" rel=3D"noreferrer" target=3D"_blank= ">www.comedi.org/</a>><br> > [240608.298984] comedi comedi0: Wrong number of endpoints<br> > [240608.298990] dt9812 3-9.3:1.0: driver 'dt9812' failed to au= to- <br> > configure device.<br> > [240608.299072] usbcore: registered new interface driver dt9812<br> > <br> > The number of end points returned is zero.<br> [snip]<br> > Running Debian=C2=A06.12.20-amd64 and I also tried with an Orange PI a= rm64 <br> > machine with the same result after the driver modifications=C2=A0to ma= tch <br> > the=C2=A0idProduct=3D1298<br> > <br> > Source of the error message.<br> > static int dt9812_find_endpoints(struct comedi_device *dev)<br> > {<br> >=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 struct usb_interface *intf =3D comed= i_to_usb_interface(dev);<br> >=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 struct usb_host_interface *host =3D = intf->cur_altsetting;<br> >=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 struct dt9812_private *devpriv =3D d= ev->private;<br> >=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 struct usb_endpoint_descriptor *ep;<= br> >=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 int i;<br> > <br> >=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 if (host->desc.bNumEndpoints !=3D= 5) {<br> >=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 dev_err(= dev->class_dev, "Wrong number of endpoints\n");<br> >=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 return -= ENODEV;<br> >=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 }<br> > <br> > Yes, the DT9812 works using the Windows driver=C2=A0 running Win11<br> <br> Looking at the "DT9812_Kmdf.inf" file from the Windows drivers in= stalled <br> by the "Omni-CD"<br> <a href=3D"https://files.digilent.com/#downloads/DTSoftware/Omni-CD/" rel= =3D"noreferrer" target=3D"_blank">https://files.digilent.com/#downloads/DTS= oftware/Omni-CD/</a><br> , in<br> C:\Program Files (x86)\Data Translation\DeviceDriversEV\DT9812<br> , the device ID USB\VID_0867&PID_1298 appears to be a "DT9812 Firm= ware <br> Loader" device. That .inf file also supports "DT9812" (PID 0= x9812), <br> "DT9813" (PID 0x9813), and "DT9814" (PID 0x9814).=C2=A0= The "DT9812 Firmware <br> Loader" device uses a different kernel driver (.sys) file than the oth= ers:<br> <br> * DT9812 Firmware Loader: DT9812ld_x86.sys or dt9812ld_x64.sys<br> * DT9812, DT9813, DT9814: DT9812k.sys or DT9812k_x64.sys<br> <br> Perhaps the ID changes after the firmware is updated?=C2=A0 Or perhaps the = <br> "DT9812 Firmware Loader" device is a hardware re-spin of the old = device? <br> I don't really know, to be honest.<br> <br> -- <br> -=3D( Ian Abbott <<a href=3D"mailto:[email protected]" target=3D"_blank"= >[email protected]</a>> || MEV Ltd. is a company=C2=A0 )=3D-<br> -=3D( registered in England & Wales.=C2=A0 Regd. number: 02862268.=C2= =A0 )=3D-<br> -=3D( Regd. addr.: S11 & 12 Building 67, Europa Business Park, )=3D-<br= > -=3D( Bird Hall Lane, STOCKPORT, SK3 0XA, UK. || <a href=3D"http://www.mev.= co.uk" rel=3D"noreferrer" target=3D"_blank">www.mev.co.uk</a> )=3D-<br> <br> -- <br> You received this message because you are subscribed to the Google Groups &= quot;Comedi: Linux Control and Measurement Device Interface" group.<br= > To unsubscribe from this group and stop receiving emails from it, send an e= mail to <a href=3D"mailto:comedi_list%[email protected]" targe= t=3D"_blank">[email protected]</a>.<br> To view this discussion visit <a href=3D"https://groups.google.com/d/msgid/= comedi_list/d63c20d2-71b6-4575-b46e-da442161bf05%40mev.co.uk" rel=3D"norefe= rrer" target=3D"_blank">https://groups.google.com/d/msgid/comedi_list/d63c2= 0d2-71b6-4575-b46e-da442161bf05%40mev.co.uk</a>.<br> </blockquote></div> <p></p> -- <br /> You received this message because you are subscribed to the Google Groups &= quot;Comedi: Linux Control and Measurement Device Interface" group.<br= /> To unsubscribe from this group and stop receiving emails from it, send an e= mail to <a href=3D"mailto:[email protected]">comedi_= [email protected]</a>.<br /> To view this discussion visit <a href=3D"https://groups.google.com/d/msgid/= comedi_list/CAJGujSZZv4PuVX8FNbDpJWPw8LDLGf5_Uzd3PAynQ6UTdTVODg%40mail.gmai= l.com?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.com/d/m= sgid/comedi_list/CAJGujSZZv4PuVX8FNbDpJWPw8LDLGf5_Uzd3PAynQ6UTdTVODg%40mail= .gmail.com</a>.<br /> --000000000000432ef40631af06a5--