From nobody Wed Mar 9 20:13:56 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 D62711A0DABC for ; Wed, 9 Mar 2022 20:14:18 +0000 (UTC) (envelope-from hps@selasky.org) Received: from mail.turbocat.net (turbocat.net [IPv6:2a01:4f8:c17:6c4b::2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4KDNhB1TRqz3LN7 for ; Wed, 9 Mar 2022 20:14:18 +0000 (UTC) (envelope-from hps@selasky.org) Received: from [10.36.2.165] (unknown [178.17.145.105]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id 5D60826163C; Wed, 9 Mar 2022 21:14:10 +0100 (CET) Message-ID: <7c67118e-f6ec-c87d-9a81-3ee6a5952f49@selasky.org> Date: Wed, 9 Mar 2022 21:13:56 +0100 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 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:91.0) Gecko/20100101 Thunderbird/91.7.0 Subject: Re: Raspberry Pi 3B USB Printing Issue Content-Language: en-US To: Archimedes Gaviola , freebsd-arm@freebsd.org References: From: Hans Petter Selasky In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 4KDNhB1TRqz3LN7 X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of hps@selasky.org designates 2a01:4f8:c17:6c4b::2 as permitted sender) smtp.mailfrom=hps@selasky.org X-Spamd-Result: default: False [-3.30 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; ARC_NA(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+a:mail.turbocat.net]; NEURAL_HAM_LONG(-1.00)[-1.000]; TAGGED_RCPT(0.00)[]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[selasky.org]; TO_MATCH_ENVRCPT_SOME(0.00)[]; NEURAL_HAM_SHORT(-1.00)[-1.000]; RCPT_COUNT_TWO(0.00)[2]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; MLMMJ_DEST(0.00)[freebsd-arm]; FREEMAIL_TO(0.00)[gmail.com,freebsd.org]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:24940, ipnet:2a01:4f8::/32, country:DE]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[] X-ThisMailContainsUnwantedMimeParts: N Status: O Content-Length: 2138 Lines: 54 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. --HPS