From nobody Thu Mar 10 13:09: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 E773D1A10675 for ; Thu, 10 Mar 2022 13:10:12 +0000 (UTC) (envelope-from archimedes.gaviola@gmail.com) Received: from mail-ej1-x631.google.com (mail-ej1-x631.google.com [IPv6:2a00:1450:4864:20::631]) (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 4KDqDM4Rprz5898 for ; Thu, 10 Mar 2022 13:10:11 +0000 (UTC) (envelope-from archimedes.gaviola@gmail.com) Received: by mail-ej1-x631.google.com with SMTP id a8so11952735ejc.8 for ; Thu, 10 Mar 2022 05:10:11 -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=fQ1ww3wn1oUot/CB5savFzEQrnJPYo1if3lrxsYROm4=; b=fBPDUEh7NhmT5e1SBVZsEyFqKvZfxLyDakI80Rug8nwqjBlnJls7EEb+nBGd/BitY1 pkQRIyFSr43C2YZ5pAdwJeS5Qwcg7LB3fsSxW6s+zlxiwNOm9Ir2+gKV4o2VlgpuawvR J9fKccPeyzcayCYchDiWXUwS3yNmokAHLFS9DTFj6UIQxvIMGp+j+bODdxmWuO/lGMfV K/kUvOaFFko720FaNA4u4zWuHjVJ+toPHGfabsId0ez2975HmkLHVQe9cBu1btwHHK/i NN2SMNvo+eTSUQLiJ8e72RfB8Y1oTUm2mh6/mRr1MWDUTfZAhnf2tJQfW5/qXm3N7nmg jzDQ== 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=fQ1ww3wn1oUot/CB5savFzEQrnJPYo1if3lrxsYROm4=; b=vKGMq4A1Z7SjOZf5Ja46Vmyc1WwDaVLLpphnmlxW5ZfhsGJ+A/fi8jA8HmAf9vwNQV VrEn1JlbFSn+RKgS897ZIbVApROczmGX1orA7Oda4hb0gEN5zsKH0Av72JZ9AMlO16el H2r8//FTZ9ttVa+um9ZuRV4sdcTWQCXnIoSWs3UmMqalR4Xfxdw7VlJuEB9TC29hosDw hMHA+4mcnc+rKt5ibKwyUa+X9Zy7l8lpMWNEacI96ifocDeeo+mE15mZFy5kp4tjORNF u5flP4mbqOw1/JGPk+B3HelpV2MyE/Pd7qUw7dMTTTL6ePXOKRsRjgobzbbbjN33esTC sJyg== X-Gm-Message-State: AOAM533jWvqosP9wZOX2uSNFFWCCvStf/MpAGxdtouBa96AeJ/TtN1jb quG46+KGSvqMUcY9Zouee8MXN++luEz7qqyb3cEam8bLOBc= X-Google-Smtp-Source: ABdhPJwXZ3WN+6p7eyCE90wSepsZ1ZoxFy8vTtTCEG7ok7Mu+XsVmd+XH6M1lYED7OcHn1NAqnYLm5QzAPS8SoLDwLI= X-Received: by 2002:a17:906:3cb1:b0:6ce:2a97:5ade with SMTP id b17-20020a1709063cb100b006ce2a975ademr4131267ejh.728.1646917810345; Thu, 10 Mar 2022 05:10:10 -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> In-Reply-To: <8226461b-5740-9c19-0575-2740bd952e16@selasky.org> From: Archimedes Gaviola Date: Thu, 10 Mar 2022 21:09: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="0000000000000f5d5105d9dcefb3" X-Rspamd-Queue-Id: 4KDqDM4Rprz5898 X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20210112 header.b=fBPDUEh7; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (mx1.freebsd.org: domain of archimedesgaviola@gmail.com designates 2a00:1450:4864:20::631 as permitted sender) smtp.mailfrom=archimedesgaviola@gmail.com X-Spamd-Result: default: False [-3.98 / 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(-0.98)[-0.985]; 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::631:from]; MLMMJ_DEST(0.00)[freebsd-arm]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[] X-ThisMailContainsUnwantedMimeParts: N --0000000000000f5d5105d9dcefb3 Content-Type: text/plain; charset="UTF-8" On Thu, Mar 10, 2022 at 8:53 PM Hans Petter Selasky wrote: > On 3/10/22 13:37, Archimedes Gaviola wrote: > > On Thu, Mar 10, 2022 at 3:47 PM Hans Petter Selasky > wrote: > > > >> On 3/10/22 00:24, Archimedes Gaviola wrote: > >>> 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). > >>> > >> > >> Hi, > >> > >> Is it correctly detected if you the VID and PID to > >> /usr/src/sys/dev/usb/serial/ulpt.c ? > >> > > > > Hi Hans, > > > > Not sure how to make the current ugen(4) driver into ulpt(4). Is there a > > need to disable ugen(4) and recompile the kernel and let ulpt(4) driver > > loaded and enabled? As far as vendor ID and product ID of this Epson > > printer are concerned, these are 0x04b8 and 0x0200 respectively. I > > checked it with usbconfig below. I checked also > > /usr/src/sys/dev/usb/usbdevs file and it seems only the vendor ID is > > present but no product ID on these particular model which is TM-U220B. > > > > root@generic:~ # usbconfig -u 1 -a 4 dump_device_desc > > ugen1.4: at usbus1, cfg=0 md=HOST spd=FULL > (12Mbps) > > pwr=ON (10mA) > > > > bLength = 0x0012 > > bDescriptorType = 0x0001 > > bcdUSB = 0x0110 > > bDeviceClass = 0x0000 > > bDeviceSubClass = 0x0000 > > bDeviceProtocol = 0x0000 > > bMaxPacketSize0 = 0x0008 > > idVendor = 0x04b8 > > idProduct = 0x0202 > > bcdDevice = 0x0200 > > iManufacturer = 0x0001 > > iProduct = 0x0002 > > iSerialNumber = 0x0003 <20160118193053218M03C> > > bNumConfigurations = 0x0001 > > > > > >> > >> When you use the printer via the BULK endpoint, there might be a missing > >> flush packet, to flush all the printed text. This happens when the > >> payload length is a multiple of the wMaxPacketSize. > >> > > > > Okay this is noted but what I found lately in usbdump are the presence of > > ioerrors ERR=IOERROR in capturing the ugen1.4.1 device while printing > were > > the printed outputs are intermittent. This time I'm going to use the word > > "intermittent" as I don't have any idea when this occurs. It just behaves > > anytime without any warnings or notices to the system not even logs in > the > > dmesg. On the other hand, normal printing will prompts with ERR=0 with > > complete outputs. > > > > root@generic:~ # usbdump -d ugen1.4.1 -v > > 19:14:11.861532 usbus1.4 > > SUBM-BULK-EP=00000001,SPD=FULL,NFR=1,SLEN=1264,IVAL=0 > > frame[0] WRITE 1264 bytes > > 19:14:12.147498 usbus1.4 > > DONE-BULK-EP=00000001,SPD=FULL,NFR=1,SLEN=0,IVAL=0,ERR=0 > > frame[0] WRITE 1264 bytes > > 19:14:23.491555 usbus1.4 > > SUBM-BULK-EP=00000001,SPD=FULL,NFR=1,SLEN=1264,IVAL=0 > > frame[0] WRITE 1264 bytes > > 19:14:23.777222 usbus1.4 > > DONE-BULK-EP=00000001,SPD=FULL,NFR=1,SLEN=0,IVAL=0,ERR=0 > > frame[0] WRITE 1264 bytes > > 19:14:32.325817 usbus1.4 > > SUBM-BULK-EP=00000001,SPD=FULL,NFR=1,SLEN=1264,IVAL=0 > > frame[0] WRITE 1264 bytes > > 19:14:32.612222 usbus1.4 > > DONE-BULK-EP=00000001,SPD=FULL,NFR=1,SLEN=0,IVAL=0,ERR=0 > > frame[0] WRITE 1264 bytes > > 19:18:46.334624 usbus1.4 > > SUBM-BULK-EP=00000001,SPD=FULL,NFR=1,SLEN=1264,IVAL=0 > > frame[0] WRITE 1264 bytes > > 19:18:46.620474 usbus1.4 > > DONE-BULK-EP=00000001,SPD=FULL,NFR=1,SLEN=0,IVAL=0,ERR=0 > > frame[0] WRITE 1264 bytes > > 19:18:53.975846 usbus1.4 > > SUBM-BULK-EP=00000001,SPD=FULL,NFR=1,SLEN=1264,IVAL=0 > > frame[0] WRITE 1264 bytes > > 19:18:54.262223 usbus1.4 > > DONE-BULK-EP=00000001,SPD=FULL,NFR=1,SLEN=0,IVAL=0,ERR=0 > > frame[0] WRITE 1264 bytes > > 19:21:38.505907 usbus1.4 > > SUBM-BULK-EP=00000001,SPD=FULL,NFR=1,SLEN=1264,IVAL=0 > > frame[0] WRITE 1264 bytes > > 19:21:38.792224 usbus1.4 > > DONE-BULK-EP=00000001,SPD=FULL,NFR=1,SLEN=0,IVAL=0,ERR=0 > > frame[0] WRITE 1264 bytes > > 19:22:06.235833 usbus1.4 > > SUBM-BULK-EP=00000001,SPD=FULL,NFR=1,SLEN=1264,IVAL=0 > > frame[0] WRITE 1264 bytes > > 19:22:06.521723 usbus1.4 > > DONE-BULK-EP=00000001,SPD=FULL,NFR=1,SLEN=0,IVAL=0,ERR=0 > > frame[0] WRITE 1264 bytes > > 19:22:16.344551 usbus1.4 > > SUBM-BULK-EP=00000001,SPD=FULL,NFR=1,SLEN=1264,IVAL=0 > > frame[0] WRITE 1264 bytes > > 19:22:16.630472 usbus1.4 > > DONE-BULK-EP=00000001,SPD=FULL,NFR=1,SLEN=0,IVAL=0,ERR=0 > > frame[0] WRITE 1264 bytes > > 19:22:31.625887 usbus1.4 > > SUBM-BULK-EP=00000001,SPD=FULL,NFR=1,SLEN=1264,IVAL=0 > > frame[0] WRITE 1264 bytes > > 19:22:31.911723 usbus1.4 > > DONE-BULK-EP=00000001,SPD=FULL,NFR=1,SLEN=0,IVAL=0,ERR=0 > > frame[0] WRITE 1264 bytes > > 19:22:40.325843 usbus1.4 > > SUBM-BULK-EP=00000001,SPD=FULL,NFR=1,SLEN=1264,IVAL=0 > > frame[0] WRITE 1264 bytes > > 19:22:40.612223 usbus1.4 > > DONE-BULK-EP=00000001,SPD=FULL,NFR=1,SLEN=0,IVAL=0,ERR=0 > > frame[0] WRITE 1264 bytes > > 19:23:53.484761 usbus1.4 > > SUBM-BULK-EP=00000001,SPD=FULL,NFR=1,SLEN=1264,IVAL=0 > > frame[0] WRITE 1264 bytes > > 19:23:53.514428 usbus1.4 > > DONE-BULK-EP=00000001,SPD=FULL,NFR=1,SLEN=0,IVAL=0, > > frame[0] WRITE 128 bytes > > 19:23:57.055902 usbus1.4 > > SUBM-BULK-EP=00000001,SPD=FULL,NFR=1,SLEN=1264,IVAL=0 > > frame[0] WRITE 1264 bytes > > 19:23:57.084227 usbus1.4 > > DONE-BULK-EP=00000001,SPD=FULL,NFR=1,SLEN=0,IVAL=0,ERR=IOERROR > > frame[0] WRITE 128 bytes > > 19:24:00.244450 usbus1.4 > > SUBM-BULK-EP=00000001,SPD=FULL,NFR=1,SLEN=1264,IVAL=0 > > frame[0] WRITE 1264 bytes > > 19:24:00.274206 usbus1.4 > > DONE-BULK-EP=00000001,SPD=FULL,NFR=1,SLEN=0,IVAL=0,ERR=IOERROR > > frame[0] WRITE 128 bytes > > 19:24:03.974541 usbus1.4 > > SUBM-BULK-EP=00000001,SPD=FULL,NFR=1,SLEN=1264,IVAL=0 > > frame[0] WRITE 1264 bytes > > 19:24:04.004203 usbus1.4 > > DONE-BULK-EP=00000001,SPD=FULL,NFR=1,SLEN=0,IVAL=0,ERR=IOERROR > > frame[0] WRITE 144 bytes > > 19:24:06.975851 usbus1.4 > > SUBM-BULK-EP=00000001,SPD=FULL,NFR=1,SLEN=1264,IVAL=0 > > frame[0] WRITE 1264 bytes > > 19:24:07.004209 usbus1.4 > > DONE-BULK-EP=00000001,SPD=FULL,NFR=1,SLEN=0,IVAL=0,ERR=IOERROR > > frame[0] WRITE 128 bytes > > 19:24:09.605790 usbus1.4 > > SUBM-BULK-EP=00000001,SPD=FULL,NFR=1,SLEN=1264,IVAL=0 > > frame[0] WRITE 1264 bytes > > 19:24:09.633980 usbus1.4 > > DONE-BULK-EP=00000001,SPD=FULL,NFR=1,SLEN=0,IVAL=0,ERR=IOERROR > > frame[0] WRITE 128 bytes > > 19:24:12.385923 usbus1.4 > > SUBM-BULK-EP=00000001,SPD=FULL,NFR=1,SLEN=1264,IVAL=0 > > frame[0] WRITE 1264 bytes > > 19:24:12.413760 usbus1.4 > > DONE-BULK-EP=00000001,SPD=FULL,NFR=1,SLEN=0,IVAL=0,ERR=IOERROR > > frame[0] WRITE 128 bytes > > 19:24:15.224542 usbus1.4 > > SUBM-BULK-EP=00000001,SPD=FULL,NFR=1,SLEN=1264,IVAL=0 > > frame[0] WRITE 1264 bytes > > 19:24:15.253771 usbus1.4 > > DONE-BULK-EP=00000001,SPD=FULL,NFR=1,SLEN=0,IVAL=0,ERR=IOERROR > > frame[0] WRITE 128 bytes > > 19:24:18.174530 usbus1.4 > > SUBM-BULK-EP=00000001,SPD=FULL,NFR=1,SLEN=1264,IVAL=0 > > frame[0] WRITE 1264 bytes > > 19:24:18.203756 usbus1.4 > > DONE-BULK-EP=00000001,SPD=FULL,NFR=1,SLEN=0,IVAL=0,ERR=IOERROR > > frame[0] WRITE 128 bytes > > 19:24:21.125927 usbus1.4 > > SUBM-BULK-EP=00000001,SPD=FULL,NFR=1,SLEN=1264,IVAL=0 > > frame[0] WRITE 1264 bytes > > 19:24:21.153752 usbus1.4 > > DONE-BULK-EP=00000001,SPD=FULL,NFR=1,SLEN=0,IVAL=0,ERR=IOERROR > > frame[0] WRITE 136 bytes > > 19:24:24.275854 usbus1.4 > > SUBM-BULK-EP=00000001,SPD=FULL,NFR=1,SLEN=1264,IVAL=0 > > frame[0] WRITE 1264 bytes > > 19:24:24.303756 usbus1.4 > > DONE-BULK-EP=00000001,SPD=FULL,NFR=1,SLEN=0,IVAL=0,ERR=IOERROR > > frame[0] WRITE 144 bytes > > 19:24:27.485857 usbus1.4 > > SUBM-BULK-EP=00000001,SPD=FULL,NFR=1,SLEN=1264,IVAL=0 > > frame[0] WRITE 1264 bytes > > 19:24:27.772223 usbus1.4 > > DONE-BULK-EP=00000001,SPD=FULL,NFR=1,SLEN=0,IVAL=0,ERR=0 > > frame[0] WRITE 1264 bytes > > 19:24:36.194633 usbus1.4 > > SUBM-BULK-EP=00000001,SPD=FULL,NFR=1,SLEN=1264,IVAL=0 > > frame[0] WRITE 1264 bytes > > 19:24:36.223750 usbus1.4 > > DONE-BULK-EP=00000001,SPD=FULL,NFR=1,SLEN=0,IVAL=0,ERR=IOERROR > > frame[0] WRITE 128 bytes > > 19:24:39.115831 usbus1.4 > > SUBM-BULK-EP=00000001,SPD=FULL,NFR=1,SLEN=1264,IVAL=0 > > frame[0] WRITE 1264 bytes > > 19:24:39.143771 usbus1.4 > > DONE-BULK-EP=00000001,SPD=FULL,NFR=1,SLEN=0,IVAL=0,ERR=IOERROR > > frame[0] WRITE 144 bytes > > 19:24:41.855851 usbus1.4 > > SUBM-BULK-EP=00000001,SPD=FULL,NFR=1,SLEN=1264,IVAL=0 > > frame[0] WRITE 1264 bytes > > 19:24:41.883758 usbus1.4 > > DONE-BULK-EP=00000001,SPD=FULL,NFR=1,SLEN=0,IVAL=0,ERR=IOERROR > > frame[0] WRITE 128 bytes > > 19:24:44.215882 usbus1.4 > > SUBM-BULK-EP=00000001,SPD=FULL,NFR=1,SLEN=1264,IVAL=0 > > frame[0] WRITE 1264 bytes > > 19:24:44.243755 usbus1.4 > > DONE-BULK-EP=00000001,SPD=FULL,NFR=1,SLEN=0,IVAL=0,ERR=IOERROR > > frame[0] WRITE 128 bytes > > 19:24:47.634603 usbus1.4 > > SUBM-BULK-EP=00000001,SPD=FULL,NFR=1,SLEN=1264,IVAL=0 > > frame[0] WRITE 1264 bytes > > 19:24:47.663751 usbus1.4 > > DONE-BULK-EP=00000001,SPD=FULL,NFR=1,SLEN=0,IVAL=0,ERR=IOERROR > > frame[0] WRITE 128 bytes > > 19:24:50.324493 usbus1.4 > > SUBM-BULK-EP=00000001,SPD=FULL,NFR=1,SLEN=1264,IVAL=0 > > frame[0] WRITE 1264 bytes > > 19:24:50.353755 usbus1.4 > > DONE-BULK-EP=00000001,SPD=FULL,NFR=1,SLEN=0,IVAL=0,ERR=IOERROR > > frame[0] WRITE 128 bytes > > 19:24:52.864637 usbus1.4 > > SUBM-BULK-EP=00000001,SPD=FULL,NFR=1,SLEN=1264,IVAL=0 > > frame[0] WRITE 1264 bytes > > 19:24:52.893756 usbus1.4 > > DONE-BULK-EP=00000001,SPD=FULL,NFR=1,SLEN=0,IVAL=0,ERR=IOERROR > > frame[0] WRITE 144 bytes > > 19:24:54.944528 usbus1.4 > > SUBM-BULK-EP=00000001,SPD=FULL,NFR=1,SLEN=1264,IVAL=0 > > frame[0] WRITE 1264 bytes > > 19:24:54.973743 usbus1.4 > > DONE-BULK-EP=00000001,SPD=FULL,NFR=1,SLEN=0,IVAL=0,ERR=IOERROR > > frame[0] WRITE 128 bytes > > 19:24:57.254498 usbus1.4 > > SUBM-BULK-EP=00000001,SPD=FULL,NFR=1,SLEN=1264,IVAL=0 > > frame[0] WRITE 1264 bytes > > 19:24:57.537227 usbus1.4 > > DONE-BULK-EP=00000001,SPD=FULL,NFR=1,SLEN=0,IVAL=0,ERR=0 > > frame[0] WRITE 1264 bytes > > 19:25:06.024607 usbus1.4 > > SUBM-BULK-EP=00000001,SPD=FULL,NFR=1,SLEN=1264,IVAL=0 > > frame[0] WRITE 1264 bytes > > 19:25:06.053747 usbus1.4 > > DONE-BULK-EP=00000001,SPD=FULL,NFR=1,SLEN=0,IVAL=0,ERR=IOERROR > > frame[0] WRITE 128 bytes > > 19:25:08.214550 usbus1.4 > > SUBM-BULK-EP=00000001,SPD=FULL,NFR=1,SLEN=1264,IVAL=0 > > frame[0] WRITE 1264 bytes > > 19:25:08.243749 usbus1.4 > > DONE-BULK-EP=00000001,SPD=FULL,NFR=1,SLEN=0,IVAL=0,ERR=IOERROR > > frame[0] WRITE 144 bytes > > 19:25:10.355858 usbus1.4 > > SUBM-BULK-EP=00000001,SPD=FULL,NFR=1,SLEN=1264,IVAL=0 > > frame[0] WRITE 1264 bytes > > 19:25:10.383752 usbus1.4 > > DONE-BULK-EP=00000001,SPD=FULL,NFR=1,SLEN=0,IVAL=0,ERR=IOERROR > > frame[0] WRITE 128 bytes > > 19:25:12.435851 usbus1.4 > > SUBM-BULK-EP=00000001,SPD=FULL,NFR=1,SLEN=1264,IVAL=0 > > frame[0] WRITE 1264 bytes > > 19:25:12.463752 usbus1.4 > > DONE-BULK-EP=00000001,SPD=FULL,NFR=1,SLEN=0,IVAL=0,ERR=IOERROR > > frame[0] WRITE 128 bytes > > 19:25:14.574555 usbus1.4 > > SUBM-BULK-EP=00000001,SPD=FULL,NFR=1,SLEN=1264,IVAL=0 > > frame[0] WRITE 1264 bytes > > 19:25:14.603740 usbus1.4 > > DONE-BULK-EP=00000001,SPD=FULL,NFR=1,SLEN=0,IVAL=0,ERR=IOERROR > > frame[0] WRITE 128 bytes > > 19:25:17.814561 usbus1.4 > > SUBM-BULK-EP=00000001,SPD=FULL,NFR=1,SLEN=1264,IVAL=0 > > frame[0] WRITE 1264 bytes > > 19:25:17.844015 usbus1.4 > > DONE-BULK-EP=00000001,SPD=FULL,NFR=1,SLEN=0,IVAL=0,ERR=IOERROR > > frame[0] WRITE 128 bytes > > 19:25:19.924529 usbus1.4 > > SUBM-BULK-EP=00000001,SPD=FULL,NFR=1,SLEN=1264,IVAL=0 > > frame[0] WRITE 1264 bytes > > 19:25:19.954029 usbus1.4 > > DONE-BULK-EP=00000001,SPD=FULL,NFR=1,SLEN=0,IVAL=0,ERR=IOERROR > > frame[0] WRITE 128 bytes > > 19:25:28.075867 usbus1.4 > > SUBM-BULK-EP=00000001,SPD=FULL,NFR=1,SLEN=1264,IVAL=0 > > frame[0] WRITE 1264 bytes > > 19:25:28.104036 usbus1.4 > > DONE-BULK-EP=00000001,SPD=FULL,NFR=1,SLEN=0,IVAL=0,ERR=IOERROR > > frame[0] WRITE 144 bytes > > 19:25:30.195823 usbus1.4 > > SUBM-BULK-EP=00000001,SPD=FULL,NFR=1,SLEN=1264,IVAL=0 > > frame[0] WRITE 1264 bytes > > 19:25:30.224035 usbus1.4 > > DONE-BULK-EP=00000001,SPD=FULL,NFR=1,SLEN=0,IVAL=0,ERR=IOERROR > > frame[0] WRITE 128 bytes > > 19:25:32.574567 usbus1.4 > > SUBM-BULK-EP=00000001,SPD=FULL,NFR=1,SLEN=1264,IVAL=0 > > frame[0] WRITE 1264 bytes > > 19:25:32.604028 usbus1.4 > > DONE-BULK-EP=00000001,SPD=FULL,NFR=1,SLEN=0,IVAL=0,ERR=IOERROR > > frame[0] WRITE 128 bytes > > 19:25:34.624522 usbus1.4 > > SUBM-BULK-EP=00000001,SPD=FULL,NFR=1,SLEN=1264,IVAL=0 > > frame[0] WRITE 1264 bytes > > 19:25:34.654016 usbus1.4 > > DONE-BULK-EP=00000001,SPD=FULL,NFR=1,SLEN=0,IVAL=0,ERR=IOERROR > > frame[0] WRITE 128 bytes > > 19:25:36.895889 usbus1.4 > > SUBM-BULK-EP=00000001,SPD=FULL,NFR=1,SLEN=1264,IVAL=0 > > frame[0] WRITE 1264 bytes > > 19:25:36.924007 usbus1.4 > > DONE-BULK-EP=00000001,SPD=FULL,NFR=1,SLEN=0,IVAL=0,ERR=IOERROR > > frame[0] WRITE 144 bytes > > > > 86 packets captured > > 41546 packets received by filter > > 0 packets dropped by kernel > > > > What could be these ioerrors? As I am also firm that my Epson printer's > > status is good and this only happens in RPi 3B but not RPi 4B. My RPi 4B > > using the same printer and ugen(4) driver is very stable. > > Hi, > > IOERROR usually means an electrical error. The RPI3B will use a > transaction translator for the FULL speed traffic, which is driven by > software. Maybe there is a bug in the HC driver, > "dev/usb/controller/dwc_otg.c". There are some sysctls to enable full HC > debugging, see hw.usb.xxx.debug=17 . > Hi Hans, Thanks for your immediate response! I'll also try my spare RPi 3B if it behaves the same. Noted on this HC driver you've mentioned. I'll explore the sysctl knobs for debugging. > > Is the device self-powered? > Yes it's a self-powered device. > > 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 > > 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 > Okay I'll add this patch. Thanks and best regards, Archimedes --0000000000000f5d5105d9dcefb3 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


=
On Thu, Mar 10, 2022 at 8:53 PM Hans = Petter Selasky <hps@selasky.org&g= t; wrote:
On 3/1= 0/22 13:37, Archimedes Gaviola wrote:
> On Thu, Mar 10, 2022 at 3:47 PM Hans Petter Selasky <hps@selasky.org> wrote:
>
>> On 3/10/22 00:24, Archimedes Gaviola wrote:
>>> On Thu, Mar 10, 2022 at 4:14 AM Hans Petter Selasky <hps@selasky.org>
>> wrote:
>>>
>>>> On 3/9/22 18:55, Archimedes Gaviola wrote:
>>>>> Hi,
>>>>>
>>>>> I have an Epson printer connected to one of the USB po= rts of my RPi 3B.
>>>> The
>>>>> printer is detected as a ugen(4) driver and then I hav= e a text file -
>>>>> myfile3.txt which contains 10 lines of repeating sente= nces.
>>>>>
>>>>> 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/us= b/1.4.1
>>>>>
>>>>> I print the file successfully through device file redi= rection with cat
>>>>> command as described above. However, there were times = that printing
>>>> seemed
>>>>> to suspend and withhold especially when my RPi 3B syst= em got idle for
>>>> some
>>>>> period of time. Suspended or withhold in such a way th= at out of the 10
>>>>> lines there were only 2-3 lines to be printed in the p= aper. So, the
>> only
>>>>> remedy I have for now is to reboot the system to be ab= le 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 ma= nifest this
>>>> behavior
>>>>> using this same 14.0-CURRENT version. Any idea what= 9;s going on?
>>>>>
>>>>> I found these sysctl knobs thinking if some tweaks wou= ld 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<N> ?
>>>>
>>>> /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 wit= h ulpt(4).
>>>
>>
>> Hi,
>>
>> Is it correctly detected if you the VID and PID to
>> /usr/src/sys/dev/usb/serial/ulpt.c ?
>>
>
> Hi Hans,
>
> Not sure how to make the current ugen(4) driver into ulpt(4). Is there= a
> need to disable ugen(4) and recompile the kernel and let ulpt(4) drive= r
> loaded and enabled? As far as vendor ID and product ID of this Epson > printer are concerned, these are=C2=A0 0x04b8 and=C2=A0 0x0200 respect= ively. I
> checked it with usbconfig below. I checked also
> /usr/src/sys/dev/usb/usbdevs file and it seems only the vendor ID is > present but no product ID on these particular model which is TM-U220B.=
>
> root@generic:~ # usbconfig -u 1 -a 4 dump_device_desc
> ugen1.4: <EPSON EPSON UB-U03II> at usbus1, cfg=3D0 md=3DHOST spd= =3DFULL (12Mbps)
> pwr=3DON (10mA)
>
>=C2=A0 =C2=A0 bLength =3D 0x0012
>=C2=A0 =C2=A0 bDescriptorType =3D 0x0001
>=C2=A0 =C2=A0 bcdUSB =3D 0x0110
>=C2=A0 =C2=A0 bDeviceClass =3D 0x0000=C2=A0 <Probed by interface cla= ss>
>=C2=A0 =C2=A0 bDeviceSubClass =3D 0x0000
>=C2=A0 =C2=A0 bDeviceProtocol =3D 0x0000
>=C2=A0 =C2=A0 bMaxPacketSize0 =3D 0x0008
>=C2=A0 =C2=A0 idVendor =3D 0x04b8
>=C2=A0 =C2=A0 idProduct =3D 0x0202
>=C2=A0 =C2=A0 bcdDevice =3D 0x0200
>=C2=A0 =C2=A0 iManufacturer =3D 0x0001=C2=A0 <EPSON>
>=C2=A0 =C2=A0 iProduct =3D 0x0002=C2=A0 <EPSON UB-U03II>
>=C2=A0 =C2=A0 iSerialNumber =3D 0x0003=C2=A0 <20160118193053218M03C&= gt;
>=C2=A0 =C2=A0 bNumConfigurations =3D 0x0001
>
>
>>
>> When you use the printer via the BULK endpoint, there might be a m= issing
>> flush packet, to flush all the printed text. This happens when the=
>> payload length is a multiple of the wMaxPacketSize.
>>
>
> Okay this is noted but what I found lately in usbdump are the presence= of
> ioerrors ERR=3DIOERROR in capturing the ugen1.4.1 device while printin= g were
> the printed outputs are intermittent. This time I'm going to use t= he word
> "intermittent" as I don't have any idea when this occurs= . It just behaves
> anytime without any warnings or notices to the system not even logs in= the
> dmesg. On the other hand, normal printing will prompts with ERR=3D0 wi= th
> complete outputs.
>
> root@generic:~ # usbdump -d ugen1.4.1 -v
> 19:14:11.861532 usbus1.4
> SUBM-BULK-EP=3D00000001,SPD=3DFULL,NFR=3D1,SLEN=3D1264,IVAL=3D0
>=C2=A0 =C2=A0frame[0] WRITE 1264 bytes
> 19:14:12.147498 usbus1.4
> DONE-BULK-EP=3D00000001,SPD=3DFULL,NFR=3D1,SLEN=3D0,IVAL=3D0,ERR=3D0 >=C2=A0 =C2=A0frame[0] WRITE 1264 bytes
> 19:14:23.491555 usbus1.4
> SUBM-BULK-EP=3D00000001,SPD=3DFULL,NFR=3D1,SLEN=3D1264,IVAL=3D0
>=C2=A0 =C2=A0frame[0] WRITE 1264 bytes
> 19:14:23.777222 usbus1.4
> DONE-BULK-EP=3D00000001,SPD=3DFULL,NFR=3D1,SLEN=3D0,IVAL=3D0,ERR=3D0 >=C2=A0 =C2=A0frame[0] WRITE 1264 bytes
> 19:14:32.325817 usbus1.4
> SUBM-BULK-EP=3D00000001,SPD=3DFULL,NFR=3D1,SLEN=3D1264,IVAL=3D0
>=C2=A0 =C2=A0frame[0] WRITE 1264 bytes
> 19:14:32.612222 usbus1.4
> DONE-BULK-EP=3D00000001,SPD=3DFULL,NFR=3D1,SLEN=3D0,IVAL=3D0,ERR=3D0 >=C2=A0 =C2=A0frame[0] WRITE 1264 bytes
> 19:18:46.334624 usbus1.4
> SUBM-BULK-EP=3D00000001,SPD=3DFULL,NFR=3D1,SLEN=3D1264,IVAL=3D0
>=C2=A0 =C2=A0frame[0] WRITE 1264 bytes
> 19:18:46.620474 usbus1.4
> DONE-BULK-EP=3D00000001,SPD=3DFULL,NFR=3D1,SLEN=3D0,IVAL=3D0,ERR=3D0 >=C2=A0 =C2=A0frame[0] WRITE 1264 bytes
> 19:18:53.975846 usbus1.4
> SUBM-BULK-EP=3D00000001,SPD=3DFULL,NFR=3D1,SLEN=3D1264,IVAL=3D0
>=C2=A0 =C2=A0frame[0] WRITE 1264 bytes
> 19:18:54.262223 usbus1.4
> DONE-BULK-EP=3D00000001,SPD=3DFULL,NFR=3D1,SLEN=3D0,IVAL=3D0,ERR=3D0 >=C2=A0 =C2=A0frame[0] WRITE 1264 bytes
> 19:21:38.505907 usbus1.4
> SUBM-BULK-EP=3D00000001,SPD=3DFULL,NFR=3D1,SLEN=3D1264,IVAL=3D0
>=C2=A0 =C2=A0frame[0] WRITE 1264 bytes
> 19:21:38.792224 usbus1.4
> DONE-BULK-EP=3D00000001,SPD=3DFULL,NFR=3D1,SLEN=3D0,IVAL=3D0,ERR=3D0 >=C2=A0 =C2=A0frame[0] WRITE 1264 bytes
> 19:22:06.235833 usbus1.4
> SUBM-BULK-EP=3D00000001,SPD=3DFULL,NFR=3D1,SLEN=3D1264,IVAL=3D0
>=C2=A0 =C2=A0frame[0] WRITE 1264 bytes
> 19:22:06.521723 usbus1.4
> DONE-BULK-EP=3D00000001,SPD=3DFULL,NFR=3D1,SLEN=3D0,IVAL=3D0,ERR=3D0 >=C2=A0 =C2=A0frame[0] WRITE 1264 bytes
> 19:22:16.344551 usbus1.4
> SUBM-BULK-EP=3D00000001,SPD=3DFULL,NFR=3D1,SLEN=3D1264,IVAL=3D0
>=C2=A0 =C2=A0frame[0] WRITE 1264 bytes
> 19:22:16.630472 usbus1.4
> DONE-BULK-EP=3D00000001,SPD=3DFULL,NFR=3D1,SLEN=3D0,IVAL=3D0,ERR=3D0 >=C2=A0 =C2=A0frame[0] WRITE 1264 bytes
> 19:22:31.625887 usbus1.4
> SUBM-BULK-EP=3D00000001,SPD=3DFULL,NFR=3D1,SLEN=3D1264,IVAL=3D0
>=C2=A0 =C2=A0frame[0] WRITE 1264 bytes
> 19:22:31.911723 usbus1.4
> DONE-BULK-EP=3D00000001,SPD=3DFULL,NFR=3D1,SLEN=3D0,IVAL=3D0,ERR=3D0 >=C2=A0 =C2=A0frame[0] WRITE 1264 bytes
> 19:22:40.325843 usbus1.4
> SUBM-BULK-EP=3D00000001,SPD=3DFULL,NFR=3D1,SLEN=3D1264,IVAL=3D0
>=C2=A0 =C2=A0frame[0] WRITE 1264 bytes
> 19:22:40.612223 usbus1.4
> DONE-BULK-EP=3D00000001,SPD=3DFULL,NFR=3D1,SLEN=3D0,IVAL=3D0,ERR=3D0 >=C2=A0 =C2=A0frame[0] WRITE 1264 bytes
> 19:23:53.484761 usbus1.4
> SUBM-BULK-EP=3D00000001,SPD=3DFULL,NFR=3D1,SLEN=3D1264,IVAL=3D0
>=C2=A0 =C2=A0frame[0] WRITE 1264 bytes
> 19:23:53.514428 usbus1.4
> DONE-BULK-EP=3D00000001,SPD=3DFULL,NFR=3D1,SLEN=3D0,IVAL=3D0,
>=C2=A0 =C2=A0frame[0] WRITE 128 bytes
> 19:23:57.055902 usbus1.4
> SUBM-BULK-EP=3D00000001,SPD=3DFULL,NFR=3D1,SLEN=3D1264,IVAL=3D0
>=C2=A0 =C2=A0frame[0] WRITE 1264 bytes
> 19:23:57.084227 usbus1.4
> DONE-BULK-EP=3D00000001,SPD=3DFULL,NFR=3D1,SLEN=3D0,IVAL=3D0,ERR=3DIOE= RROR
>=C2=A0 =C2=A0frame[0] WRITE 128 bytes
> 19:24:00.244450 usbus1.4
> SUBM-BULK-EP=3D00000001,SPD=3DFULL,NFR=3D1,SLEN=3D1264,IVAL=3D0
>=C2=A0 =C2=A0frame[0] WRITE 1264 bytes
> 19:24:00.274206 usbus1.4
> DONE-BULK-EP=3D00000001,SPD=3DFULL,NFR=3D1,SLEN=3D0,IVAL=3D0,ERR=3DIOE= RROR
>=C2=A0 =C2=A0frame[0] WRITE 128 bytes
> 19:24:03.974541 usbus1.4
> SUBM-BULK-EP=3D00000001,SPD=3DFULL,NFR=3D1,SLEN=3D1264,IVAL=3D0
>=C2=A0 =C2=A0frame[0] WRITE 1264 bytes
> 19:24:04.004203 usbus1.4
> DONE-BULK-EP=3D00000001,SPD=3DFULL,NFR=3D1,SLEN=3D0,IVAL=3D0,ERR=3DIOE= RROR
>=C2=A0 =C2=A0frame[0] WRITE 144 bytes
> 19:24:06.975851 usbus1.4
> SUBM-BULK-EP=3D00000001,SPD=3DFULL,NFR=3D1,SLEN=3D1264,IVAL=3D0
>=C2=A0 =C2=A0frame[0] WRITE 1264 bytes
> 19:24:07.004209 usbus1.4
> DONE-BULK-EP=3D00000001,SPD=3DFULL,NFR=3D1,SLEN=3D0,IVAL=3D0,ERR=3DIOE= RROR
>=C2=A0 =C2=A0frame[0] WRITE 128 bytes
> 19:24:09.605790 usbus1.4
> SUBM-BULK-EP=3D00000001,SPD=3DFULL,NFR=3D1,SLEN=3D1264,IVAL=3D0
>=C2=A0 =C2=A0frame[0] WRITE 1264 bytes
> 19:24:09.633980 usbus1.4
> DONE-BULK-EP=3D00000001,SPD=3DFULL,NFR=3D1,SLEN=3D0,IVAL=3D0,ERR=3DIOE= RROR
>=C2=A0 =C2=A0frame[0] WRITE 128 bytes
> 19:24:12.385923 usbus1.4
> SUBM-BULK-EP=3D00000001,SPD=3DFULL,NFR=3D1,SLEN=3D1264,IVAL=3D0
>=C2=A0 =C2=A0frame[0] WRITE 1264 bytes
> 19:24:12.413760 usbus1.4
> DONE-BULK-EP=3D00000001,SPD=3DFULL,NFR=3D1,SLEN=3D0,IVAL=3D0,ERR=3DIOE= RROR
>=C2=A0 =C2=A0frame[0] WRITE 128 bytes
> 19:24:15.224542 usbus1.4
> SUBM-BULK-EP=3D00000001,SPD=3DFULL,NFR=3D1,SLEN=3D1264,IVAL=3D0
>=C2=A0 =C2=A0frame[0] WRITE 1264 bytes
> 19:24:15.253771 usbus1.4
> DONE-BULK-EP=3D00000001,SPD=3DFULL,NFR=3D1,SLEN=3D0,IVAL=3D0,ERR=3DIOE= RROR
>=C2=A0 =C2=A0frame[0] WRITE 128 bytes
> 19:24:18.174530 usbus1.4
> SUBM-BULK-EP=3D00000001,SPD=3DFULL,NFR=3D1,SLEN=3D1264,IVAL=3D0
>=C2=A0 =C2=A0frame[0] WRITE 1264 bytes
> 19:24:18.203756 usbus1.4
> DONE-BULK-EP=3D00000001,SPD=3DFULL,NFR=3D1,SLEN=3D0,IVAL=3D0,ERR=3DIOE= RROR
>=C2=A0 =C2=A0frame[0] WRITE 128 bytes
> 19:24:21.125927 usbus1.4
> SUBM-BULK-EP=3D00000001,SPD=3DFULL,NFR=3D1,SLEN=3D1264,IVAL=3D0
>=C2=A0 =C2=A0frame[0] WRITE 1264 bytes
> 19:24:21.153752 usbus1.4
> DONE-BULK-EP=3D00000001,SPD=3DFULL,NFR=3D1,SLEN=3D0,IVAL=3D0,ERR=3DIOE= RROR
>=C2=A0 =C2=A0frame[0] WRITE 136 bytes
> 19:24:24.275854 usbus1.4
> SUBM-BULK-EP=3D00000001,SPD=3DFULL,NFR=3D1,SLEN=3D1264,IVAL=3D0
>=C2=A0 =C2=A0frame[0] WRITE 1264 bytes
> 19:24:24.303756 usbus1.4
> DONE-BULK-EP=3D00000001,SPD=3DFULL,NFR=3D1,SLEN=3D0,IVAL=3D0,ERR=3DIOE= RROR
>=C2=A0 =C2=A0frame[0] WRITE 144 bytes
> 19:24:27.485857 usbus1.4
> SUBM-BULK-EP=3D00000001,SPD=3DFULL,NFR=3D1,SLEN=3D1264,IVAL=3D0
>=C2=A0 =C2=A0frame[0] WRITE 1264 bytes
> 19:24:27.772223 usbus1.4
> DONE-BULK-EP=3D00000001,SPD=3DFULL,NFR=3D1,SLEN=3D0,IVAL=3D0,ERR=3D0 >=C2=A0 =C2=A0frame[0] WRITE 1264 bytes
> 19:24:36.194633 usbus1.4
> SUBM-BULK-EP=3D00000001,SPD=3DFULL,NFR=3D1,SLEN=3D1264,IVAL=3D0
>=C2=A0 =C2=A0frame[0] WRITE 1264 bytes
> 19:24:36.223750 usbus1.4
> DONE-BULK-EP=3D00000001,SPD=3DFULL,NFR=3D1,SLEN=3D0,IVAL=3D0,ERR=3DIOE= RROR
>=C2=A0 =C2=A0frame[0] WRITE 128 bytes
> 19:24:39.115831 usbus1.4
> SUBM-BULK-EP=3D00000001,SPD=3DFULL,NFR=3D1,SLEN=3D1264,IVAL=3D0
>=C2=A0 =C2=A0frame[0] WRITE 1264 bytes
> 19:24:39.143771 usbus1.4
> DONE-BULK-EP=3D00000001,SPD=3DFULL,NFR=3D1,SLEN=3D0,IVAL=3D0,ERR=3DIOE= RROR
>=C2=A0 =C2=A0frame[0] WRITE 144 bytes
> 19:24:41.855851 usbus1.4
> SUBM-BULK-EP=3D00000001,SPD=3DFULL,NFR=3D1,SLEN=3D1264,IVAL=3D0
>=C2=A0 =C2=A0frame[0] WRITE 1264 bytes
> 19:24:41.883758 usbus1.4
> DONE-BULK-EP=3D00000001,SPD=3DFULL,NFR=3D1,SLEN=3D0,IVAL=3D0,ERR=3DIOE= RROR
>=C2=A0 =C2=A0frame[0] WRITE 128 bytes
> 19:24:44.215882 usbus1.4
> SUBM-BULK-EP=3D00000001,SPD=3DFULL,NFR=3D1,SLEN=3D1264,IVAL=3D0
>=C2=A0 =C2=A0frame[0] WRITE 1264 bytes
> 19:24:44.243755 usbus1.4
> DONE-BULK-EP=3D00000001,SPD=3DFULL,NFR=3D1,SLEN=3D0,IVAL=3D0,ERR=3DIOE= RROR
>=C2=A0 =C2=A0frame[0] WRITE 128 bytes
> 19:24:47.634603 usbus1.4
> SUBM-BULK-EP=3D00000001,SPD=3DFULL,NFR=3D1,SLEN=3D1264,IVAL=3D0
>=C2=A0 =C2=A0frame[0] WRITE 1264 bytes
> 19:24:47.663751 usbus1.4
> DONE-BULK-EP=3D00000001,SPD=3DFULL,NFR=3D1,SLEN=3D0,IVAL=3D0,ERR=3DIOE= RROR
>=C2=A0 =C2=A0frame[0] WRITE 128 bytes
> 19:24:50.324493 usbus1.4
> SUBM-BULK-EP=3D00000001,SPD=3DFULL,NFR=3D1,SLEN=3D1264,IVAL=3D0
>=C2=A0 =C2=A0frame[0] WRITE 1264 bytes
> 19:24:50.353755 usbus1.4
> DONE-BULK-EP=3D00000001,SPD=3DFULL,NFR=3D1,SLEN=3D0,IVAL=3D0,ERR=3DIOE= RROR
>=C2=A0 =C2=A0frame[0] WRITE 128 bytes
> 19:24:52.864637 usbus1.4
> SUBM-BULK-EP=3D00000001,SPD=3DFULL,NFR=3D1,SLEN=3D1264,IVAL=3D0
>=C2=A0 =C2=A0frame[0] WRITE 1264 bytes
> 19:24:52.893756 usbus1.4
> DONE-BULK-EP=3D00000001,SPD=3DFULL,NFR=3D1,SLEN=3D0,IVAL=3D0,ERR=3DIOE= RROR
>=C2=A0 =C2=A0frame[0] WRITE 144 bytes
> 19:24:54.944528 usbus1.4
> SUBM-BULK-EP=3D00000001,SPD=3DFULL,NFR=3D1,SLEN=3D1264,IVAL=3D0
>=C2=A0 =C2=A0frame[0] WRITE 1264 bytes
> 19:24:54.973743 usbus1.4
> DONE-BULK-EP=3D00000001,SPD=3DFULL,NFR=3D1,SLEN=3D0,IVAL=3D0,ERR=3DIOE= RROR
>=C2=A0 =C2=A0frame[0] WRITE 128 bytes
> 19:24:57.254498 usbus1.4
> SUBM-BULK-EP=3D00000001,SPD=3DFULL,NFR=3D1,SLEN=3D1264,IVAL=3D0
>=C2=A0 =C2=A0frame[0] WRITE 1264 bytes
> 19:24:57.537227 usbus1.4
> DONE-BULK-EP=3D00000001,SPD=3DFULL,NFR=3D1,SLEN=3D0,IVAL=3D0,ERR=3D0 >=C2=A0 =C2=A0frame[0] WRITE 1264 bytes
> 19:25:06.024607 usbus1.4
> SUBM-BULK-EP=3D00000001,SPD=3DFULL,NFR=3D1,SLEN=3D1264,IVAL=3D0
>=C2=A0 =C2=A0frame[0] WRITE 1264 bytes
> 19:25:06.053747 usbus1.4
> DONE-BULK-EP=3D00000001,SPD=3DFULL,NFR=3D1,SLEN=3D0,IVAL=3D0,ERR=3DIOE= RROR
>=C2=A0 =C2=A0frame[0] WRITE 128 bytes
> 19:25:08.214550 usbus1.4
> SUBM-BULK-EP=3D00000001,SPD=3DFULL,NFR=3D1,SLEN=3D1264,IVAL=3D0
>=C2=A0 =C2=A0frame[0] WRITE 1264 bytes
> 19:25:08.243749 usbus1.4
> DONE-BULK-EP=3D00000001,SPD=3DFULL,NFR=3D1,SLEN=3D0,IVAL=3D0,ERR=3DIOE= RROR
>=C2=A0 =C2=A0frame[0] WRITE 144 bytes
> 19:25:10.355858 usbus1.4
> SUBM-BULK-EP=3D00000001,SPD=3DFULL,NFR=3D1,SLEN=3D1264,IVAL=3D0
>=C2=A0 =C2=A0frame[0] WRITE 1264 bytes
> 19:25:10.383752 usbus1.4
> DONE-BULK-EP=3D00000001,SPD=3DFULL,NFR=3D1,SLEN=3D0,IVAL=3D0,ERR=3DIOE= RROR
>=C2=A0 =C2=A0frame[0] WRITE 128 bytes
> 19:25:12.435851 usbus1.4
> SUBM-BULK-EP=3D00000001,SPD=3DFULL,NFR=3D1,SLEN=3D1264,IVAL=3D0
>=C2=A0 =C2=A0frame[0] WRITE 1264 bytes
> 19:25:12.463752 usbus1.4
> DONE-BULK-EP=3D00000001,SPD=3DFULL,NFR=3D1,SLEN=3D0,IVAL=3D0,ERR=3DIOE= RROR
>=C2=A0 =C2=A0frame[0] WRITE 128 bytes
> 19:25:14.574555 usbus1.4
> SUBM-BULK-EP=3D00000001,SPD=3DFULL,NFR=3D1,SLEN=3D1264,IVAL=3D0
>=C2=A0 =C2=A0frame[0] WRITE 1264 bytes
> 19:25:14.603740 usbus1.4
> DONE-BULK-EP=3D00000001,SPD=3DFULL,NFR=3D1,SLEN=3D0,IVAL=3D0,ERR=3DIOE= RROR
>=C2=A0 =C2=A0frame[0] WRITE 128 bytes
> 19:25:17.814561 usbus1.4
> SUBM-BULK-EP=3D00000001,SPD=3DFULL,NFR=3D1,SLEN=3D1264,IVAL=3D0
>=C2=A0 =C2=A0frame[0] WRITE 1264 bytes
> 19:25:17.844015 usbus1.4
> DONE-BULK-EP=3D00000001,SPD=3DFULL,NFR=3D1,SLEN=3D0,IVAL=3D0,ERR=3DIOE= RROR
>=C2=A0 =C2=A0frame[0] WRITE 128 bytes
> 19:25:19.924529 usbus1.4
> SUBM-BULK-EP=3D00000001,SPD=3DFULL,NFR=3D1,SLEN=3D1264,IVAL=3D0
>=C2=A0 =C2=A0frame[0] WRITE 1264 bytes
> 19:25:19.954029 usbus1.4
> DONE-BULK-EP=3D00000001,SPD=3DFULL,NFR=3D1,SLEN=3D0,IVAL=3D0,ERR=3DIOE= RROR
>=C2=A0 =C2=A0frame[0] WRITE 128 bytes
> 19:25:28.075867 usbus1.4
> SUBM-BULK-EP=3D00000001,SPD=3DFULL,NFR=3D1,SLEN=3D1264,IVAL=3D0
>=C2=A0 =C2=A0frame[0] WRITE 1264 bytes
> 19:25:28.104036 usbus1.4
> DONE-BULK-EP=3D00000001,SPD=3DFULL,NFR=3D1,SLEN=3D0,IVAL=3D0,ERR=3DIOE= RROR
>=C2=A0 =C2=A0frame[0] WRITE 144 bytes
> 19:25:30.195823 usbus1.4
> SUBM-BULK-EP=3D00000001,SPD=3DFULL,NFR=3D1,SLEN=3D1264,IVAL=3D0
>=C2=A0 =C2=A0frame[0] WRITE 1264 bytes
> 19:25:30.224035 usbus1.4
> DONE-BULK-EP=3D00000001,SPD=3DFULL,NFR=3D1,SLEN=3D0,IVAL=3D0,ERR=3DIOE= RROR
>=C2=A0 =C2=A0frame[0] WRITE 128 bytes
> 19:25:32.574567 usbus1.4
> SUBM-BULK-EP=3D00000001,SPD=3DFULL,NFR=3D1,SLEN=3D1264,IVAL=3D0
>=C2=A0 =C2=A0frame[0] WRITE 1264 bytes
> 19:25:32.604028 usbus1.4
> DONE-BULK-EP=3D00000001,SPD=3DFULL,NFR=3D1,SLEN=3D0,IVAL=3D0,ERR=3DIOE= RROR
>=C2=A0 =C2=A0frame[0] WRITE 128 bytes
> 19:25:34.624522 usbus1.4
> SUBM-BULK-EP=3D00000001,SPD=3DFULL,NFR=3D1,SLEN=3D1264,IVAL=3D0
>=C2=A0 =C2=A0frame[0] WRITE 1264 bytes
> 19:25:34.654016 usbus1.4
> DONE-BULK-EP=3D00000001,SPD=3DFULL,NFR=3D1,SLEN=3D0,IVAL=3D0,ERR=3DIOE= RROR
>=C2=A0 =C2=A0frame[0] WRITE 128 bytes
> 19:25:36.895889 usbus1.4
> SUBM-BULK-EP=3D00000001,SPD=3DFULL,NFR=3D1,SLEN=3D1264,IVAL=3D0
>=C2=A0 =C2=A0frame[0] WRITE 1264 bytes
> 19:25:36.924007 usbus1.4
> DONE-BULK-EP=3D00000001,SPD=3DFULL,NFR=3D1,SLEN=3D0,IVAL=3D0,ERR=3DIOE= RROR
>=C2=A0 =C2=A0frame[0] WRITE 144 bytes
>
> 86 packets captured
> 41546 packets received by filter
> 0 packets dropped by kernel
>
> What could be these ioerrors? As I am also firm that my Epson printer&= #39;s
> status is good and this only happens in RPi 3B but not RPi 4B. My RPi = 4B
> using the same printer and ugen(4) driver is very stable.

Hi,

IOERROR usually means an electrical error. The RPI3B will use a
transaction translator for the FULL speed traffic, which is driven by
software. Maybe there is a bug in the HC driver,
"dev/usb/controller/dwc_otg.c". There are some sysctls to enable = full HC
debugging, see hw.usb.xxx.debug=3D17 .

= Hi Hans,

Thanks for your immediate response! I'= ;ll also try my spare RPi 3B if it behaves the same. Noted on this HC drive= r you've mentioned. I'll explore the sysctl knobs for debugging.
=C2=A0

Is the device self-powered?

Yes it'= s a self-powered device.
=C2=A0

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[] =3D {<= br> >=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0{USB_IFACE_CLASS(UICLASS_PRINTER), >=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 USB_IFACE_SUBCLASS(UISUBCLASS_PRINTE= R),
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 USB_IFACE_PROTOCOL(UIPROTO_PRINTER_1= 284)},
> +
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0/* Epson printer */
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0{USB_VPI(USB_VENDOR_EPSON, USB_PRODUCT_EPS= ON_TMU220B, 0)},
>=C2=A0 };
>=C2=A0
>=C2=A0 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=C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 0x0120=C2=A0 Perfection 1270 scanner
>=C2=A0 product EPSON 2480=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A00x0121=C2=A0 Perfection 2480 scanner
>=C2=A0 product EPSON 3590=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A00x0122=C2=A0 Perfection 3590 scanner
>=C2=A0 product 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 0x0200=C2=A0 = TM-U220B
>=C2=A0 product EPSON CRESSI_EDY=C2=A0 =C2=A0 =C2=A0 =C2=A00x0521=C2=A0 = Cressi Edy diving computer
>=C2=A0 product EPSON N2ITION3=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A00x0522= =C2=A0 Zeagle N2iTion3 diving computer
>=C2=A0 product EPSON STYLUS_875DC=C2=A0 =C2=A0 =C2=A00x0601=C2=A0 Stylu= s Photo 875DC Card Reader

Okay I'll add = this patch.

Thanks and best regards,
Archimedes
--0000000000000f5d5105d9dcefb3--