From nobody Wed Mar 09 23:24:58 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 17C831A0D3E0 for ; Wed, 9 Mar 2022 23:25:11 +0000 (UTC) (envelope-from archimedes.gaviola@gmail.com) Received: from mail-ej1-x633.google.com (mail-ej1-x633.google.com [IPv6:2a00:1450:4864:20::633]) (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 4KDSwQ2Wbkz4YWZ for ; Wed, 9 Mar 2022 23:25:10 +0000 (UTC) (envelope-from archimedes.gaviola@gmail.com) Received: by mail-ej1-x633.google.com with SMTP id qa43so8324944ejc.12 for ; Wed, 09 Mar 2022 15:25:10 -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=IT1e3A2zZ/yqy7GVi/veF6/gVVX161oSZIjYxSe9UeI=; b=OInIz3TRj5HCyG821hxRaZ5U9jph2+v7QMYrTuIYBuCVZKtjJ1OZpioOf+LNqhAJlO R2+3YW59N0qomXosVEmwN97dqx0H6DI1EBJkLPm8uO1BwvU9mHNysLNvQ1tuEe/qAeMM Eg0V9ZDCDkacP8Yk4VQAxmDxiL5Fcfd+CFetqSJkJhL15Y+cemq2qW5WtaxdbYmSOUPJ pFvAS4lgNP9/ZAOcbN3Q78dZl64/xg7970O1Iabw38RmEObRycVKCk/rR2lHqybAaMcB ew1u6AdJ7r1OKOx5tMismfDfuWM6ceziqYNxSp3lUHvb4PTzOiazk56bsYcGPLvmWGVG +QSA== 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=IT1e3A2zZ/yqy7GVi/veF6/gVVX161oSZIjYxSe9UeI=; b=PLjqP6CJPnZHh4uK+YxNh4ZOF8fzEzRxqGVIpxjCluUfdqWXd6DGPkkoYDIfusdDf9 8GXz6g88Q4nFoeCiG3Rc3BqqTQmC+n+A5QJcA/+BnOAK7gES0QEWKYYVk0JXNG/kAPS9 DSxutt9CA78uZrAetJuyYD+9ufgzkUrxlZZfZIw8fODUe7Cm8kcnFeU7IKO7LzT4BTZq shgGvTB6l16Qjj5L5vVA4q3HayjAVH7wolBmy6CyaWiX3P44ut9I7m12ZSRM8TyOBNMb IJwhHLOS/Q0NZcdEMpalNF1yz2U2fcWo6xsqOatRuMPniYa50ClO1p8rZafyouKBIYCE GeNw== X-Gm-Message-State: AOAM530qiyW3gDYVt1pHqPMaR5/5juxk3yXiqkWCYK539oulatEWi3VQ AAu9VobsdhjQOgE2cFEQm8Tm2AjwgPhUPw9Ep3hSNVlZFq0= X-Google-Smtp-Source: ABdhPJxY0Dlfuo2KEtTYDZmMIXTA9cW0x+JpPdTjLLRCQmvqA3z5lCYtewGJV7y9zoWcA1PUv2Cf4T7vl8uDgXAnTEg= X-Received: by 2002:a17:906:3cb1:b0:6ce:2a97:5ade with SMTP id b17-20020a1709063cb100b006ce2a975ademr1880784ejh.728.1646868309242; Wed, 09 Mar 2022 15:25:09 -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> In-Reply-To: <7c67118e-f6ec-c87d-9a81-3ee6a5952f49@selasky.org> From: Archimedes Gaviola Date: Thu, 10 Mar 2022 07:24:58 +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="0000000000009078a205d9d16850" X-Rspamd-Queue-Id: 4KDSwQ2Wbkz4YWZ X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20210112 header.b=OInIz3TR; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (mx1.freebsd.org: domain of archimedesgaviola@gmail.com designates 2a00:1450:4864:20::633 as permitted sender) smtp.mailfrom=archimedesgaviola@gmail.com X-Spamd-Result: default: False [-4.00 / 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(-1.00)[-1.000]; 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::633:from]; MLMMJ_DEST(0.00)[freebsd-arm]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[] X-ThisMailContainsUnwantedMimeParts: N --0000000000009078a205d9d16850 Content-Type: text/plain; charset="UTF-8" On Thu, Mar 10, 2022 at 4:14 AM Hans Petter Selasky wrote: > On 3/9/22 18:55, Archimedes Gaviola wrote: > > Hi, > > > > I have an Epson printer connected to one of the USB ports of my RPi 3B. > The > > printer is detected as a ugen(4) driver and then I have a text file - > > myfile3.txt which contains 10 lines of repeating sentences. > > > > freebsd@generic:~ % dmesg | grep EPSON > > ugen1.4: at usbus1 > > > > freebsd@generic:~ % cat myfile3.txt > > The quick brown fox jumps over the lazy dog. > > The quick brown fox jumps over the lazy dog. > > The quick brown fox jumps over the lazy dog. > > The quick brown fox jumps over the lazy dog. > > The quick brown fox jumps over the lazy dog. > > The quick brown fox jumps over the lazy dog. > > The quick brown fox jumps over the lazy dog. > > The quick brown fox jumps over the lazy dog. > > The quick brown fox jumps over the lazy dog. > > The quick brown fox jumps over the lazy dog. > > > > freebsd@generic:~ % cat myfile3.txt > /dev/usb/1.4.1 > > > > I print the file successfully through device file redirection with cat > > command as described above. However, there were times that printing > seemed > > to suspend and withhold especially when my RPi 3B system got idle for > some > > period of time. Suspended or withhold in such a way that out of the 10 > > lines there were only 2-3 lines to be printed in the paper. So, the only > > remedy I have for now is to reboot the system to be able to get back to > > normal printing. I'm using the 14.0-CURRENT #0 main-n253384-45c23c2608e: > > Thu Feb 24 09:18:58 UTC 2022 and my RPi 4B does not manifest this > behavior > > using this same 14.0-CURRENT version. Any idea what's going on? > > > > I found these sysctl knobs thinking if some tweaks would help but not > sure > > what are the exact settings beyond these defaults. > > > > hw.usb.timings.port_resume_delay: 40 > > hw.usb.timings.port_powerup_delay: 300 > > hw.usb.timings.port_reset_recovery: 10 > > hw.usb.timings.port_root_reset_delay: 200 > > hw.usb.timings.port_reset_delay: 50 > > > > (Resend this message without dmesg and sysctl outputs as files are quite > > big, sorry I didn't notice it.) > > > > Hi, > > Why are you not using /dev/ulpt ? > > /dev/usb/1.4.1 is the raw BULK endpoint. > Hi Hans, The ulpt(4) driver isn't detected with this Epson printer. Only my other printer which is an Xprinter brand is able to get detected with ulpt(4). Thanks, Archimedes --0000000000009078a205d9d16850 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


=
On Thu, Mar 10, 2022 at 4:14 AM Hans = Petter Selasky <hps@selasky.org&g= t; wrote:
On 3/9= /22 18:55, Archimedes Gaviola wrote:
> Hi,
>
> I have an Epson printer connected to one of the USB ports of my RPi 3B= . The
> printer is detected as a ugen(4) driver and then I have a text file -<= br> > myfile3.txt which contains 10 lines of repeating sentences.
>
> freebsd@generic:~ % dmesg | grep EPSON
> ugen1.4: <EPSON EPSON UB-U03II> at usbus1
>
> freebsd@generic:~ % cat myfile3.txt
> The quick brown fox jumps over the lazy dog.
> The quick brown fox jumps over the lazy dog.
> The quick brown fox jumps over the lazy dog.
> The quick brown fox jumps over the lazy dog.
> The quick brown fox jumps over the lazy dog.
> The quick brown fox jumps over the lazy dog.
> The quick brown fox jumps over the lazy dog.
> The quick brown fox jumps over the lazy dog.
> The quick brown fox jumps over the lazy dog.
> The quick brown fox jumps over the lazy dog.
>
> freebsd@generic:~ % cat myfile3.txt=C2=A0 > /dev/usb/1.4.1
>
> I print the file successfully through device file redirection with cat=
> command as described above. However, there were times that printing se= emed
> to suspend and withhold especially when my RPi 3B system got idle for = some
> period of time. Suspended or withhold in such a way that out of the 10=
> lines there were only 2-3 lines to be printed in the paper. So, the on= ly
> remedy I have for now is to reboot the system to be able to get back t= o
> normal printing. I'm using the 14.0-CURRENT #0 main-n253384-45c23c= 2608e:
> Thu Feb 24 09:18:58 UTC 2022 and my RPi 4B does not manifest this beha= vior
> using this same 14.0-CURRENT version. Any idea what's going on? >
> I found these sysctl knobs thinking if some tweaks would help but not = sure
> what are the exact settings beyond these defaults.
>
> hw.usb.timings.port_resume_delay: 40
> hw.usb.timings.port_powerup_delay: 300
> hw.usb.timings.port_reset_recovery: 10
> hw.usb.timings.port_root_reset_delay: 200
> hw.usb.timings.port_reset_delay: 50
>
> (Resend this message without dmesg and sysctl outputs as files are qui= te
> big, sorry I didn't notice it.)
>

Hi,

Why are you not using /dev/ulpt<N> ?

/dev/usb/1.4.1 is the raw BULK endpoint.


Hi Hans,

The ulpt(4) driver isn&#= 39;t detected with this Epson printer. Only my other printer which is an Xp= rinter brand is able to get detected with ulpt(4).

Thanks,
Archimedes=C2=A0
--0000000000009078a205d9d16850--