From nobody Sun Dec 24 17:01:00 2023 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 4SynP70DVlz54tkv for ; Sun, 24 Dec 2023 17:01:15 +0000 (UTC) (envelope-from ticso@cicely7.cicely.de) Received: from raven.bwct.de (raven.bwct.de [IPv6:2a02:21e0:16e0:fe::101:1]) (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-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "raven.bwct.de", Issuer "raven.bwct.de" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4SynP64m08z4bW2 for ; Sun, 24 Dec 2023 17:01:14 +0000 (UTC) (envelope-from ticso@cicely7.cicely.de) Authentication-Results: mx1.freebsd.org; none Received: from mail.cicely.de (mail.cicely.de [IPv6:2a02:21e0:16e0:20fe:0:0:101:c]) by raven.bwct.de (8.15.2/8.15.2) with ESMTPS id 3BOH10I8092794 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=FAIL); Sun, 24 Dec 2023 18:01:02 +0100 (CET) (envelope-from ticso@cicely7.cicely.de) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=cicely.de; s=default; t=1703437262; bh=YOGf7+9qr7S+3v7BSBbC6Zv3V9mspIvIYIZ3TiBxWkk=; h=Date:From:To:Cc:Subject:Reply-To:References:In-Reply-To; b=Mq4V471NcYNhCDFKQ9ceYK1jsXS3juiWrndtCWGaCh+Mvn3AqGhJeRfWTyo5oB088 iQlycHghuyRlUy6tLv9lXSoKNXi10gWoM+FulEGIg8BueYVWa1vo7gwhDtI85GV16/ UUXBapHPjMvxHXm9rNzaYvKVHU4rc3NzaCdf4DUY= Received: from cicely7.cicely.de (c7-old.cicely.de [IPv6:2a02:21e0:16e0:20fe:0:0:101:d]) by mail.cicely.de (8.16.1/8.16.1) with ESMTPS id 3BOH102I049534 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Sun, 24 Dec 2023 18:01:00 +0100 (CET) (envelope-from ticso@cicely7.cicely.de) Received: from cicely7.cicely.de (localhost [127.0.0.1]) by cicely7.cicely.de (8.17.1/8.17.1) with ESMTP id 3BOH10bJ024308; Sun, 24 Dec 2023 18:01:00 +0100 (CET) (envelope-from ticso@cicely7.cicely.de) Received: (from ticso@localhost) by cicely7.cicely.de (8.17.1/8.17.1/Submit) id 3BOH10Nv024307; Sun, 24 Dec 2023 18:01:00 +0100 (CET) (envelope-from ticso) Date: Sun, 24 Dec 2023 18:01:00 +0100 From: Bernd Walter To: bob prohaska Cc: Marcin Cieslak , freebsd-arm@freebsd.org Subject: Re: USB-serial adapter suggestions needed Message-ID: Reply-To: ticso@cicely.de References: <16864054-4os0-pq3p-7qp0-7299666908os@fncre.vasb> 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 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Operating-System: FreeBSD cicely7.cicely.de 13.2-RELEASE-p3 amd64 X-Rspamd-Server: rspamd.fizon.de X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:44700, ipnet:2a02:21e0::/32, country:DE] X-Spamd-Bar: ---- X-Rspamd-Queue-Id: 4SynP64m08z4bW2 On Sun, Dec 24, 2023 at 07:46:40AM -0800, bob prohaska wrote: > On Sun, Dec 24, 2023 at 01:21:40AM +0000, Marcin Cieslak wrote: > > On Sat, 23 Dec 2023, bob prohaska wrote: > > > > > On Sun, Dec 24, 2023 at 12:47:56AM +0000, Marcin Cieslak wrote: > > > > On Sat, 23 Dec 2023, bob prohaska wrote: > > > > > > > > > What are the best-supported usb-serial adapters for use with FreeBSD on arm systems? > > > > > > > > I am using uchcom(4)-based CH340, the reason I have it is selectable 3.3V/5V level. > > > > I don't have a Raspberry but I use it for other arm boards. > > > > > > > > Not sure it is "better" than, say ft232 > > > > > > Have you run into any oddities using the ch340? Noise on the lines, > > > dropped connections, irreproducible behavior? > > > > Only this https://lists.freebsd.org/archives/freebsd-arm/2023-March/002422.html - > > responding to your post about halted boot - but this is an EFI console problem. > > > > > Thanks for writing & confirming ch340 is an option! > > > > Are you still troubleshooting your broken tip connections? > > I'm still seeing tip sessions and the associated ssh connections drop, > but am no closer to understanding what's wrong. There does seem to be > a (somewhat imperfect) association between dropped tip sessions and > the use of FTDI-232 usb-serial adapters, but the sample is too small > (7 units) and too erratic (mix of Pi2, Pi3 & Pi4 hosts) to be sure of > anything. If you see ssh connections drop then this is network related and has nothing to do with the USB adapter. In case an USB adapter fails you will just drop out of tip into the shell. Most likly this is a statefull network device - e.g. NAT expire on either your or ISP side. TCPKeepAlive is active per default on OpenSSH, but often not enough for some agressive ISP equipment. You might also want to check if you have local firewalls in between, which are misconfigured to expire TCP states too early. If you run through equipment, which isn't in your hands at best you have an OpenVPN or similar connection to handle network instabilities and run ssh on top of it. If however this is not ssh session dropped and just tip, then look up kernel messages if the USB adapter was disconnected. If yes and you have that problem with multiple adapters then this is most likely power related, especially since both systems are connected via ground and can have all kind of electrical issues. In some cases it might be required to have an isolated adapter. That said, beside all chips work well. There are some bad boards however, which are unrelated to the chips themselves. Also at least with the PL2303, CP2102 and some FTDI there are fake chips on the market. Other than that you might need specific features, some FTDI and CH340 can do higher bps rates, which some rockchip based boards may need. Also FTDI and CP2102 and a few others can have uniquie serial numbers, which makes them easier to identify if you have multiple. That's the reason why I like to use FT4232H based for my bench tests. They can handle higher speeds and have serial numbers, plus they support multiple uart at the same time. I also have lots of CP2102, which I build myself and know those are technically good. > That's surprising given the Pl2303's rather poor repute and the ft232's > sterling reputation, but far from decisive. In my initial testing a few > years ago it seemed the reputations of the pl2303 and ft232 were more or > less deserved; the pl2303 seemed a little flakier and the ft232. Now that > situation seems to be reversed. The PL203 pure repute is that there had been tons of crappy adapters out there and also fake chips had been an issue early on. A quality board with a genuine Prolific chip works fine. Still today you will get a bad board with fake chips more likely than a good one if you buy from a random source. > If there's another usb-serial bridge option which open-source programmers > prefer it seems wise to adopt it. That's what I'm fishing for. > > Thanks for reading! > > bob prohaska > > > -- B.Walter https://www.bwct.de Modbus/TCP Ethernet I/O Baugruppen, ARM basierte FreeBSD Rechner uvm.