From owner-freebsd-arm@freebsd.org Mon Mar 11 05:01:10 2019 Return-Path: Delivered-To: freebsd-arm@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CEBE6152FA64 for ; Mon, 11 Mar 2019 05:01:10 +0000 (UTC) (envelope-from ticso@cicely7.cicely.de) Received: from raven.bwct.de (raven.bwct.de [195.149.99.3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "raven.bwct.de", Issuer "raven.bwct.de" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id F2A0781DB2 for ; Mon, 11 Mar 2019 05:01:09 +0000 (UTC) (envelope-from ticso@cicely7.cicely.de) Received: from mail.cicely.de ([10.1.1.37]) by raven.bwct.de (8.15.2/8.15.2) with ESMTPS id x2B4i8II098900 (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL); Mon, 11 Mar 2019 05:44:09 +0100 (CET) (envelope-from ticso@cicely7.cicely.de) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=cicely.de; s=default; t=1552279449; bh=gWW4STb5dkm1uWRbngF7auNO1oRtdOjG45aD2anQXJM=; h=Date:From:To:Cc:Subject:Reply-To:References:In-Reply-To; b=kn8i2QEDOcfXTpKtZx9lFMS3VgLCpdAxUEiJVYCHOQsoMVJWBtYk3IUQnonKY5qef PjTOqEjWi8K2m5/4T1Cuov2HypLOZUn33xIL9aelvzO/ZYvcBQ7XtHQQB+JGorxSRY ZHj6RTZXmXqlPK6DylAnmoNY8zJpyIDd2QCv12wk= Received: from cicely7.cicely.de (cicely7.cicely.de [10.1.1.9]) by mail.cicely.de (8.14.5/8.14.4) with ESMTP id x2B4i58x016382 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 11 Mar 2019 05:44:05 +0100 (CET) (envelope-from ticso@cicely7.cicely.de) Received: from cicely7.cicely.de (localhost [127.0.0.1]) by cicely7.cicely.de (8.15.2/8.15.2) with ESMTP id x2B4i5JF054036; Mon, 11 Mar 2019 05:44:05 +0100 (CET) (envelope-from ticso@cicely7.cicely.de) Received: (from ticso@localhost) by cicely7.cicely.de (8.15.2/8.15.2/Submit) id x2B4i4na054035; Mon, 11 Mar 2019 05:44:04 +0100 (CET) (envelope-from ticso) Date: Mon, 11 Mar 2019 05:44:04 +0100 From: Bernd Walter To: bob prohaska Cc: freebsd-arm@freebsd.org Subject: Re: Multiport USB hubs/switches on Raspberry Pi Message-ID: <20190311044402.GA51206@cicely7.cicely.de> Reply-To: ticso@cicely.de References: <20190310171028.GA64290@www.zefox.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190310171028.GA64290@www.zefox.net> X-Operating-System: FreeBSD cicely7.cicely.de 12.0-STABLE amd64 User-Agent: Mutt/1.5.11 X-Spam-Status: No, score=-2.9 required=4.0 tests=ALL_TRUSTED=-1, BAYES_00=-1.9 autolearn=ham version=3.3.0 X-Spam-Checker-Version: SpamAssassin 3.3.0 (2010-01-18) on spamd.cicely.de X-Rspamd-Queue-Id: F2A0781DB2 X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org; dkim=pass header.d=cicely.de header.s=default header.b=kn8i2QED X-Spamd-Result: default: False [-0.74 / 15.00]; ARC_NA(0.00)[]; HAS_REPLYTO(0.00)[ticso@cicely.de]; R_DKIM_ALLOW(-0.20)[cicely.de:s=default]; RCVD_COUNT_FIVE(0.00)[5]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; MV_CASE(0.50)[]; NEURAL_HAM_LONG(-0.99)[-0.990,0]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[cicely.de]; REPLYTO_DOM_NEQ_FROM_DOM(0.00)[]; NEURAL_SPAM_SHORT(0.40)[0.399,0]; TO_MATCH_ENVRCPT_SOME(0.00)[]; DKIM_TRACE(0.00)[cicely.de:+]; RCPT_COUNT_TWO(0.00)[2]; RCVD_IN_DNSWL_NONE(0.00)[3.99.149.195.list.dnswl.org : 127.0.20.0]; MX_GOOD(-0.01)[cached: mx1.bwct.de]; NEURAL_HAM_MEDIUM(-0.34)[-0.342,0]; R_SPF_NA(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; RCVD_TLS_LAST(0.00)[]; ASN(0.00)[asn:21461, ipnet:195.149.99.0/24, country:DE]; MID_RHS_MATCH_FROM(0.00)[]; IP_SCORE(-0.00)[country: DE(-0.01)] X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Mar 2019 05:01:11 -0000 On Sun, Mar 10, 2019 at 10:10:28AM -0700, bob prohaska wrote: > Does anyone have experience using multiport USB hubs on freebsd-arm, > specifically in the context of Raspberry Pi 2 or 3? USB hubs work fine on Raspberries and they better should, since one is integrated on most of them. I run a Pi3B+ on my Pick an Place machine to hook up all the IO boards. Works fine, just recently upgraded from a Pi2. [51]pnp-gcode.cicely.de# usbconfig ugen0.1: at usbus0, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=SAVE (0mA) ugen0.2: at usbus0, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=SAVE (2mA) ugen0.3: at usbus0, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=SAVE (2mA) ugen0.4: at usbus0, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=ON (2mA) ugen0.5: at usbus0, cfg=0 md=HOST spd=FULL (12Mbps) pwr=ON (90mA) ugen0.6: at usbus0, cfg=0 md=HOST spd=FULL (12Mbps) pwr=ON (90mA) ugen0.7: at usbus0, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=SAVE (100mA) ugen0.8: at usbus0, cfg=0 md=HOST spd=FULL (12Mbps) pwr=ON (96mA) ugen0.9: at usbus0, cfg=0 md=HOST spd=FULL (12Mbps) pwr=ON (96mA) ugen0.10: at usbus0, cfg=0 md=HOST spd=FULL (12Mbps) pwr=ON (90mA) ugen0.11: at usbus0, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=ON (100mA) ugen0.12: at usbus0, cfg=0 md=HOST spd=FULL (12Mbps) pwr=ON (100mA) ugen0.13: at usbus0, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=ON (500mA) ugen0.14: at usbus0, cfg=0 md=HOST spd=FULL (12Mbps) pwr=ON (100mA) [52]pnp-gcode.cicely.de# uname -a FreeBSD pnp-gcode.cicely.de 12.0-RELEASE FreeBSD 12.0-RELEASE r341666 GENERIC arm64 > I'm interested in trying to use a hub/switch (not sure there's a > difference in the case of USB) to construct a terminal server for > serial console access on a small cluster of Pi's. I'd want about > seven or eight ports, each holding a USB-serial adapter that would > then connect to the GPIO UART pins on one Pi in the cluster. I've > used both USB 3.0 and USB 1.1 hubs, and in both cases odd things > seem to happen from time to time. One potential example is > > > https://www.amazon.com/AmazonBasics-Port-USB-2-0-Hub/dp/B00GGYU46O/ref=sxin_2?keywords=powered+usb+hub&pd_rd_i=B00GGYU46O&pd_rd_r=83f1e3f0-a1e6-40aa-bdd8-aa86a7c0b360&pd_rd_w=foNmt&pd_rd_wg=ncKZR&pf_rd_p=0395a9fd-d124-46c0-a48f-d8582ed1a45c&pf_rd_r=2P9WWPAZGMAA29NMVVV2&qid=1552234319&s=gateway I can't speak for this specific hub, but many hubs are build marginal, especially when it comes to power delivery. In this special case I'm a bit sceptical supplying 10 port with that power supply and tiny connector. The hub I use on the pick and place machine is a bare PCB with 5V input from a big supply. For important stuff, especially if I need them to supply devices, I use hubs with higher input voltage and internal 5V regulator. Exsys has some nice ones, but they are not the only vendor. Exsys also has a big 19" hub, if that matters for your case. My suggestion is to use USB uarts, which can hold a serial number, such as uftdi or uslcom based. This makes it easier to wire them via devd. E.g. I have something like this in my devd.conf for a CP2102: attach 0 { device-name "uslcom[0-9]+"; match "sernum" "TTL01"; match "interface" "0"; action "rm /dev/ttluart1; ln -s /dev/cua$ttyname /dev/ttluart1"; }; And for a FT4232: attach 0 { device-name "uftdi[0-9]+"; match "sernum" "FTXO1CJC"; match "interface" "0"; action "rm /dev/manson_psu9; ln -s /dev/cua$ttyname /dev/manson_psu9"; }; attach 0 { device-name "uftdi[0-9]+"; match "sernum" "FTXO1CJC"; match "interface" "1"; action "rm /dev/manson_psu10; ln -s /dev/cua$ttyname /dev/manson_psu10"; }; attach 0 { device-name "uftdi[0-9]+"; match "sernum" "FTXO1CJC"; match "interface" "2"; action "rm /dev/x1; ln -s /dev/cua$ttyname /dev/x1"; }; attach 0 { device-name "uftdi[0-9]+"; match "sernum" "FTXO1CJC"; match "interface" "3"; action "rm /dev/x2; ln -s /dev/cua$ttyname /dev/x2"; }; > If anyone has experience along these lines or a suggestion for/against > particular USB devices or versions I'd be curious to know. -- B.Walter http://www.bwct.de Modbus/TCP Ethernet I/O Baugruppen, ARM basierte FreeBSD Rechner uvm.