meshtastic/docs/mesh/device/config/network.mdx
2022-11-02 14:46:54 -04:00

153 lines
3.6 KiB
Plaintext

---
id: network
title: Network Configuration
slug: /settings/config/network
sidebar_label: Network
---
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
The Network config options are: WiFi Enabled, WiFi SSID, WiFi PSK, and NTP Server. Network config uses an admin message sending a `Config.Network` protobuf.
:::info
Enabling WiFi will disable Bluetooth. Only one connection method will work at a time.
:::
ESP32 devices have the ability to connect to WiFi as a client. SoftAP mode is not supported by the Meshtastic firmware.
## Network Config Values
### NTP Server
The NTP server used if IP networking is available.
Set to `0.pool.ntp.org` by default. (Max Length: 33)
### WiFi Enabled
Enables or Disables WiFi.
Set to `false` (Disabled) by default.
### WiFi SSID
This is your WiFi Networks SSID.
Empty `""` by default. (Case Sensitive, Max Length: 33)
### WiFi PSK
This is your WiFi Networks password.
Empty `""` by default. (Case Sensitive, Max Length: 64)
:::tip
The first time your device restarts after enabling WiFi, it will take an additional 20-30 seconds to boot. This is to generate self-signed SSL keys. The keys will be saved for future reuse.
:::
## Network Config Client Availability
<Tabs
groupId="settings"
defaultValue="flasher"
values={[
{label: 'Android', value: 'android'},
{label: 'Apple', value: 'apple'},
{label: 'CLI', value: 'cli'},
{label: 'Flasher', value: 'flasher'},
{label: 'Web', value: 'web'},
]}>
<TabItem value="android">
:::info
Network config is not available for Android.
:::
</TabItem>
<TabItem value="apple">
:::info
Network config is not available on Apple OS's.
:::
</TabItem>
<TabItem value="cli">
All Network config options are available in the python CLI.
| Setting | Acceptable Values | Default |
| :-----------: | :---------------: | :-----: |
| network.ntp_server | string | `0.pool.ntp.org` |
| network.wifi_enabled | `true`, `false` | `false` |
| network.wifi_psk | string | `""` |
| network.wifi_ssid | string | `""` |
```shell title="Set NTP Server"
meshtastic --set network.ntp_server "0.pool.ntp.org"
```
```shell title="Enable / Disable WiFi"
meshtastic --set network.wifi_enabled true
meshtastic --set network.wifi_enabled false
```
```shell title="Set WiFi SSID"
meshtastic --set network.wifi_ssid mynetwork
// With spaces
meshtastic --set network.wifi_ssid "my network"
```
```shell title="Set WiFi password"
meshtastic --set network.wifi_psk mypassword
// With spaces
meshtastic --set network.wifi_psk "my password"
```
</TabItem>
<TabItem value="flasher">
:::info
All Network config options are available in the Flasher.
:::
</TabItem>
<TabItem value="web">
:::info
All Network config options are available in the Web UI.
:::
</TabItem>
</Tabs>
## Examples
### WiFi Client
With `network.wifi_ssid` & `network.wifi_psk` populated, the device will know to connect to your network. Make sure you are in range of your WiFi. If you have a single Meshtastic device on your local network it's easy to connect to your device with DNS `http://meshtastic.local`. If you have multiple Meshtastic devices you will need to connect using their respective IP addresses.
If you have a screen attached to your device, the final page will display something similar to the following:
```
WiFi: Software AP (Admin)
IP: 192.168.42.1 (0/4)
SSID: myNetwork
http://meshtastic.local
* * * * *
```
You should then be able to connect to the node using either the displayed IP address or the HTTP link.
### Disable WiFi
To disable WiFi completely, set `network.wifi_enabled` to `false`.