[comedi] Re: dt9812.c comedi driver loading issues
fred brooks <[email protected]> Tue, 1 Apr 2025 10:17:51 -0700 (PDT)
| Newsgroups | gmane.linux.comedi |
|---|---|
| Message-ID | <[email protected]> |
------=_Part_57182_87872674.1743527871133
Content-Type: multipart/alternative;
boundary="----=_Part_57183_710620114.1743527871133"
------=_Part_57183_710620114.1743527871133
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
OK, you were right. It's been flashed with the latest firmware but it still=
=20
wants something (the original firmware or some other file) downloaded at=20
power-up startup to the dt1298 firmware loader, then it switches to the=20
dt9812 normal id for status and operations. For now I can hack a battery=
=20
backup to the device USB power to hopefully keep it loaded from the=20
windows machine downloader as I move it to testing using the Linux driver=
=20
that expects the dt9812 id.=20
If that works then a load stage will be needed in the driver for cold boot=
=20
startup and operation. Tks again.
On Saturday, March 29, 2025 at 1:45:38=E2=80=AFPM UTC-7 fred brooks wrote:
>
> Trying to get this to work with a DT9812 but am having some strange=20
> problems. The first thing is the returned product ID is sort of reversed=
=20
> from the device model.
> usb 4-1: New USB device found, idVendor=3D0867, idProduct=3D1298, bcdDev=
ice=3D=20
> 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[] =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 thi=
s=20
> 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-configur=
e=20
> device.
> [240608.299072] usbcore: registered new interface driver dt9812
>
> The number of end points returned is zero.=20
>
>
> The VM110N driver (also USB) works fine.
>
> [ 3251.595450] usb 1-1.4: new full-speed USB device number 9 using=20
> ehci-platform
> [ 3251.702245] usb 1-1.4: New USB device found, idVendor=3D10cf,=20
> idProduct=3D5501, bcdDevice=3D 0.02
> [ 3251.702285] usb 1-1.4: New USB device strings: Mfr=3D1, Product=3D2,=
=20
> SerialNumber=3D0
> [ 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=20
> 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=20
> machine with the same result after the driver modifications to match=20
> the idProduct=3D1298
>
> Source of the error message.
> static int dt9812_find_endpoints(struct comedi_device *dev)
> { =20
> 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; =20
> =20
> if (host->desc.bNumEndpoints !=3D 5) {
> dev_err(dev->class_dev, "Wrong number of endpoints\n");
> return -ENODEV;
> }=20
>
> Yes, the DT9812 works using the Windows driver running Win11
>
> ReplyForward
> Add reaction
>
--=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=
/0b617fe6-cc05-46c5-a27a-0c5cfb7aa49an%40googlegroups.com.
------=_Part_57183_710620114.1743527871133
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
OK, you were right. It's been flashed with the latest firmware but it still=
wants something (the original firmware or some other file) downloaded at p=
ower-up startup to the dt1298 firmware loader, then it switches to the dt98=
12 normal id for status and operations.=C2=A0 For now I can hack a battery =
backup to the device=C2=A0 USB power to hopefully keep it loaded from the w=
indows machine downloader as I move it to testing using the Linux driver th=
at expects the dt9812 id.=C2=A0<div><br /></div><div>If that works then a l=
oad stage will be needed in the driver for cold boot startup and operation.=
Tks again.<br /><div><br /></div><div><br /><br /></div></div><div class=
=3D"gmail_quote"><div dir=3D"auto" class=3D"gmail_attr">On Saturday, March =
29, 2025 at 1:45:38=E2=80=AFPM UTC-7 fred brooks wrote:<br/></div><blockquo=
te class=3D"gmail_quote" style=3D"margin: 0 0 0 0.8ex; border-left: 1px sol=
id rgb(204, 204, 204); padding-left: 1ex;"><div style=3D"border-left:none;p=
adding:0px;display:flex;color:rgb(34,34,34);font-family:"Google Sans&q=
uot;,Roboto,RobotoDraft,Helvetica,Arial,sans-serif;font-size:medium"><div s=
tyle=3D"float:none;padding:0px 16px;display:flex;min-height:80px;min-width:=
40px"><div><br></div></div><div style=3D"margin:0px;min-width:0px;padding:0=
px 0px 20px;width:auto"><div><div></div><div></div><div></div><div></div><d=
iv style=3D"display:flex"></div></div><div><div></div><div></div><div style=
=3D"direction:ltr;margin:8px 0px 0px;padding:0px;font-size:0.875rem;overflo=
w-x:hidden"><div style=3D"direction:ltr;font-variant-numeric:normal;font-va=
riant-east-asian:normal;font-variant-alternates:normal;font-size-adjust:non=
e;font-kerning:auto;font-feature-settings:normal;font-stretch:normal;font-s=
ize:small;line-height:1.5;font-family:Arial,Helvetica,sans-serif;overflow:a=
uto hidden"><div dir=3D"ltr">Trying to get this to work with a DT9812 but a=
m 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 devic=
e 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 match th=
at number.</div><div><br></div><div>static const struct usb_device_id dt981=
2_usb_table[] =3D {<br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 { USB_DEVICE(0x0867, 0x1=
298) },<br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 { }<br>};</div><div><br></div><div>T=
he 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 a=
nd tried to run but this is the result:</div><div><br></div><div>[240608.28=
0804] comedi: version 0.7.76 -=C2=A0<a href=3D"http://www.comedi.org/" styl=
e=3D"color:rgb(17,85,204)" target=3D"_blank" rel=3D"nofollow" data-saferedi=
recturl=3D"https://www.google.com/url?hl=3Den&q=3Dhttp://www.comedi.org=
/&source=3Dgmail&ust=3D1743563085426000&usg=3DAOvVaw3rFIMnva6OW=
hVPyn0OCpxl">http://www.comedi.org</a><br>[240608.298984] comedi comedi0: W=
rong number of endpoints<br>[240608.298990] dt9812 3-9.3:1.0: driver 'd=
t9812' failed to auto-configure device.<br>[240608.299072] usbcore: reg=
istered 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 driver (also USB) works fine.</div><div><br></div><div>[ 3251.59=
5450] usb 1-1.4: new full-speed USB device number 9 using ehci-platform<br>=
[ 3251.702245] usb 1-1.4: New USB device found, idVendor=3D10cf, idProduct=
=3D5501, bcdDevice=3D 0.02<br>[ 3251.702285] usb 1-1.4: New USB device stri=
ngs: Mfr=3D1, Product=3D2, SerialNumber=3D0<br>[ 3251.702302] usb 1-1.4: Pr=
oduct: K8055N/VM110N USB Experiment Board<br>[ 3251.702315] usb 1-1.4: Manu=
facturer: Velleman Instruments<br>[ 3251.736447] comedi comedi0: driver =
9;vmk80xx' has successfully auto-configured 'K8055 (VM110)'.<br=
>[ 3251.736675] usbcore: registered new interface driver vmk80xx</div><div>=
<br></div><div>Running Debian=C2=A06.12.20-amd64 and I also tried with an O=
range PI arm64 machine with the same result after the driver modifications=
=C2=A0to match the=C2=A0idProduct=3D1298</div><div><br></div><div>Source of=
the error message.</div><div>static int dt9812_find_endpoints(struct comed=
i_device *dev)<br>{ =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_inter=
face(dev);<br>=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 struct dt9812_p=
rivate *devpriv =3D dev->private;<br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 struct =
usb_endpoint_descriptor *ep;<br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 int i; =C2=A0<b=
r>=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 us=
ing the Windows driver=C2=A0 running Win11</div></div><div></div><div></div=
></div></div><div style=3D"clear:both"></div></div></div><div style=3D"clea=
r:both"><br></div></div><div style=3D"font-size:0.875rem;padding:0px;width:=
auto;border-bottom-left-radius:0px;border-bottom-right-radius:0px;border-to=
p:none;margin:0px;background-image:initial;background-position:initial;back=
ground-size:initial;background-repeat:initial;background-origin:initial;bac=
kground-clip:initial;color:rgb(34,34,34);font-family:"Google Sans"=
;,Roboto,RobotoDraft,Helvetica,Arial,sans-serif"><div style=3D"border-top:0=
px;padding:0px"><div style=3D"clear:both;margin:0px;padding:16px 0px;border=
-top:none"><div><span role=3D"presentation" style=3D"border-collapse:collap=
se"><span style=3D"margin:0px;padding:0px;width:1544px"><div style=3D"paddi=
ng:0px;box-sizing:border-box;border-radius:1px;border:none;margin:0px"><div=
style=3D"min-height:auto;padding:0px;display:flex;line-height:20px"><span =
role=3D"link" style=3D"border:1px solid rgb(116,119,117);display:inline-fle=
x;font-size:0.875rem;background:none;border-radius:18px;box-sizing:border-b=
ox;color:rgb(68,71,70);min-height:36px;outline:none;padding:0px 16px 0px 12=
px;min-width:104px;margin-right:8px">Reply</span><span role=3D"link" style=
=3D"border:1px solid rgb(116,119,117);display:inline-flex;font-size:0.875re=
m;background:none;border-radius:18px;box-sizing:border-box;color:rgb(68,71,=
70);min-height:36px;outline:none;padding:0px 16px 0px 12px;min-width:104px;=
margin-right:8px">Forward</span><div style=3D"margin-right:8px"><span aria-=
label=3D"Add reaction" style=3D"margin-top:0px;background:transparent;borde=
r:none;box-sizing:border-box;display:inline-flex;line-height:inherit;outlin=
e:none"><span style=3D"overflow:hidden;outline:none;width:36px;min-height:3=
6px"></span><span aria-hidden=3D"true" style=3D"display:inline-block;line-h=
eight:0"><span aria-hidden=3D"true"></span></span><div></div></span><div ro=
le=3D"tooltip" aria-hidden=3D"true" style=3D"min-height:1px;overflow:hidden=
">Add reaction</div></div></div></div></span></span></div></div></div></div=
></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/0b617fe6-cc05-46c5-a27a-0c5cfb7aa49an%40googlegroups.com?utm_me=
dium=3Demail&utm_source=3Dfooter">https://groups.google.com/d/msgid/comedi_=
list/0b617fe6-cc05-46c5-a27a-0c5cfb7aa49an%40googlegroups.com</a>.<br />
------=_Part_57183_710620114.1743527871133--
------=_Part_57182_87872674.1743527871133--