From owner-freebsd-stable@freebsd.org Wed Jul 11 17:23:00 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 13D15102BE18 for ; Wed, 11 Jul 2018 17:23:00 +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 AA0CF7CF0F for ; Wed, 11 Jul 2018 17:22:59 +0000 (UTC) (envelope-from stb@lassitu.de) Received: by gilb.zs64.net (Postfix, from stb@lassitu.de) id 01E84110FBA for ; Wed, 11 Jul 2018 17:22:57 +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: Passing through USB serial to bhyve VM Message-Id: <24ADE3E6-869B-4B77-B94D-3F71EC26E3F5@lassitu.de> Date: Wed, 11 Jul 2018 19:22:56 +0200 To: FreeBSD Stable 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 17:23:00 -0000 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 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? [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 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 Stefan --=20 Stefan Bethke Fon +49 151 14070811