[comedi] dt9812.c comedi driver loading issues
"'fred brooks' via Comedi: Linux Control and Measurement Device Interface" <[email protected]> Sat, 29 Mar 2025 13:45:38 -0700 (PDT)
| Newsgroups | gmane.linux.comedi |
|---|---|
| Message-ID | <[email protected]> |
------=_Part_237194_609768749.1743281138579
Content-Type: multipart/alternative;
boundary="----=_Part_237195_1892407452.1743281138579"
------=_Part_237195_1892407452.1743281138579
Content-Type: text/plain; charset="UTF-8"
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
[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.
The VM110N driver (also USB) works fine.
[ 3251.595450] usb 1-1.4: new full-speed USB device number 9 using
ehci-platform
[ 3251.702245] usb 1-1.4: New USB device found, idVendor=10cf,
idProduct=5501, bcdDevice= 0.02
[ 3251.702285] usb 1-1.4: New USB device strings: Mfr=1, Product=2,
SerialNumber=0
[ 3251.702302] usb 1-1.4: Product: K8055N/VM110N USB Experiment Board
[ 3251.702315] usb 1-1.4: Manufacturer: Velleman Instruments
[ 3251.736447] comedi comedi0: driver 'vmk80xx' has successfully
auto-configured 'K8055 (VM110)'.
[ 3251.736675] usbcore: registered new interface driver vmk80xx
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
ReplyForward
Add reaction
--
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/80e850e3-02a2-47e4-9bd5-febf119e3975n%40googlegroups.com.
------=_Part_237195_1892407452.1743281138579
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
<div style=3D"border-left: none; padding: 0px; display: flex; color: rgb(34=
, 34, 34); font-family: "Google Sans", Roboto, RobotoDraft, Helve=
tica, Arial, sans-serif; font-size: medium;"><div style=3D"cursor: default;=
float: none; padding: 0px 16px; align-items: center; display: flex; height=
: 80px; min-width: 40px;"><div style=3D"position: relative;"><br /></div></=
div><div style=3D"margin: 0px; min-width: 0px; padding: 0px 0px 20px; width=
: auto;"><div><div></div><div></div><div></div><div></div><div style=3D"dis=
play: flex;"></div></div><div><div style=3D"margin-left: -38px;"></div><div=
tabindex=3D"-1"></div><div style=3D"direction: ltr; margin: 8px 0px 0px; p=
adding: 0px; position: relative; font-size: 0.875rem; overflow-x: hidden;">=
<div style=3D"direction: ltr; font-variant-numeric: normal; font-variant-ea=
st-asian: normal; font-variant-alternates: normal; font-size-adjust: none; =
font-kerning: auto; font-optical-sizing: auto; font-feature-settings: norma=
l; font-variation-settings: normal; font-variant-position: normal; font-var=
iant-emoji: normal; font-stretch: normal; font-size: small; line-height: 1.=
5; font-family: Arial, Helvetica, sans-serif; overflow: auto hidden; positi=
on: relative;"><div dir=3D"ltr">Trying to get this to work with a DT9812 bu=
t am having some strange problems. The first thing is the returned product =
ID is sort of reversed from the device model.<div>=C2=A0usb 4-1: New USB de=
vice found, idVendor=3D0867, idProduct=3D1298, bcdDevice=3D 0.00</div><div>=
<br /></div><div>The driver dt9812_usb_table in dt9812.c was changed to mat=
ch that number.</div><div><br /></div><div>static const struct usb_device_i=
d dt9812_usb_table[] =3D {<br />=C2=A0 =C2=A0 =C2=A0 =C2=A0 { USB_DEVICE(0x=
0867, 0x1298) },<br />=C2=A0 =C2=A0 =C2=A0 =C2=A0 { }<br />};</div><div><br=
/></div><div>The original value inthe driver struct was=C2=A0=C2=A0(0x0867=
, 0x9812)</div><div><br /></div><div>Now the recompiled=C2=A0 dt9812 module=
actually loads and tried to run but this is the result:</div><div><br /></=
div><div>[240608.280804] comedi: version 0.7.76 -=C2=A0<a href=3D"http://ww=
w.comedi.org/" target=3D"_blank" style=3D"color: rgb(17, 85, 204);">http://=
www.comedi.org</a><br />[240608.298984] comedi comedi0: Wrong number of end=
points<br />[240608.298990] dt9812 3-9.3:1.0: driver 'dt9812' failed to aut=
o-configure device.<br />[240608.299072] usbcore: registered new interface =
driver dt9812</div><div><br /></div><div>The number of end points returned =
is zero.=C2=A0</div><div><br /></div><div><br /></div><div>The VM110N drive=
r (also USB) works fine.</div><div><br /></div><div>[ 3251.595450] usb 1-1.=
4: new full-speed USB device number 9 using ehci-platform<br />[ 3251.70224=
5] usb 1-1.4: New USB device found, idVendor=3D10cf, idProduct=3D5501, bcdD=
evice=3D 0.02<br />[ 3251.702285] usb 1-1.4: New USB device strings: Mfr=3D=
1, Product=3D2, SerialNumber=3D0<br />[ 3251.702302] usb 1-1.4: Product: K8=
055N/VM110N USB Experiment Board<br />[ 3251.702315] usb 1-1.4: Manufacture=
r: Velleman Instruments<br />[ 3251.736447] comedi comedi0: driver 'vmk80xx=
' has successfully auto-configured 'K8055 (VM110)'.<br />[ 3251.736675] usb=
core: registered new interface driver vmk80xx</div><div><br /></div><div>Ru=
nning Debian=C2=A06.12.20-amd64 and I also tried with an Orange PI arm64 ma=
chine with the same result after the driver modifications=C2=A0to match the=
=C2=A0idProduct=3D1298</div><div><br /></div><div>Source of the error messa=
ge.</div><div>static int dt9812_find_endpoints(struct comedi_device *dev)<b=
r />{ =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0<br />=C2=A0 =C2=A0 =
=C2=A0 =C2=A0 struct usb_interface *intf =3D comedi_to_usb_interface(dev);<=
br />=C2=A0 =C2=A0 =C2=A0 =C2=A0 struct usb_host_interface *host =3D intf-&=
gt;cur_altsetting;<br />=C2=A0 =C2=A0 =C2=A0 =C2=A0 struct dt9812_private *=
devpriv =3D dev->private;<br />=C2=A0 =C2=A0 =C2=A0 =C2=A0 struct usb_en=
dpoint_descriptor *ep;<br />=C2=A0 =C2=A0 =C2=A0 =C2=A0 int i; =C2=A0<br />=
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=
=A0 =C2=A0<br />=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 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 return -ENODEV;<br />=C2=A0 =C2=
=A0 =C2=A0 =C2=A0 }=C2=A0</div><div><br /></div><div>Yes, the DT9812 works =
using the Windows driver=C2=A0 running Win11</div></div><div></div><div></d=
iv></div></div><div style=3D"clear: both;"></div></div></div><div style=3D"=
clear: both;"><br /></div></div><div style=3D"font-size: 0.875rem; padding:=
0px; width: auto; border-bottom-left-radius: 0px; border-bottom-right-radi=
us: 0px; border-top: none; margin: 0px; background-image: initial; backgrou=
nd-position: initial; background-size: initial; background-repeat: initial;=
background-attachment: initial; background-origin: initial; background-cli=
p: initial; color: rgb(34, 34, 34); font-family: "Google Sans", R=
oboto, RobotoDraft, Helvetica, Arial, sans-serif;"><div style=3D"border-top=
: 0px; padding: 0px;"><div style=3D"clear: both; margin: 0px; padding: 16px=
0px; border-top: none;"><div><span role=3D"presentation" style=3D"border-c=
ollapse: collapse;"><span style=3D"margin: 0px; padding: 0px; width: 1544px=
;"><div style=3D"padding: 0px; box-sizing: border-box; border-radius: 1px; =
transition: none; border: none; margin: 0px;"><div style=3D"height: auto; p=
adding: 0px; align-items: center; display: flex; flex-wrap: wrap; line-heig=
ht: 20px; row-gap: 8px;"><span role=3D"link" tabindex=3D"0" style=3D"cursor=
: pointer; align-items: center; border: 1px solid rgb(116, 119, 117); displ=
ay: inline-flex; justify-content: center; position: relative; z-index: 0; f=
ont-size: 0.875rem; background: none; border-radius: 18px; box-sizing: bord=
er-box; color: rgb(68, 71, 70); height: 36px; outline: none; padding: 0px 1=
6px 0px 12px; box-shadow: none; min-width: 104px; user-select: none; margin=
-right: 8px;">Reply</span><span role=3D"link" tabindex=3D"0" style=3D"curso=
r: pointer; align-items: center; border: 1px solid rgb(116, 119, 117); disp=
lay: inline-flex; justify-content: center; position: relative; z-index: 0; =
font-size: 0.875rem; background: none; border-radius: 18px; box-sizing: bor=
der-box; color: rgb(68, 71, 70); height: 36px; outline: none; padding: 0px =
16px 0px 12px; box-shadow: none; min-width: 104px; user-select: none; margi=
n-right: 8px;">Forward</span><div style=3D"margin-right: 8px;"><span aria-l=
abel=3D"Add reaction" style=3D"margin-top: 0px; z-index: 0; align-items: ce=
nter; appearance: none; background: transparent; border: none; box-sizing: =
border-box; cursor: pointer; display: inline-flex; fill: currentcolor; just=
ify-content: center; line-height: inherit; outline: none; position: relativ=
e; text-rendering: inherit; user-select: none;"><span style=3D"overflow: hi=
dden; outline: none; position: absolute; pointer-events: none; top: 0px; le=
ft: 0px; width: 36px; height: 36px;"></span><span aria-hidden=3D"true" styl=
e=3D"display: inline-block; line-height: 0; z-index: 1;"><span aria-hidden=
=3D"true"></span></span><div style=3D"left: auto; position: absolute; top: =
18px; transform: translateY(-50%); z-index: 1;"></div></span><div role=3D"t=
ooltip" aria-hidden=3D"true" style=3D"position: absolute; left: -10000px; t=
op: auto; inline-size: 1px; height: 1px; overflow: hidden; user-select: non=
e;">Add reaction</div></div></div></div></span></span></div></div></div></d=
iv>
<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/80e850e3-02a2-47e4-9bd5-febf119e3975n%40googlegroups.com?utm_me=
dium=3Demail&utm_source=3Dfooter">https://groups.google.com/d/msgid/comedi_=
list/80e850e3-02a2-47e4-9bd5-febf119e3975n%40googlegroups.com</a>.<br />
------=_Part_237195_1892407452.1743281138579--
------=_Part_237194_609768749.1743281138579--