Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 11 Jul 2018 19:22:56 +0200
From:      Stefan Bethke <stb@lassitu.de>
To:        FreeBSD Stable <freebsd-stable@freebsd.org>
Subject:   Passing through USB serial to bhyve VM
Message-ID:  <24ADE3E6-869B-4B77-B94D-3F71EC26E3F5@lassitu.de>

next in thread | raw e-mail | index | archive | help
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 <stb@lassitu.de>   Fon +49 151 14070811





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?24ADE3E6-869B-4B77-B94D-3F71EC26E3F5>