From nobody Sat Mar 12 07:07:22 2022 X-Original-To: freebsd-arm@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 6773D1A10B1D for ; Sat, 12 Mar 2022 07:07:35 +0000 (UTC) (envelope-from archimedes.gaviola@gmail.com) Received: from mail-ed1-x52a.google.com (mail-ed1-x52a.google.com [IPv6:2a00:1450:4864:20::52a]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4KFv523sdKz3vnH for ; Sat, 12 Mar 2022 07:07:34 +0000 (UTC) (envelope-from archimedes.gaviola@gmail.com) Received: by mail-ed1-x52a.google.com with SMTP id b15so9316698edn.4 for ; Fri, 11 Mar 2022 23:07:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=YSYHY6wxmwrs5bTHtSBMw+cCpfcikIh3kDPSA7hYdXY=; b=qTzQTFCvE8bldLP3tZuX8F36XbKcJgKeSQmKMUYS5XYFLXFKdSh2uD/BHitqNcs7oH 7J/05jd7R/unCqbtpX9KvRI9t4N1K/DfAYjuC39nb6LLW2n3v2AQ/w+60gSoHKZ7PJg0 xv2/yFIbMkxWW8i/iGI4IhsyOz+VWeQ7uEweTpWVYBRakIA83kusERdHZVK3mOAziTsl Xk6fvYdkjrkXMC8NgY4ACSwC/8IT6BVWsufyv/lNgo5x7fd+SxRizV0mV8E3Th4CD6Wm U3Sq9hzyZGf4SWozFgaLpNBeTfTqlnFeCOp3eUaRKsbyWmXIqiIB/Nh1H2W1Lmo/vm6c KoPA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=YSYHY6wxmwrs5bTHtSBMw+cCpfcikIh3kDPSA7hYdXY=; b=HV5m5f/kdsee7US9qTGMhZoGK/WjlRsZTntDDkyWFQSJYLpdBh/MhTOFvV3H2lsr0Z ldzFMwhWVqbMGp1w8k8v9fr06bvtTYDr0HUxNs+ORDiUkIH9gC/idZ/QLSc1apu10tl8 9i1mFAynhJSooVXhbordvJM5ze9wd64uXXlKZLRtPT9/ndR5v3m9jMiBUVmVxGdN3d3i 3uVctQ85g5wmzTaYzxJb60igmmcvbof110YzDKE6oygzPDsABrX+cfHSOlXc+63SZt06 ialwJLT06k48etPQKOyBY+GDyLAoCApxMAxqAJP/WGWZPfS2JNr6875gNBHNl/jihPp2 W4lg== X-Gm-Message-State: AOAM532lA0YacB+l4dQQ7WoKruOMx8GHAGPGZMmtYqZTggOXZDbky47d 2nUeTLHOFtkyvTEIeTd1G71N4/ceg98a48Qi+2o= X-Google-Smtp-Source: ABdhPJwxf5Y9COT04jVpP6Ks5IYTUIuhhJux8e4X7szos0mKGU+uQPJ/R0QymkOftbxaX1OZ3Rn2kewb2XYFbHT2n8M= X-Received: by 2002:a50:cf48:0:b0:415:df40:9e3d with SMTP id d8-20020a50cf48000000b00415df409e3dmr11889107edk.185.1647068853076; Fri, 11 Mar 2022 23:07:33 -0800 (PST) List-Id: Porting FreeBSD to ARM processors List-Archive: https://lists.freebsd.org/archives/freebsd-arm List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-arm@freebsd.org MIME-Version: 1.0 References: <7c67118e-f6ec-c87d-9a81-3ee6a5952f49@selasky.org> <60f98b10-dcdc-cdf4-3d7a-fe9fd4dff223@selasky.org> <8226461b-5740-9c19-0575-2740bd952e16@selasky.org> <5fcece51-b014-330e-b701-fd75fa1ac204@selasky.org> In-Reply-To: <5fcece51-b014-330e-b701-fd75fa1ac204@selasky.org> From: Archimedes Gaviola Date: Sat, 12 Mar 2022 15:07:22 +0800 Message-ID: Subject: Re: Raspberry Pi 3B USB Printing Issue To: Hans Petter Selasky Cc: freebsd-arm@freebsd.org Content-Type: multipart/alternative; boundary="000000000000e8892405da0019ab" X-Rspamd-Queue-Id: 4KFv523sdKz3vnH X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20210112 header.b=qTzQTFCv; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (mx1.freebsd.org: domain of archimedesgaviola@gmail.com designates 2a00:1450:4864:20::52a as permitted sender) smtp.mailfrom=archimedesgaviola@gmail.com X-Spamd-Result: default: False [-3.99 / 15.00]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+ip6:2a00:1450:4000::/36:c]; FREEMAIL_FROM(0.00)[gmail.com]; MID_RHS_MATCH_FROMTLD(0.00)[]; DKIM_TRACE(0.00)[gmail.com:+]; RCPT_COUNT_TWO(0.00)[2]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; NEURAL_HAM_SHORT(-1.00)[-1.000]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:~]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US]; TAGGED_FROM(0.00)[]; DWL_DNSWL_NONE(0.00)[gmail.com:dkim]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-0.99)[-0.989]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20210112]; FROM_HAS_DN(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-arm@freebsd.org]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[2a00:1450:4864:20::52a:from]; MLMMJ_DEST(0.00)[freebsd-arm]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[] X-ThisMailContainsUnwantedMimeParts: N --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: at usbus1 ulpt1 on uhub1 ulpt1: 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: at usbus1 ulpt0 on uhub1 ulpt0: 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
=C2=A0=C2=A0=C2=A0 >> Try something like this:
>>
>>> diff --git a/sys/dev/usb/serial/ulpt.c b/sys/dev/usb/serial/ul= pt.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[= ] =3D {
>>>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 {USB_IFACE_CLASS(UICLASS_PRI= NTER),
>>>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0USB_IFACE_SUBCLASS(UIS= UBCLASS_PRINTER),
>>>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0USB_IFACE_PROTOCOL(UIP= ROTO_PRINTER_1284)},
>>> +
>>> +=C2=A0 =C2=A0 =C2=A0 =C2=A0/* Epson printer */
>>> +=C2=A0 =C2=A0 =C2=A0 =C2=A0{USB_VPI(USB_VENDOR_EPSON, USB_PRO= DUCT_EPSON_TMU220B, 0)},
>>>=C2=A0 =C2=A0};
>>>
>>>=C2=A0 =C2=A0static 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=C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 0x0120
>> Perfection 1270 scanner
>>>=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
>>>=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
>>>=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
>>> +product EPSON TMU220B=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 0x020= 0=C2=A0 TM-U220B
=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)
>>>=C2=A0 =C2=A0product EPSON CRESSI_EDY=C2=A0 =C2=A0 =C2=A0 =C2= =A00x0521=C2=A0 Cressi Edy diving computer
>>>=C2=A0 =C2=A0product EPSON N2ITION3=C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A00x0522=C2=A0 Zeagle N2iTion3 diving computer
>>>=C2=A0 =C2=A0product EPSON STYLUS_875DC=C2=A0 =C2=A0 =C2=A00x06= 01=C2=A0 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 H= ans for the correction! My Epson printer is now detected with the ulpt(4) d= river. However, it'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.

root@generic:~ # dmesg
...
ugen1.5: <EPSON EPSON UB-U03II> at usbus1ulpt1 on uhub1
ulpt1: <EPSON EPSON UB-U03II, class 0/0, rev 1.10/2.0= 0, 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 checke= d my Xprinter printer and compared the behavior.

root@generic:~ # dmesg
...
ugen1.4: <Printer-58 USB Printing Suppo= rt> at usbus1
ulpt0 on uhub1
ulpt0: <Printer-58 USB Printing Su= pport, class 0/0, rev 2.00/2.54, addr 4> on usbus1
ulpt0: using bi-di= rectional mode
ulpt0: offline

=
root@generic:~ # ls -la /dev/ulpt0
crw-= r--r-- =C2=A01 root =C2=A0operator =C2=A00x7c Apr 10 03:44 /dev/ulpt0
=

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

Thanks,
Archimedes=C2=A0


<= /div>



--000000000000e8892405da0019ab--