From nobody Thu Nov 23 19:37:26 2023 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 4SbpLP717Wz51MYT for ; Thu, 23 Nov 2023 19:38:05 +0000 (UTC) (envelope-from freebsd@walstatt-de.de) Received: from smtp6.goneo.de (smtp6.goneo.de [85.220.129.31]) (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 4SbpLN34yPz3ZcP for ; Thu, 23 Nov 2023 19:38:04 +0000 (UTC) (envelope-from freebsd@walstatt-de.de) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=walstatt-de.de header.s=DKIM001 header.b=HgUjc5vF; spf=none (mx1.freebsd.org: domain of freebsd@walstatt-de.de has no SPF policy when checking 85.220.129.31) smtp.mailfrom=freebsd@walstatt-de.de; dmarc=none Received: from hub1.goneo.de (hub1.goneo.de [85.220.129.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by smtp6.goneo.de (Postfix) with ESMTPS id 8DEC3240CD1 for ; Thu, 23 Nov 2023 20:37:56 +0100 (CET) Received: from hub1.goneo.de (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by hub1.goneo.de (Postfix) with ESMTPS id AB053240A46 for ; Thu, 23 Nov 2023 20:37:54 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=walstatt-de.de; s=DKIM001; t=1700768274; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Uszr54cKOwntukZ7S8GG1FQQx8D04OwRUH/18SyzIW0=; b=HgUjc5vFNQerTWuthAHwi08pM/mhLhXOphDgeo7OOYWpWtmxBth3gd/L+ixzN53Bz1DU+V N6uD3u+FLw0BepOe3lWKQ383zuxkvdM8E4vZvSGEhi22cY2ilFA8KC7carSE5hLLNINvg4 yW/b825NDr2I5TlNDBwdPHpbPUcn0n/a5ZzMd3JzQFwM8Qu5Pj8KtSrBtE60/Iw8QP+F8a 6VEGyY0iQXk4GUlWg9zGYa/NPGJ+B7XBz147fJFj078/ee6fOnEQG1l1eyCISwnn1W+TbC kuOEURoBuLqGvzAqDTrP2QSRdmKccCD9e7+NxNS2868ORJC/yRaY40RcCKnSRg== Received: from thor.intern.walstatt.dynvpn.de (dynamic-089-014-074-227.89.14.pool.telefonica.de [89.14.74.227]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (prime256v1) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by hub1.goneo.de (Postfix) with ESMTPSA id 6C1872407DA for ; Thu, 23 Nov 2023 20:37:54 +0100 (CET) Date: Thu, 23 Nov 2023 20:37:26 +0100 From: FreeBSD User To: FreeBSD CURRENT Subject: uSB: uslcom: CP2102 weirdness when serial communication via cu/tip/cutecom Message-ID: <20231123203753.6ca93cc8@thor.intern.walstatt.dynvpn.de> Organization: walstatt-de.de 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 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Rspamd-UID: a716bf X-Rspamd-UID: da030d X-Spamd-Result: default: False [-3.30 / 15.00]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_SHORT(-1.00)[-0.998]; R_DKIM_ALLOW(-0.20)[walstatt-de.de:s=DKIM001]; MIME_GOOD(-0.10)[text/plain]; MLMMJ_DEST(0.00)[freebsd-current@freebsd.org]; DKIM_TRACE(0.00)[walstatt-de.de:+]; RCVD_VIA_SMTP_AUTH(0.00)[]; R_SPF_NA(0.00)[no SPF record]; TO_DN_ALL(0.00)[]; MIME_TRACE(0.00)[0:+]; FROM_EQ_ENVFROM(0.00)[]; RCVD_COUNT_THREE(0.00)[3]; RCPT_COUNT_ONE(0.00)[1]; ASN(0.00)[asn:25394, ipnet:85.220.128.0/17, country:DE]; FROM_HAS_DN(0.00)[]; ARC_NA(0.00)[]; HAS_ORG_HEADER(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; DMARC_NA(0.00)[walstatt-de.de]; PREVIOUSLY_DELIVERED(0.00)[freebsd-current@freebsd.org]; RCVD_TLS_ALL(0.00)[] X-Rspamd-Queue-Id: 4SbpLN34yPz3ZcP X-Spamd-Bar: --- Hello, I'm facing some strange behaviour when connecting to a CP2102 USB-UART bridge built-in into a I2C-USB device (I2C is handled by an Amtel88, USB-UART is handled by an CP2102, see here: https://de.elv.com/pc-usb-i2c-interface-200958 for an sketch/overview. The device is recognised as uslcom0 on uhub6 uslcom0: on usbus0 for more details via usbconfig see below. Using FreeBSD CURRENT and 14-STABLE (both most recent) connecting to the device via cu -l /dev/cuaUX -s 115200 results in most cases in a stuck connection. The LED of the device is responding to every keystroke made in the terminal, but I never see any output (which should). In some rare cases disconneting and reconnecting the USB link and connecting via "cu" gives the opportunity for a couple of seconds to enter "?" in the terminal which provides some firmware data on the device - then the communications goes dark. This behaviour is erratic and non predictable. I tried several platforms (hardware), all USB 3, tried FreeBSD 14-STABLE and CURRENT. On a notebook (Lenovo T560) running 14-STABLE the very same situation, but trying the Lenovo with Xubuntu 23.10 gives me a working "cu" and I'm able reading environmental data from the device. Using the methusalem USB 2 port of a computer were available gives me a few seconds more on FreeBSD, before the serial connection goes mute. In cases were possible I tried the same hardware with FreeBSD and Linux Xubuntu, FreeBSD fails, Xubuntu prevails the task. At this point I was quite sure that FreeBSD's uslcom-driver might be the culprit. Out of couriosity I tried a FSBD-13.2RELENG image for AARCH64 (PINE64 I have at hand) and connected the same way, the same device acts as normal as I see under Linux Xubuntu. I'm able to take environmental data as long as I please without a problem so far. Can someone hint me how to debug such a situation? I'm unwilling to use Linux since our infrastructure is based on FreeBSD and ... well, no further explanation on that subject ;-) Thanks in advance, O. Hartmann -- O. Hartmann