From nobody Thu Apr 25 21:05:07 2024 X-Original-To: freebsd-current@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 4VQT0B2P1hz5JYW7 for ; Thu, 25 Apr 2024 21:05:30 +0000 (UTC) (envelope-from thj@freebsd.org) Received: from fout5-smtp.messagingengine.com (fout5-smtp.messagingengine.com [103.168.172.148]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4VQT095V8Zz4tXn for ; Thu, 25 Apr 2024 21:05:29 +0000 (UTC) (envelope-from thj@freebsd.org) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=messagingengine.com header.s=fm3 header.b="E xahpJd"; dmarc=fail reason="No valid SPF, DKIM not aligned (relaxed)" header.from=freebsd.org (policy=none); spf=softfail (mx1.freebsd.org: 103.168.172.148 is neither permitted nor denied by domain of thj@freebsd.org) smtp.mailfrom=thj@freebsd.org Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailfout.nyi.internal (Postfix) with ESMTP id 5CA451380252 for ; Thu, 25 Apr 2024 17:05:28 -0400 (EDT) Received: from imap47 ([10.202.2.97]) by compute3.internal (MEProxy); Thu, 25 Apr 2024 17:05:28 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t=1714079128; x= 1714165528; bh=g/uaF1VEJQDpcuMUrDQ66xIC2QBwAZSxR94n2Kd9DPk=; b=E xahpJdVogY9KdERnfQuvsYrY78fiLxnDgYWwJ0IS/UL5rc1YmyNLmCUWC6RDXdTQ i57ZiimOuYnv0KGMyMXKrpBSbZeb0TzlUFpCit2m6+Eupbb749FQRQdBATXOWzCt eHotehiXv4HEiyZ1q9ZFT6Z9DaFmFPtcMFr9xcMa/hTaWjqGKX+ZgugqDIs03edS 8AxsMn4/hVsIfx28iJhXv1vGMQXXcqQ8WzkNzAy5Jyflg531zso5VXcTcvlw2wst kGL8iZnMc7GP4+3om9kjnGoqw4wzk7BADkpybw4fP0Bc9VUhYU90LtHTKItyvJsL veoHvM2HYixJ6bF0BN7aA== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrudeljedgudehkecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecunecujfgurhepofgfggfkjghffffhvffutgfgse htqhertderreejnecuhfhrohhmpedfvfhomhculfhonhgvshdfuceothhhjhesfhhrvggv sghsugdrohhrgheqnecuggftrfgrthhtvghrnhepgffhteevieetkeehheelteefkefggf ehheejheelteeutdevfedulefgfedvhfffnecuffhomhgrihhnpegvshhprhgvshhsihhf rdgtohhmnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomh epthhhjhesfhhrvggvsghsugdrohhrgh X-ME-Proxy: Feedback-ID: ib75146ab:Fastmail Received: by mailuser.nyi.internal (Postfix, from userid 501) id 0A26BA60078; Thu, 25 Apr 2024 17:05:27 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.11.0-alpha0-386-g4cb8e397f9-fm-20240415.001-g4cb8e397 List-Id: Discussions about the use of FreeBSD-current List-Archive: https://lists.freebsd.org/archives/freebsd-current List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-current@FreeBSD.org MIME-Version: 1.0 Message-Id: In-Reply-To: <20240425211814.539cccb7@thor.intern.walstatt.dynvpn.de> References: <20240425211814.539cccb7@thor.intern.walstatt.dynvpn.de> Date: Thu, 25 Apr 2024 22:05:07 +0100 From: "Tom Jones" To: freebsd-current@freebsd.org Subject: Re: serial/ulscom: response timeout using pySerial/esptool.py Content-Type: text/plain;charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spamd-Bar: --- X-Spamd-Result: default: False [-3.25 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_SHORT(-0.96)[-0.965]; R_DKIM_ALLOW(-0.20)[messagingengine.com:s=fm3]; RCVD_IN_DNSWL_LOW(-0.10)[103.168.172.148:from]; MIME_GOOD(-0.10)[text/plain]; DMARC_POLICY_SOFTFAIL(0.10)[freebsd.org : No valid SPF, DKIM not aligned (relaxed),none]; XM_UA_NO_VERSION(0.01)[]; MIME_TRACE(0.00)[0:+]; DWL_DNSWL_NONE(0.00)[messagingengine.com:dkim]; FREEFALL_USER(0.00)[thj]; ARC_NA(0.00)[]; RCPT_COUNT_ONE(0.00)[1]; ASN(0.00)[asn:209242, ipnet:103.168.172.0/24, country:US]; FROM_HAS_DN(0.00)[]; RCVD_TLS_LAST(0.00)[]; MLMMJ_DEST(0.00)[freebsd-current@freebsd.org]; R_SPF_SOFTFAIL(0.00)[~all:c]; FROM_EQ_ENVFROM(0.00)[]; TO_DOM_EQ_FROM_DOM(0.00)[]; TO_DN_NONE(0.00)[]; PREVIOUSLY_DELIVERED(0.00)[freebsd-current@freebsd.org]; TO_MATCH_ENVRCPT_ALL(0.00)[]; RCVD_COUNT_THREE(0.00)[3]; DKIM_TRACE(0.00)[messagingengine.com:+] X-Rspamd-Queue-Id: 4VQT095V8Zz4tXn Can you isolate out the extraneous stuff and loop tx and rx on a CP2101 = board and send bytes through?=20 I did a bunch of development on an esp8266 board in the last few weeks a= nd had no issues, but I=E2=80=99ve no idea if it were the same usb seria= l chip.=20 I=E2=80=99ll have a dig around and see if I have something matching=20 On Thu, Apr 25, 2024, at 20:17, FreeBSD User wrote: > Hello, > > Host: 15.0-CURRENT FreeBSD 15.0-CURRENT #36 main-n269703-54c3aa02e926:=20 > Thu Apr 25 18:48:56 > CEST 2024 amd64 or 14-STABLE recently compiled (dmesg/uname not at=20 > hand). > > Hardware: oldish Z77Pro 4 based Asrock mainboard, a Lenovo T560=20 > notebook, Fujitsu Esprimo Q5XX > (simple desktop, Pentium Gold) or an oldish Fujitsu Celsius 7XX=20 > workstation, 6 core Haswell > XEON. > > Phenomenon: a couple of weeks now I try to connect to several Xtensa=20 > ESP32 dev boards > (ESP32-WROOM32 with CP2101 or CP2104 UART) via comms/py-esptool=20 > (doesn't matter whether it is > tho port's py39-esptool 4.5 or the latest py-esptool 4.7.0, doesn't=20 > matter whether pkg package > or self compiled on CURRENT and 14-STABLE, on all hardware platforms=20 > same result). > > Attaching the ESP devel module via Micro USB cable (several type,=20 > differnt vendors tried ...) > show > > dmesg: > [...] > ugen0.4: at usbus0 > uslcom0 on uhub3 > uslcom0: rev 1.10/1.00, addr 4> > on usbus0 > [...] > > When trying to connect to the ESP32 via below shown command (--trace=20 > not every time issued), I > get no connection: > > [ohartmann]: esptool.py --trace --chip esp32 --baud 115200 --port=20 > /dev/cuaU1 flash_id > esptool.py v4.7.0 > Loaded custom configuration from /pool/home/ohartmann/esptool.cfg > Serial port /dev/cuaU1 > Connecting...TRACE +0.000 command op=3D0x08 data len=3D36 wait_respons= e=3D1=20 > timeout=3D0.100 data=3D > 0707122055555555 5555555555555555 | ... UUUUUUUUUUUU > 5555555555555555 5555555555555555 | UUUUUUUUUUUUUUUU > 55555555 | UUUU > TRACE +0.000 Write 46 bytes:=20 > c000082400000000 0007071220555555 | ...$........ UUU > 5555555555555555 5555555555555555 | UUUUUUUUUUUUUUUU > 5555555555555555 5555555555c0 | UUUUUUUUUUUUU. > TRACE +0.102 No serial data received. > TRACE +0.052 command op=3D0x08 data len=3D36 wait_response=3D1 timeout= =3D0.100=20 > data=3D > 0707122055555555 5555555555555555 | ... UUUUUUUUUUUU > 5555555555555555 5555555555555555 | UUUUUUUUUUUUUUUU > 55555555 | UUUU > TRACE +0.000 Write 46 bytes:=20 > c000082400000000 0007071220555555 | ...$........ UUU > 5555555555555555 5555555555555555 | UUUUUUUUUUUUUUUU > 5555555555555555 5555555555c0 | UUUUUUUUUUUUU. > TRACE +0.107 No serial data received. > TRACE +0.054 command op=3D0x08 data len=3D36 wait_response=3D1 timeout= =3D0.100=20 > data=3D > 0707122055555555 5555555555555555 | ... UUUUUUUUUUUU > 5555555555555555 5555555555555555 | UUUUUUUUUUUUUUUU > 55555555 | UUUU > TRACE +0.000 Write 46 bytes:=20 > c000082400000000 0007071220555555 | ...$........ UUU > 5555555555555555 5555555555555555 | UUUUUUUUUUUUUUUU > 5555555555555555 5555555555c0 | UUUUUUUUUUUUU. > TRACE +0.107 No serial data received. > TRACE +0.054 command op=3D0x08 data len=3D36 wait_response=3D1 timeout= =3D0.100=20 > data=3D > 0707122055555555 5555555555555555 | ... UUUUUUUUUUUU > 5555555555555555 5555555555555555 | UUUUUUUUUUUUUUUU > 55555555 | UUUU > TRACE +0.000 Write 46 bytes:=20 > c000082400000000 0007071220555555 | ...$........ UUU > 5555555555555555 5555555555555555 | UUUUUUUUUUUUUUUU > 5555555555555555 5555555555c0 | UUUUUUUUUUUUU. > > > A serial exception error occurred: device reports readiness to read bu= t=20 > returned no data > (device disconnected or multiple access on port?) Note: This error=20 > originates from pySerial. > It is likely not a problem with esptool, but with the hardware=20 > connection or drivers. For > troubleshooting steps visit: > https://docs.espressif.com/projects/esptool/en/latest/troubleshooting.= html > [...] > > > Whatever baud rate issued, in most cases on all tested OS versions and=20 > almost all hardware > platforms except the Fujistu Celsius 7XX (2015 model) I do not get any=20 > connection! And it get > more weird: To avoid out-of-sync-software I recompiled everything via=20 > "portmaster -df > comms/py-pyserial comms/py-esptool" and after that, everything was=20 > fine, the connection was > made, I got results out of the chip. Seconds later same problems. > > I exchanged cablings, exchanged the ESP32 model and vendor. Invariants=20 > are 14-STABLE, daily > compiled, CURRENT. daily compiled. On my private box (old Z77 based=20 > IvyBridge ASRock crap), a > couple of Lenovo T560 running 14-STABLE and several Fujitsu Esprimo=20 > Q5XX boxes there is always > this weird error message, but in very rare cases I get connection. > > Only exception: the Fujsitus Celsius 7XX workstation (14-STABLE, last=20 > complied today noon). No > matter what ESP32, no matter what vendor, no matter what cablin used:=20 > connection is established > at any BAUD rate issued at any time. Not one single failure as shown=20 > above in any session (I > checked several tenth times)! > > Now I'm out of ideas and I suspect the CP210X ulscom serial driver to=20 > have trouble with most > onboard serial chipsets. > > Can anyone help me track down this issue? Is there anything I could ha= ve missed? > > I drives me nuts ... > > Thanks in advance, > > Oliver > >=20 > --=20 > O. Hartmann --=20 - Tom