Imported Upstream version 1.35
[platform/upstream/connman.git] / doc / connmanctl.1.in
1 .TH connmanctl 1 "2015-10-15" ""
2 .SH
3 NAME
4 connmanctl \- Connman CLI
5 .SH
6 SYNOPSIS
7 .BR connmanctl \ [\|\c
8 .BI state\fR\ |
9 .BI technologies\fR\ |
10 .BI enable \ technology\fR|offline\ |
11 .BI disable \ technology\fR|offline\ |
12 .BI tether \ technology\ \fRon|off\ |
13 .BI tether\fR\ wifi\ on|off\  ssid\ passphrase\fR\ |
14 .BR services \ [\fIservice\fR]\ |
15 .BI peers \ peer\fR\ |
16 .BI scan \ technology\fR\ |
17 .RI \fBconnect \ service | peer \ |
18 .RI \fBdisconnect \ service | peer \ |
19 .B config \ \fIservice\ option\ arg\fR...\ |
20 .BR vpnconnections \ [\fIconnection\fR]\ |
21 .BI help \fR\|]
22 .PP
23 .SH
24 DESCRIPTION
25 Connmanctl is a Connman command line interface which can be run in two modes:
26 a plain synchronous command input, and an asynchronous interactive shell.
27 To run a specific command the user may enter
28 .RI \fBconnmanctl\  command\  [ options ] \fR
29 or just \fBconnmanctl\fR, in the latter case an interactive shell will start.
30 .PP
31 Connmanctl can handle most network connections. It can be used to
32 enable/disable any technology that exists on the system, display a list of
33 services available, connect/disconnect networks, show properties of the system,
34 the technologies, and any individual service, and configure all of the
35 properties. It is also able to monitor changes in the properties of the
36 services, technologies, and the system.
37 .PP
38 In the interactive shell, all of the same commands can be used. It
39 provides quicker usage when needing to use connmanctl more extensively. In
40 addition, connecting to protected wireless access points for the first time
41 requires interactive shell.
42 .SH
43 COMMANDS AND OPTIONS
44 .TP
45 .B help
46 Shows the abbreviated help menu in the terminal.
47 .PP
48 .TP
49 .B state
50 Shows the system properties. Includes ths online state of the
51 system, offline mode, and session mode.
52 .PP
53 .TP
54 .B technologies
55 Shows a list of all technology types existing on the system and
56 their properties. See the properties section of the Technology
57 API for explanations of each property.
58 .PP
59 .TP
60 .BI enable \ technology
61 Enables the given technology type (e.g. ethernet, wifi, 3g, etc.)
62 Turns power on to the technology, but doesn't connect unless
63 there is a service with autoconnect set to True.
64 .PP
65 .TP
66 .BI disable \ technology
67 Disables the given technology type. Turns power off to the
68 technology and disconnects if it is already connected.
69 .PP
70 .TP
71 .B enable offline
72 Enables offline mode. Disconnects and powers down all
73 technologies system-wide, however each technology can be powered
74 back on individually.
75 .PP
76 .TP
77 .B disable offline
78 Disables offline mode. Technologies are powered back on according
79 to their individual policies.
80 .PP
81 .TP
82 .BI tether \ technology \ on \ \fR|\  off
83 Enable or disable tethering on \fItechnology\fR. Ethernet cannot be tethered
84 by default since tethering it usually breaks local networks. See
85 .BR connman.conf (5)
86 for enabling.
87 .PP
88 .TP
89 .BR tether\ wifi\ on \ |\  off \ \fIssid\ passphrase
90 Enable or disable wireless tethering, as well set the SSID and passphrase.
91 .PP
92 .TP
93 .B services
94 Shows a list of all available services. This includes the
95 nearby wifi networks, the wired ethernet connections, bluetooth devices, etc.
96 An asterisk in front of the service indicates that the service
97 has been connected before.
98 .PP
99 .TP
100 .BI services \ service
101 Shows a list of all properties for that service.
102 Only the service path (e.g. wifi_6834534139723_managed_none)
103 is accepted as a parameter.
104 .PP
105 .TP
106 .BI scan \ technology
107 Scans for new services on the given technology.
108 .PP
109 .TP
110 .BI connect \ service
111 Connects to the given service. Some services need a so-called
112 \fBprovisioning file\fR in order to connect to them, see
113 \fBconnman-service.config\fR(5).
114 .PP
115 .TP
116 .BI disconnect \ service
117 Disconnects from the given service.
118 .PP
119 .TP
120 .BI move-before \ service\ target-service
121 Prefer connecting to \fIservice\fR over \fItarget-service\fR.
122 .PP
123 .TP
124 .BI move-after \ service\ target-service
125 Prefer connecting to \fItarget-service\fR over \fIservice\fR.
126 .PP
127 .TP
128 .BI config \ service\ option\ arg\fR...
129 Configures a writable property of the given service to the value(s) entered
130 after \fIoption\fR. See the \fBConfig Options\fR subsection for details.
131 .PP
132 .TP
133 .BI monitor \ target
134 Listens for and displays DBus signals sent by Connman. If a currently monitored
135 property changes, the changes will be shown. If no \fItarget\fR is specified,
136 all changes will be shown. See the \fBMonitor Options\fR subsection for a
137 summary of parameters.
138 .PP
139 .TP
140 .BI vpnconnections
141 Shows a list of all available vpn connections.
142 .PP
143 .TP
144 .BI vpnconnections \ connection
145 Shows the current properties of \fIconnection\fR.
146 .PP
147 .SS
148 Commands only available in interactive mode:
149 .PP
150 .TP
151 .BR agent\ on \ |\  off
152 Enable or disable the wireless agent, used for entering wireless
153 network passphrases. See the \fBEXAMPLE\fR section of this man page for
154 an example of connecting to a wireless access point.
155 .PP
156 .TP
157 .BR vpnagent\ on \ |\  off
158 Enable or disable the vpn agent, used for entering vpn credentials.
159 .SS
160 Config Options:
161 .PP
162 .TP
163 .BR \fBautoconnect\ on \ |\  off
164 Sets the autoconnect property of the service.
165 .PP
166 .TP
167 .BR ipv4\ off \ |\  dhcp \ |\  manual\ \fIaddress\ netmask\ gateway
168 Configures the IPv4 settings for the service. The argument
169 \fBoff\fR means that IPv4 won't be used, \fBdhcp\fR means that
170 dhcp will be used to get the settings and \fBmanual\fR means
171 that the given arguments will be used as IPv4 settings.
172 .IR address ,\  netmask " and " gateway
173 must be valid IPv4 addresses. See the \fBEXAMPLE\fR section
174 of this man page for details.
175 .PP
176 .TP
177 .BR ipv6\ off \ |\  auto \ |\  manual\ \fIaddress\ prefixlength\ gateway
178 Configures the IPv6 settings for the service. The argument
179 \fBoff\fR means that IPv6 won't be used, \fBauto\fR means that
180 settings will be asked from the network and \fBmanual\fR means
181 that the given arguments will be used as IPv6 settings.
182 .IR address " and " gateway
183 must be valid IPv4 addresses. \fIprefixlength\fR is the length
184 of the prefix in bits. See the \fBEXAMPLE\fR section of this man
185 page for details.
186 .PP
187 .TP
188 .BI nameservers\  dns\fR\ [...]
189 Set the list of nameservers, separated by spaces.
190 .PP
191 .TP
192 .BI timeservers\  server\fR\ [...]
193 Set the list of timeservers, separated by spaces.
194 .PP
195 .TP
196 .BI domains\  domain\fR\ [...]
197 Set the list of search domains, separated by spaces.
198 .PP
199 .TP
200 .BR proxy\ direct \ |\  auto\fI\ URL \ |\  manual\ \fIserver [...]\ [--excludes\  \fIserver [...]]
201 Configures the proxy settings for the service. \fBdirect\fR means that no
202 proxy will be used. If using \fBauto\fR without a parameter, the network
203 will be asked for the proxy settings. Otherwise, use \fIURL\fR as an
204 proxy autoconfiguration URL. When set to \fBmanual\fR, the first list of servers
205 is used as proxy servers, and the traffic to the second list of servers are
206 excluded from the proxy. The list of excluded servers is optional. See the
207 \fBEXAMPLE\fR section of this man page for details.
208 .PP
209 .SS
210 Monitor Options:
211 .PP
212 .TP
213 .BR services\  [ off ]
214 Listens for changes to services, for example a service getting an IP address.
215 .PP
216 .TP
217 .BR tech\  [ off ]
218 Listens for changes to technologies, for example a technology getting enabled.
219 .PP
220 .TP
221 .BR manager\  [ off ]
222 Listens for the changes to global properties, available technologies,
223 services, and peers.
224 .PP
225 .TP
226 .BR vpnmanager\  [ off ]
227 Listens for added or removed vpn connections.
228 .PP
229 .TP
230 .BR vpnconnection\  [ off ]
231 Listens for the changes to vpn connections, for example connecting to a VPN.
232 .PP
233 .SH
234 EXAMPLE
235 Listing available technologies:
236 .PP
237       $ connmanctl technologies
238 .PP
239 Listing available services:
240 .PP
241       $ connmanctl services
242 .PP
243 Scanning for wireless networks:
244 .PP
245       $ connmanctl scan wifi
246 .PP
247 Using the interactive mode to access a wireless access point:
248 .PP
249       $ connmanctl
250       connmanctl> agent on
251       Agent registered
252       connmanctl> connect wifi_100ba9d170fc_666f6f626172_managed_psk
253       Agent RequestInput wifi_100ba9d170fc_666f6f626172_managed_psk
254         Passphrase = [ Type=psk, Requirement=mandatory ]
255       Passphrase? password
256       Connected wifi_100ba9d170fc_666f6f626172_managed_psk
257       connmanctl>
258 .PP
259 Configuring a static IP from the command line:
260 .PP
261       $ connmanctl config wifi_100ba9d170fc_666f6f626172_managed_psk ipv4 manual 192.168.1.101 255.255.255.0 192.168.1.1
262 .PP
263 Changing the IP back to dhcp:
264 .PP
265       $ connmanctl config wifi_100ba9d170fc_666f6f626172_managed_psk ipv4 dhcp
266 .PP
267 Setting a proxy server:
268 .PP
269       $ connmanctl config wifi_100ba9d170fc_666f6f626172_managed_psk proxy manual proxy.example.com
270 .PP
271 Setting multiple proxy servers:
272 .PP
273       $ connmanctl config wifi_100ba9d170fc_666f6f626172_managed_psk proxy manual proxy.example.com http://httpproxy.example.com --excludes internal.example.com
274 .PP
275 Tethering a wireless connection (ssid "SSID", passphrase "password"):
276 .PP
277       $ connmanctl tether wifi on SSID password
278 .PP
279 .SH
280 SEE ALSO
281 .BR connman.conf (5), \ connman-service.config (5), \c
282 .BR \ connman-vpn-provider.config (5), \ connman (8), \ connman-vpn (8)