From owner-freebsd-stable@freebsd.org Thu Jul 12 07:14:17 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 10F8F103AA55 for ; Thu, 12 Jul 2018 07:14:17 +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 8279E80D1D for ; Thu, 12 Jul 2018 07:14:16 +0000 (UTC) (envelope-from stb@lassitu.de) Received: by gilb.zs64.net (Postfix, from stb@lassitu.de) id CF51911685D for ; Thu, 12 Jul 2018 07:14:14 +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: Thu, 12 Jul 2018 09:14:13 +0200 References: <24ADE3E6-869B-4B77-B94D-3F71EC26E3F5@lassitu.de> <330AB9AE-9872-405E-8A73-D6F452D7A87A@lassitu.de> To: FreeBSD Stable In-Reply-To: <330AB9AE-9872-405E-8A73-D6F452D7A87A@lassitu.de> Message-Id: 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: Thu, 12 Jul 2018 07:14:17 -0000 FWIW, I=E2=80=99ve opened a bug: = https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D229712 > Am 11.07.2018 um 23:41 schrieb Stefan Bethke : >=20 > 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. >=20 >=20 > Stefan >=20 >> 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 > --=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