Skip to content

Commit 3b745a8

Browse files
npentrelale7714sguequierre
authored
DOCS-3174: Update machine settings (#3930)
Co-authored-by: Ale Paredes <[email protected]> Co-authored-by: Sierra Guequierre <[email protected]>
1 parent 82fc4df commit 3b745a8

File tree

4 files changed

+240
-280
lines changed

4 files changed

+240
-280
lines changed

docs/manage/fleet/provision/end-user-setup.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ Note that any features that require internet access will not function if the con
139139

140140
You can now use your machine.
141141

142-
If your machine needs to be able to connect to more than one WiFi network, you can add additional networks in the [`viam-agent` network configuration](/manage/reference/viam-agent/#networks).
142+
If your machine needs to be able to connect to more than one WiFi network, you can add additional networks in the [`viam-agent` network configuration](/manage/reference/viam-agent/#network_configuration).
143143
You can also override other configuration details in the [`viam-agent` configuration](/manage/reference/viam-agent/#configuration).
144144

145145
To control your machine, you can navigate to its **CONTROL** tab in the [Viam app](https://app.viam.com).

docs/manage/fleet/provision/setup.md

+27-27
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ Create a file called <FILE>viam-provisioning.json</FILE> with the following form
187187
"model": "<NAME>", # the machine's model
188188
"fragment_id": "<ID>", # the fragment id, required for mobile app
189189
"hotspot_prefix": "<PREFIX>", # machine creates a hotspot during setup
190-
"disable_dns_redirect": true, # disable if using a mobile app
190+
"disable_captive_portal_redirect": false, # set to true if using a mobile app
191191
"hotspot_password": "<PASSWORD>", # password for the hotspot
192192
"networks" : []
193193
}
@@ -202,12 +202,12 @@ Create a file called <FILE>viam-provisioning.json</FILE> with the following form
202202
"model": "C-3PO",
203203
"fragment_id": "2567c87d-7aef-41bc-b82c-d363f9874663",
204204
"hotspot_prefix": "skywalker-setup",
205-
"disable_dns_redirect": true,
205+
"disable_captive_portal_redirect": false,
206206
"hotspot_password": "skywalker123",
207-
"roaming_mode": false,
208-
"offline_timeout": "3m30s",
209-
"user_timeout": "2m30s",
210-
"fallback_timeout": "15m"
207+
"turn_on_hotspot_if_wifi_has_no_internet": false,
208+
"offline_before_starting_hotspot_minutes": "3m30s",
209+
"user_idle_minutes": "2m30s",
210+
"retry_connection_timeout_minutes": "15m"
211211
}
212212
```
213213

@@ -228,14 +228,14 @@ It also configures timeouts to control how long `viam-agent` waits for a valid l
228228
| `hotspot_interface` | string | Optional | The interface to use for hotspot/provisioning/wifi management. Default: first discovered 802.11 device. |
229229
| `hotspot_prefix` | string | Optional | `viam-agent` will prepend this to the hostname of the device and use the resulting string for the provisioning hotspot SSID. Default: `"viam-setup"`. |
230230
| `hotspot_password` | string | Optional | The Wifi password for the provisioning hotspot. Default: `"viamsetup"`. |
231-
| `disable_dns_redirect` | boolean | Optional | By default, ALL DNS lookups using the provisioning hotspot will redirect to the device. This causes most phones/mobile devices to automatically redirect the user to the captive portal as a "sign in" screen. When disabled, only domains ending in .setup (ex: viam.setup) will be redirected. This generally avoids displaying the portal to users and is mainly used in conjunction with a mobile provisioning application workflow. Default: `false`. |
232-
| `roaming_mode` | boolean | Optional | By default, the device will only attempt to connect to a single wifi network (the one with the highest priority), provided during initial provisioning/setup using the provisioning mobile app or captive web portal. Wifi connection alone is enough to consider the device as "online" even if the global internet is not reachable. If the primary network configured during provisioning cannot be connected to and roaming mode is enabled, the device will attempt connections to all configured networks in `networks`, and only consider the device online if the internet is reachable. Default: `false`. |
233-
| `offline_timeout` | boolean | Optional | Will only enter provisioning mode (hotspot) after being disconnected longer than this time. Useful on flaky connections, or when part of a system where the device may start quickly, but the wifi/router may take longer to be available. Default: `"2m"` (2 minutes). |
234-
| `user_timeout` | boolean | Optional | Amount of time before considering a user (using the captive web portal or provisioning app) idle, and resuming normal behavior. Used to avoid interrupting provisioning mode (for example for network tests/retries) when a user might be busy entering details. Default: `"5m"` (5 minutes). |
235-
| `fallback_timeout` | boolean | Optional | Provisioning mode will exit after this time, to allow other unmanaged (for example wired) or manually configured connections to be tried. Provisioning mode will restart if the connection/online status doesn't change. Default: `"10m"` (10 minutes). |
236-
| `networks` | array | Optional | Add additional networks the machine can connect to for provisioning. We recommend that you add WiFi settings in the operating system (for example, directly in NetworkManager) rather than in this file, or in the corresponding machine config in the Viam app, if networks aren't needed until after initial provisioning. See [Networks](/manage/reference/viam-agent/#networks). Default: `[]`. |
237-
| `wifi_power_save` | boolean | Optional | If set, will explicitly enable or disable power save for all WiFi connections managed by NetworkManager. |
238-
| `device_reboot_after_offline_minutes` | integer | Optional | If set, `viam-agent` will reboot the device after it has been offline for the specified duration. Default: `0` (disabled). |
231+
| `disable_captive_portal_redirect` | boolean | Optional | By default, all DNS lookups are redirected to the "sign in" portal, which can cause mobile devices to automatically display the portal. When set to true, only DNS requests for domains ending in .setup, like `viam.setup` are redirected, preventing the portal from appearing unexpectedly, especially convenient when using a mobile app for provisioning. Default: `false`. |
232+
| `turn_on_hotspot_if_wifi_has_no_internet` | boolean | Optional | By default, the device connects to a single prioritized WiFi network (provided during provisioning) and is considered online even if the global internet is not reachable. When `turn_on_hotspot_if_wifi_has_no_internet` is true and the primary network lacks internet connectivity, the device will try all configured networks and only mark itself as online if it successfully connects to the internet. Default: `false`. |
233+
| `offline_before_starting_hotspot_minutes` | integer | Optional | Will only enter provisioning mode (hotspot) after being disconnected longer than this time. Useful on flaky connections, or when part of a system where the device may start quickly, but the wifi/router may take longer to be available. Default: `2` (2 minutes). |
234+
| `user_idle_minutes` | integer | Optional | Amount of time before considering a user (using the captive web portal or provisioning app) idle, and resuming normal behavior. Used to avoid interrupting provisioning mode (for example for network tests/retries) when a user might be busy entering details. Default: `5` (5 minutes). |
235+
| `retry_connection_timeout_minutes` | integer | Optional | Provisioning mode will exit after this time, to allow other unmanaged (for example wired) or manually configured connections to be tried. Provisioning mode will restart if the connection/online status doesn't change. Default: `10` (10 minutes). |
236+
| `networks` | array | Optional | Add additional networks the machine can connect to for provisioning. We recommend that you add WiFi settings in the operating system (for example, directly in NetworkManager) rather than in this file, or in the corresponding machine config in the Viam app, if networks aren't needed until after initial provisioning. See [Networks](/manage/reference/viam-agent/#network_configuration). Default: `[]`. |
237+
| `wifi_power_save` | boolean | Optional | Boolean, which, if set, will explicitly enable or disable power save for all WiFi connections managed by NetworkManager. If not set, the system default applies. Default: `NULL`. |
238+
| `device_reboot_after_offline_minutes` | integer | Optional | If set, `viam-agent` will reboot the device after it has been offline (and in hotspot mode) for the specified duration. Default: `0` (disabled). |
239239

240240
{{% /expand%}}
241241

@@ -251,10 +251,10 @@ If you know in advance which other networks a machine should be able to connect
251251
However, if you want to add additional networks to the provisioning configuration you can add them to the `networks` field value.
252252

253253
{{< alert title="Important" color="note" >}}
254-
You must enable `roaming_mode` in the [`agent-provisioning` configuration](/manage/fleet/provision/setup/#configure-agent-provisioning) of the machine to allow the machine to connect to the specified networks after provisioning.
254+
You must enable `turn_on_hotspot_if_wifi_has_no_internet` in the [`agent-provisioning` configuration](/manage/fleet/provision/setup/#configure-agent-provisioning) of the machine to allow the machine to connect to the specified networks after provisioning.
255255
{{< /alert >}}
256256

257-
If `roaming_mode` is enabled, `agent-provisioning` will try to connect to each specified network in order of `priority` from highest to lowest.
257+
If `turn_on_hotspot_if_wifi_has_no_internet` is enabled, `agent-provisioning` will try to connect to each specified network in order of `priority` from highest to lowest.
258258

259259
<!-- prettier-ignore -->
260260
| Name | Type | Description |
@@ -272,13 +272,13 @@ The following configuration defines the connection information and credentials f
272272
"model": "C-3PO",
273273
"fragment_id": "2567c87d-7aef-41bc-b82c-d363f9874663",
274274
"hotspot_prefix": "skywalker-setup",
275-
"disable_dns_redirect": true,
275+
"disable_captive_portal_redirect": false,
276276
"hotspot_password": "skywalker123",
277-
"roaming_mode": false,
278-
"offline_timeout": "3m30s",
279-
"user_timeout": "2m30s",
280-
"fallback_timeout": "15m",
281-
"roaming_mode": true,
277+
"turn_on_hotspot_if_wifi_has_no_internet": false,
278+
"offline_before_starting_hotspot_minutes": "3m30s",
279+
"user_idle_minutes": "2m30s",
280+
"retry_connection_timeout_minutes": "15m",
281+
"turn_on_hotspot_if_wifi_has_no_internet": true,
282282
"networks": [
283283
{
284284
"type": "wifi",
@@ -449,9 +449,9 @@ sudo ./preinstall.sh /path/to/rootfs
449449

450450
### Device not detecting networks
451451

452-
Some systems can't scan for WiFi networks while in hotspot mode, meaning they won't automatically detect networks coming online or into range until the `fallback_timeout` expires.
453-
The `fallback_timeout` causes your device to exit hotspot mode, at which point your device will be able to detect newly available networks.
454-
If your device does not connect to your network, adjust the `fallback_timeout` value in the [`agent-provisioning` configuration](/manage/fleet/provision/setup/#configure-agent-provisioning).
452+
Some systems can't scan for WiFi networks while in hotspot mode, meaning they won't automatically detect networks coming online or into range until the `retry_connection_timeout_minutes` expires.
453+
The `retry_connection_timeout_minutes` causes your device to exit hotspot mode, at which point your device will be able to detect newly available networks.
454+
If your device does not connect to your network, adjust the `retry_connection_timeout_minutes` value in the [`agent-provisioning` configuration](/manage/fleet/provision/setup/#configure-agent-provisioning).
455455

456456
### Test GRPC components of the provisioning service
457457

@@ -496,7 +496,7 @@ For a guide you can give to end users for setting up their machine, see [Setup m
496496

497497
- `agent-provisioning` will use the provided network if it can connect, even if that network does not have internet access.
498498
Note that any features that require internet access will not function if the connected WiFi network is not connected to the internet.
499-
If you want `agent-provisioning` to require that a WiFi network be connected to the internet in order to connect to it, enable roaming mode.
499+
If you want `agent-provisioning` to require that a WiFi network be connected to the internet in order to connect to it, enable `turn_on_hotspot_if_wifi_has_no_internet`.
500500

501501
1. `viam-agent` then starts `viam-server` with the provided configuration and the machine becomes **live**.
502502

@@ -536,7 +536,7 @@ For a guide you can give to end users for setting up their machine, see [Setup m
536536

537537
- `agent-provisioning` will use the provided network if it can connect, even if that network does not have internet access.
538538
Note that any features that require internet access will not function if the connected WiFi network is not connected to the internet.
539-
If you want `agent-provisioning` to require that a WiFi network be connected to the internet in order to connect to it, enable roaming mode.
539+
If you want `agent-provisioning` to require that a WiFi network be connected to the internet in order to connect to it, enable `turn_on_hotspot_if_wifi_has_no_internet`.
540540

541541
1. `viam-agent` then starts `viam-server` with the provided configuration and the machine becomes **live**.
542542

0 commit comments

Comments
 (0)