From nobody Sun Dec 24 19:39:24 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 4Syrvs3GhKz54Mk0 for ; Sun, 24 Dec 2023 19:39:37 +0000 (UTC) (envelope-from fbsd@www.zefox.net) Received: from www.zefox.net (www.zefox.net [50.1.20.27]) (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 "www.zefox.com", Issuer "www.zefox.com" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Syrvr6z18z4v2S for ; Sun, 24 Dec 2023 19:39:36 +0000 (UTC) (envelope-from fbsd@www.zefox.net) Authentication-Results: mx1.freebsd.org; none Received: from www.zefox.net (localhost [127.0.0.1]) by www.zefox.net (8.17.1/8.15.2) with ESMTPS id 3BOJdPcs021113 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Sun, 24 Dec 2023 11:39:26 -0800 (PST) (envelope-from fbsd@www.zefox.net) Received: (from fbsd@localhost) by www.zefox.net (8.17.1/8.15.2/Submit) id 3BOJdOVm021112; Sun, 24 Dec 2023 11:39:24 -0800 (PST) (envelope-from fbsd) Date: Sun, 24 Dec 2023 11:39:24 -0800 From: bob prohaska To: ticso@cicely.de Cc: Marcin Cieslak , freebsd-arm@freebsd.org Subject: Re: USB-serial adapter suggestions needed Message-ID: 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-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:7065, ipnet:50.1.16.0/20, country:US] X-Spamd-Bar: ---- X-Rspamd-Queue-Id: 4Syrvr6z18z4v2S On Sun, Dec 24, 2023 at 06:01:00PM +0100, Bernd Walter wrote: > 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. The normal network setup is shown at http://www.zefox.net/~fbsd/netmap SSH sessions are initiated from the Pi4 workstation on the LAN to each FreeBSD host, using tip or cu to connect to the corresponding Pi's serial console. It's maybe worth mentioning that changing the host named pelorus from WAN to LAN and booting release/14 seems to make no difference. SSH sessions not involving usb-serial adapters stay up until the WiFi link crashes for some reason. According to the router's (D-Link DI-524) control panel the firewall features are turned off. > 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. There are no messages of the kind seen when an adapter is unplugged or turned off using usbconfig. I've tried turning on usb debugging, but the output is not obviously related to the disconnects, in part due to volume. Interestingly, a "stuck" adapter can usually be "unstuck" by using usbconfig to turn the power off and back on. Prompted by your email, I noticed that under the Advanced > Filters page of the router there's an option called "IP Filters", said to deny LAN access to the Internet. Neither Enabled nor Disabled are checked, no IP numbers are entered and all schedule times are set to zero. When I finish this email I'll explictly disable the filter function to see if some default is making mischief. > 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. I do see what looks like noise on the serial lines, but only after a spontaneous disconnect and only with FTDI adapters. When the serial connections are working nothing resembling noise is seen. > In some cases it might be required to have an isolated adapter. A close look at the connection diagram will reveal a loop connecting all the FreeBSD systems via the serial port grounds. Breaking that loop by lifting ground on one serial cable ground made no difference. > 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 helpful information. It sounds like there's little preference between pl2303, ft232, ch340 and cp2102. Thanks for writing! bob prohaska