xref: /netbsd-src/sbin/umbctl/umbctl.8 (revision 9e6960f9162bac4f125da6c3bb10d9e1693dbb3e)
1.\"	$NetBSD: umbctl.8,v 1.3 2020/03/22 07:45:02 khorben Exp $
2.\"
3.\" Copyright (c) 2018 by Pierre Pronchery <khorben@defora.org>
4.\" All rights reserved.
5.\"
6.\" Redistribution and use in source and binary forms, with or without
7.\" modification, are permitted provided that the following conditions
8.\" are met:
9.\" 1. Redistributions of source code must retain the above copyright
10.\"    notice, this list of conditions and the following disclaimer.
11.\" 2. Redistributions in binary form must reproduce the above copyright
12.\"    notice, this list of conditions and the following disclaimer in the
13.\"    documentation and/or other materials provided with the distribution.
14.\"
15.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS
16.\" OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
17.\" WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
18.\" DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT,
19.\" INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
20.\" (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
21.\" SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
22.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
23.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
24.\" IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
25.\" POSSIBILITY OF SUCH DAMAGE.
26.\"
27.\" From: pppoectl.8,v 1.30 2016/09/12 05:35:20 sevan Exp $
28.\"
29.\" $Id: umbctl.8,v 1.3 2020/03/22 07:45:02 khorben Exp $
30.\"
31.\" last edit-date: [Thu Aug 31 10:47:33 2000]
32.\"
33.Dd March 22, 2020
34.Dt UMBCTL 8
35.Os
36.Sh NAME
37.Nm umbctl
38.Nd display or set parameters for a MBIM interface (4G/LTE)
39.Sh SYNOPSIS
40.Nm umbctl
41.Op Fl v
42.Ar ifname
43.Op Ar parameter Op Ar value
44.Op Ar ...
45.Pp
46.Nm umbctl
47.Op Fl v
48.Fl f Ar config-file
49.Ar ifname
50.Sh DESCRIPTION
51.Nm
52supports the following options:
53.Bl -tag -width XfXconfigXfileXXX -offset indent
54.It Fl f Ar config-file
55Parse
56.Ar config-file
57for
58.Ar parameter Ns Op \&= Ns Ar value
59pairs, one per line, as if they had been specified on the command line.
60This allows the password or PIN codes to be not passed as command line
61arguments.
62Comments starting with # to the end of the current line are ignored.
63.It Fl v
64Enables verbose mode.
65.El
66.Pp
67The
68.Xr umb 4
69driver may require a number of additional arguments or optional
70parameters besides the settings that can be adjusted with
71.Xr ifconfig 8 .
72These may be credentials or other tunable connectivity variables.
73The
74.Nm
75utility can be used to display the current settings, or adjust these
76parameters as required.
77.Pp
78For whatever intent
79.Nm
80is being called, at least the parameter
81.Ar ifname
82needs to be specified, naming the interface for which the settings
83are to be performed or displayed.
84Use
85.Xr ifconfig 8
86or
87.Xr netstat 1
88to see which interfaces are available.
89.Pp
90If no other parameter is given,
91.Nm
92will just list the current status for
93.Ar ifname
94and exit.
95.Pp
96If any additional parameter is supplied, superuser privileges are
97required, and the command works in
98.Ql set
99mode.
100This is normally done quietly, unless the option
101.Fl v
102is also enabled, which will cause a final printout of the status as
103described above once all other actions have been taken.
104.Pp
105The parameters currently supported include:
106.Bl -tag -width xxxxxxxxxxxxxxxxxxxxxxxxx -offset indent
107.It Ar apn Ns \&= Ns Em access-point
108Set the APN to
109.Em access-point .
110.It Ar username Ns \&= Ns Em username
111Set the username to
112.Em username .
113.It Ar password Ns \&= Ns Em password
114Set the password to
115.Em password .
116.It Ar pin Ns \&= Ns Em pin-code
117Enter the PIN
118.Em pin-code .
119.It Ar puk Ns \&= Ns Em puk-code
120Enter the PUK
121.Em puk-code .
122.It Ar roaming
123Allow data connections when roaming.
124.It Ar -roaming
125Deny data connections when roaming.
126.El
127.Sh EXAMPLES
128.Bd -literal
129# umbctl umb0
130umb0: state up, mode automatic, registration home network
131	provider "BSD-Net", dataclass LTE, signal good
132	phone number "+15554242", roaming "" (denied)
133	APN "", TX 50000000, RX 100000000
134	firmware "MBIM_FW_V1.0", hardware "MBIM_HW_V1.0"
135.Ed
136.Pp
137Display the settings for umb0.
138.Bd -literal
139# umbctl umb0 apn operator.internet username mobile password mobile
140.Ed
141.Pp
142Configure the connection parameters for umb0 from the command line.
143.Bd -literal
144# umbctl -f /dev/stdin umb0 << EOF
145pin=1234
146EOF
147.Ed
148.Pp
149Configure the connection parameters for umb0 from a file.
150.Sh SEE ALSO
151.Xr netstat 1 ,
152.Xr umb 4 ,
153.Xr ifconfig 8 ,
154.Xr ifwatchd 8
155.Sh HISTORY
156The
157.Nm
158utility first appeared in
159.Nx 9.0 .
160.Sh AUTHORS
161The program was written by
162.An Pierre Pronchery .
163