From owner-freebsd-stable@freebsd.org Wed Jul 11 21:41:19 2018 Return-Path: Delivered-To: freebsd-stable@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 2D89E10489C7 for ; Wed, 11 Jul 2018 21:41:19 +0000 (UTC) (envelope-from stb@lassitu.de) Received: from gilb.zs64.net (gilb.zs64.net [IPv6:2a00:14b0:4200:32e0::1ea]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "gilb.zs64.net", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id C27118962C for ; Wed, 11 Jul 2018 21:41:18 +0000 (UTC) (envelope-from stb@lassitu.de) Received: by gilb.zs64.net (Postfix, from stb@lassitu.de) id 4228E1125B0 for ; Wed, 11 Jul 2018 21:41:10 +0000 (UTC) From: Stefan Bethke Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Mac OS X Mail 11.5 \(3445.9.1\)) Subject: Re: Passing through USB serial to bhyve VM Date: Wed, 11 Jul 2018 23:41:08 +0200 References: <24ADE3E6-869B-4B77-B94D-3F71EC26E3F5@lassitu.de> To: FreeBSD Stable In-Reply-To: <24ADE3E6-869B-4B77-B94D-3F71EC26E3F5@lassitu.de> Message-Id: <330AB9AE-9872-405E-8A73-D6F452D7A87A@lassitu.de> X-Mailer: Apple Mail (2.3445.9.1) X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Jul 2018 21:41:19 -0000 It=E2=80=99s been a while since I last dealt with serial devices. = Apparently, when passing through a serial device on the host to a COM = port in the VM, CTS/RTS are not (correctly) passed through. With set ctsrts off in ppp.conf I could get ppp to dial successfully. Stefan > Am 11.07.2018 um 19:22 schrieb Stefan Bethke : >=20 > I=E2=80=99m trying to access a Huawei USB LTE stick from a Bhyve VM = like so: > # cat /var/vm/mgmt/mgmt.conf=20 > loader=3D"bhyveload" > cpu=3D1 > memory=3D256M > network0_type=3D"virtio-net" > network0_switch=3D"lan" > disk0_type=3D"virtio-blk" > disk0_name=3D"disk0" > disk0_dev=3D"sparse-zvol" > uuid=3D"53854567-8358-11e8-9638-000db94be2cc" > network0_mac=3D"58:9c:fc:04:1d:52" > bhyve_options=3D"-lcom2,/dev/cuaU0=E2=80=9C >=20 > On the host, I can connect ppp(8), but inside the VM, ppp(8) appears = not to be able to talk to the USB device. Using cu(1), I can talk to it = just fine though. I=E2=80=99m not sure how to debug this further. Is = this supposed to just work, or am I missing some obvious configuration = bit? >=20 > [root@mgmt ~]# cu -l cuau1 -s 115200 > Connected > ATZ > OK > ATI > Manufacturer: huawei > Model: E3272 > Revision: 22.436.07.02.1202 > IMEI: 867503015nnnnnn > +GCAP: +CGSM,+DS,+ES >=20 > OK > ~ > [EOT] > [root@mgmt ~]# ppp > Working in interactive mode > Using interface: tun0 > Phase: PPP Started (interactive mode). > ppp ON mgmt> dial > Phase: bundle: Establish > Phase: deflink: closed -> opening > Phase: deflink: Connected! > Phase: deflink: opening -> dial > Chat: deflink: Dial attempt 1 of 1 > ppp ON mgmt> Chat: Send: ATZ > Chat: Expect(5): OK > Chat: Expect timeout > Chat: Send: ATZ > Chat: Expect(5): OK > Chat: Expect timeout > Warning: Chat script failed > Phase: deflink: dial -> hangup > Phase: deflink: Disconnected! > Phase: deflink: Connect time: 11 secs: 0 octets in, 0 octets out > Phase: deflink: 0 packets in, 0 packets out > Phase: total 0 bytes/sec, peak 0 bytes/sec on Wed Jul 11 21:14:43 = 2018 > Phase: deflink: hangup -> closed > Phase: bundle: Dead > ppp ON mgmt> quit > [root@mgmt ~]# cat /etc/ppp/ppp.conf > default: > enable dns > set log local LCP IPCP Phase Chat > set log all > set timeout 0 > ident UMTS > set authname eplus > set authkey internet > set cd off > set device /dev/cuau1 > set speed 115200 > set dial "ABORT BUSY ABORT NO\\sCARRIER \ > ABORT VOICE ABORT NO\\sDIALTONE ABORT NO\\sDIAL\\sTONE ABORT = ERROR \ > ABORT NO\\sANSWER ABORT DELAYED TIMEOUT 5 \ > \"\" ATZ OK-ATZ-OK \ > AT+CFUN=3D1 OK \ > AT+CREG? OK \ > AT+COPS? OK \ > AT+CSQ OK \ > AT^HCSQ? OK \ > AT+cgdcont=3D1,\\\"IP\\\",\\\"internet.eplus.de\\\" OK \ > ATDT*99***1# CONNECT" > set ifaddr 10.0.0.1/0 10.0.0.2/0 255.255.255.0 0.0.0.0 > add default HISADDR >=20 >=20 > Stefan >=20 > --=20 > Stefan Bethke Fon +49 151 14070811 >=20 >=20 > _______________________________________________ > freebsd-stable@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-stable > To unsubscribe, send any mail to = "freebsd-stable-unsubscribe@freebsd.org" --=20 Stefan Bethke Fon +49 151 14070811