Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 12 Mar 2022 15:07:22 +0800
From:      Archimedes Gaviola <archimedes.gaviola@gmail.com>
To:        Hans Petter Selasky <hps@selasky.org>
Cc:        freebsd-arm@freebsd.org
Subject:   Re: Raspberry Pi 3B USB Printing Issue
Message-ID:  <CAJFbk7Gx1i5r-KunNP41re7A_6m%2BYPO6K3Ru-J=0xqidNQsj7A@mail.gmail.com>
In-Reply-To: <5fcece51-b014-330e-b701-fd75fa1ac204@selasky.org>
References:  <CAJFbk7EzSfPNbaGxiweKrivwNrKXCPVzA1b7_=0_bTvbs8oBow@mail.gmail.com> <7c67118e-f6ec-c87d-9a81-3ee6a5952f49@selasky.org> <CAJFbk7GYbLAFTJY077Nzh3CTBJM6bk8swr4AkgGMaukCxrfcHQ@mail.gmail.com> <60f98b10-dcdc-cdf4-3d7a-fe9fd4dff223@selasky.org> <CAJFbk7EAjrQG5Kj_upVKW72opOS%2B8d63VrMnQdLxcJjUcfsd=g@mail.gmail.com> <8226461b-5740-9c19-0575-2740bd952e16@selasky.org> <CAJFbk7FMa_8EXM70HdhgdLmkpjpRD54fRrO=uctHV4uQ2_nNhA@mail.gmail.com> <5fcece51-b014-330e-b701-fd75fa1ac204@selasky.org>

next in thread | previous in thread | raw e-mail | index | archive | help
--000000000000e8892405da0019ab
Content-Type: text/plain; charset="UTF-8"

    >> Try something like this:

> >>
> >>> diff --git a/sys/dev/usb/serial/ulpt.c b/sys/dev/usb/serial/ulpt.c
> >>> index c566da92437..d663800f4fc 100644
> >>> --- a/sys/dev/usb/serial/ulpt.c
> >>> +++ b/sys/dev/usb/serial/ulpt.c
> >>> @@ -499,6 +499,9 @@ static const STRUCT_USB_HOST_ID ulpt_devs[] = {
> >>>          {USB_IFACE_CLASS(UICLASS_PRINTER),
> >>>           USB_IFACE_SUBCLASS(UISUBCLASS_PRINTER),
> >>>           USB_IFACE_PROTOCOL(UIPROTO_PRINTER_1284)},
> >>> +
> >>> +       /* Epson printer */
> >>> +       {USB_VPI(USB_VENDOR_EPSON, USB_PRODUCT_EPSON_TMU220B, 0)},
> >>>   };
> >>>
> >>>   static int
> >>> diff --git a/sys/dev/usb/usbdevs b/sys/dev/usb/usbdevs
> >>> index 01c25d7c096..632b8f19610 100644
> >>> --- a/sys/dev/usb/usbdevs
> >>> +++ b/sys/dev/usb/usbdevs
> >>> @@ -1941,6 +1941,7 @@ product EPSON 1270                0x0120
> >> Perfection 1270 scanner
> >>>   product EPSON 2480             0x0121  Perfection 2480 scanner
> >>>   product EPSON 3590             0x0122  Perfection 3590 scanner
> >>>   product EPSON 4990             0x012a  Perfection 4990 Photo scanner
> >>> +product EPSON TMU220B          0x0200  TM-U220B
>                                      ^^^ 0x0202 (should be this value)
> >>>   product EPSON CRESSI_EDY       0x0521  Cressi Edy diving computer
> >>>   product EPSON N2ITION3         0x0522  Zeagle N2iTion3 diving
> computer
> >>>   product EPSON STYLUS_875DC     0x0601  Stylus Photo 875DC Card Reader
> >>
> >>
> > Hi Hans,
> >
> > The patch above has no effect. My Epson printer is still obtaining the
> > ugen(4) driver after I apply and recompile the kernel. Anything I've
> missed?
> >
> > Thanks,
> > Archimedes
> >
>
> Hi,
>
> See comment above!
>


Thanks Hans for the correction! My Epson printer is now detected with the
ulpt(4) driver. However, it's throwing a message code no. 12 and there is
no character device file of ulpt1 created in the /dev directory thus I
could not print.

root@generic:~ # dmesg
...
ugen1.5: <EPSON EPSON UB-U03II> at usbus1
ulpt1 on uhub1
ulpt1: <EPSON EPSON UB-U03II, class 0/0, rev 1.10/2.00, addr 5> on usbus1
device_attach: ulpt1 attach returned 12

root@generic:~ # ls -la /dev/ulpt1
ls: /dev/ulpt1: No such file or directory

I double checked my Xprinter printer and compared the behavior.

root@generic:~ # dmesg
...
ugen1.4: <Printer-58 USB Printing Support> at usbus1
ulpt0 on uhub1
ulpt0: <Printer-58 USB Printing Support, class 0/0, rev 2.00/2.54, addr 4>
on usbus1
ulpt0: using bi-directional mode
ulpt0: offline

root@generic:~ # ls -la /dev/ulpt0
crw-r--r--  1 root  operator  0x7c Apr 10 03:44 /dev/ulpt0

What is this message code no. 12 showing-up in the device_attach() ->
device_attach: ulpt1 attach returned 12? I'm currently looking at this
message code trying to figure-out what's going on.

Thanks,
Archimedes

--000000000000e8892405da0019ab
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">=C2=A0=C2=A0=C2=A0 &gt;&gt; Try something like this:<br><d=
iv class=3D"gmail_quote"><blockquote class=3D"gmail_quote" style=3D"margin:=
0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
&gt;&gt;<br>
&gt;&gt;&gt; diff --git a/sys/dev/usb/serial/ulpt.c b/sys/dev/usb/serial/ul=
pt.c<br>
&gt;&gt;&gt; index c566da92437..d663800f4fc 100644<br>
&gt;&gt;&gt; --- a/sys/dev/usb/serial/ulpt.c<br>
&gt;&gt;&gt; +++ b/sys/dev/usb/serial/ulpt.c<br>
&gt;&gt;&gt; @@ -499,6 +499,9 @@ static const STRUCT_USB_HOST_ID ulpt_devs[=
] =3D {<br>
&gt;&gt;&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 {USB_IFACE_CLASS(UICLASS_PRI=
NTER),<br>
&gt;&gt;&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0USB_IFACE_SUBCLASS(UIS=
UBCLASS_PRINTER),<br>
&gt;&gt;&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0USB_IFACE_PROTOCOL(UIP=
ROTO_PRINTER_1284)},<br>
&gt;&gt;&gt; +<br>
&gt;&gt;&gt; +=C2=A0 =C2=A0 =C2=A0 =C2=A0/* Epson printer */<br>
&gt;&gt;&gt; +=C2=A0 =C2=A0 =C2=A0 =C2=A0{USB_VPI(USB_VENDOR_EPSON, USB_PRO=
DUCT_EPSON_TMU220B, 0)},<br>
&gt;&gt;&gt;=C2=A0 =C2=A0};<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt;=C2=A0 =C2=A0static int<br>
&gt;&gt;&gt; diff --git a/sys/dev/usb/usbdevs b/sys/dev/usb/usbdevs<br>
&gt;&gt;&gt; index 01c25d7c096..632b8f19610 100644<br>
&gt;&gt;&gt; --- a/sys/dev/usb/usbdevs<br>
&gt;&gt;&gt; +++ b/sys/dev/usb/usbdevs<br>
&gt;&gt;&gt; @@ -1941,6 +1941,7 @@ product EPSON 1270=C2=A0 =C2=A0 =C2=A0 =
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 0x0120<br>
&gt;&gt; Perfection 1270 scanner<br>
&gt;&gt;&gt;=C2=A0 =C2=A0product EPSON 2480=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=
=A0 =C2=A0 =C2=A00x0121=C2=A0 Perfection 2480 scanner<br>
&gt;&gt;&gt;=C2=A0 =C2=A0product EPSON 3590=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=
=A0 =C2=A0 =C2=A00x0122=C2=A0 Perfection 3590 scanner<br>
&gt;&gt;&gt;=C2=A0 =C2=A0product EPSON 4990=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=
=A0 =C2=A0 =C2=A00x012a=C2=A0 Perfection 4990 Photo scanner<br>
&gt;&gt;&gt; +product EPSON TMU220B=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 0x020=
0=C2=A0 TM-U220B<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 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0^^^ 0x0202 (shou=
ld be this value)<br>
&gt;&gt;&gt;=C2=A0 =C2=A0product EPSON CRESSI_EDY=C2=A0 =C2=A0 =C2=A0 =C2=
=A00x0521=C2=A0 Cressi Edy diving computer<br>
&gt;&gt;&gt;=C2=A0 =C2=A0product EPSON N2ITION3=C2=A0 =C2=A0 =C2=A0 =C2=A0 =
=C2=A00x0522=C2=A0 Zeagle N2iTion3 diving computer<br>
&gt;&gt;&gt;=C2=A0 =C2=A0product EPSON STYLUS_875DC=C2=A0 =C2=A0 =C2=A00x06=
01=C2=A0 Stylus Photo 875DC Card Reader<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt; Hi Hans,<br>
&gt; <br>
&gt; The patch above has no effect. My Epson printer is still obtaining the=
<br>
&gt; ugen(4) driver after I apply and recompile the kernel. Anything I&#39;=
ve missed?<br>
&gt; <br>
&gt; Thanks,<br>
&gt; Archimedes<br>
&gt; <br>
<br>
Hi,<br>
<br>
See comment above!<br></blockquote></div><div class=3D"gmail_quote"><br></d=
iv><div class=3D"gmail_quote"><br></div><div class=3D"gmail_quote">Thanks H=
ans for the correction! My Epson printer is now detected with the ulpt(4) d=
river. However, it&#39;s throwing a message code no. 12 and there is no cha=
racter device file of ulpt1 created in the /dev directory thus I could not =
print.<br></div><div class=3D"gmail_quote"><br></div><div class=3D"gmail_qu=
ote">root@generic:~ # dmesg</div><div class=3D"gmail_quote">...<br></div><d=
iv class=3D"gmail_quote">ugen1.5: &lt;EPSON EPSON UB-U03II&gt; at usbus1<br=
>ulpt1 on uhub1<br>ulpt1: &lt;EPSON EPSON UB-U03II, class 0/0, rev 1.10/2.0=
0, addr 5&gt; on usbus1<br>device_attach: ulpt1 attach returned 12</div><di=
v class=3D"gmail_quote"><br></div><div class=3D"gmail_quote">root@generic:~=
 # ls -la /dev/ulpt1<br>ls: /dev/ulpt1: No such file or directory</div><div=
 class=3D"gmail_quote"><br></div><div class=3D"gmail_quote">I double checke=
d my Xprinter printer and compared the behavior.</div><div class=3D"gmail_q=
uote"><br></div><div class=3D"gmail_quote">
<div class=3D"gmail_quote">root@generic:~ # dmesg</div><div class=3D"gmail_=
quote">...</div>

</div><div class=3D"gmail_quote">ugen1.4: &lt;Printer-58 USB Printing Suppo=
rt&gt; at usbus1<br>ulpt0 on uhub1<br>ulpt0: &lt;Printer-58 USB Printing Su=
pport, class 0/0, rev 2.00/2.54, addr 4&gt; on usbus1<br>ulpt0: using bi-di=
rectional mode<br>ulpt0: offline</div><div class=3D"gmail_quote"><br></div>=
<div class=3D"gmail_quote">
<div class=3D"gmail_quote">root@generic:~ # ls -la /dev/ulpt0<br></div>crw-=
r--r-- =C2=A01 root =C2=A0operator =C2=A00x7c Apr 10 03:44 /dev/ulpt0</div>=
<div class=3D"gmail_quote"><br></div><div class=3D"gmail_quote">What is thi=
s message code no. 12 showing-up in the device_attach() -&gt;=20
device_attach: ulpt1 attach returned 12? I&#39;m currently looking at this =
message code trying to figure-out what&#39;s going on.</div><div class=3D"g=
mail_quote"><br></div><div class=3D"gmail_quote">Thanks,</div><div class=3D=
"gmail_quote">Archimedes=C2=A0

</div><div class=3D"gmail_quote"><br></div><div class=3D"gmail_quote"><br><=
/div><div class=3D"gmail_quote"><br></div><div class=3D"gmail_quote"><br></=
div><div class=3D"gmail_quote"><br></div></div>

--000000000000e8892405da0019ab--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAJFbk7Gx1i5r-KunNP41re7A_6m%2BYPO6K3Ru-J=0xqidNQsj7A>