2022-06-24 19:42:37 -07:00
---
2022-09-22 14:17:02 -07:00
id: network
title: Network Configuration
sidebar_label: Network
2024-03-13 15:02:55 -07:00
description: Learn about network configuration for your Meshtastic device including NTP, WiFi, and Ethernet.
2022-06-24 19:42:37 -07:00
---
2023-01-19 05:01:57 -08:00
import Tabs from "@theme/Tabs";
import TabItem from "@theme/TabItem";
2022-06-24 19:42:37 -07:00
2023-07-04 22:36:44 -07:00
The Network config options are: NTP Server, WiFi Enabled, WiFi SSID, WiFi PSK, Ethernet Enabled, IPv4 Networking Mode, and Static Address. Network config uses an admin message sending a `Config.Network` protobuf.
2022-06-24 19:42:37 -07:00
:::info
2022-11-02 11:46:54 -07:00
Enabling WiFi will disable Bluetooth. Only one connection method will work at a time.
2022-06-24 19:42:37 -07:00
:::
2022-10-30 08:33:59 -07:00
ESP32 devices have the ability to connect to WiFi as a client. SoftAP mode is not supported by the Meshtastic firmware.
2022-09-22 14:17:02 -07:00
## Network Config Values
### NTP Server
2022-09-23 10:43:46 -07:00
The NTP server used if IP networking is available.
2022-09-22 14:17:02 -07:00
2023-11-10 11:57:52 -08:00
Set to `0.pool.ntp.org` by default. (Max Length: 32)
2022-06-24 19:42:37 -07:00
2022-10-05 06:25:07 -07:00
### WiFi Enabled
2022-08-08 16:56:18 -07:00
2022-09-23 10:43:46 -07:00
Enables or Disables WiFi.
2022-09-22 14:17:02 -07:00
2022-09-23 10:43:46 -07:00
Set to `false` (Disabled) by default.
2022-08-08 16:56:18 -07:00
2022-08-02 22:29:52 -07:00
### WiFi SSID
2023-07-04 23:26:25 -07:00
This is your WiFi Network's SSID.
2022-08-02 22:29:52 -07:00
2023-11-10 11:57:52 -08:00
Empty `""` by default. (Case Sensitive, Max Length: 32)
2022-09-22 14:17:02 -07:00
2022-09-23 10:43:46 -07:00
### WiFi PSK
2022-09-22 14:17:02 -07:00
2023-07-04 23:26:25 -07:00
This is your WiFi Network's password.
2022-08-02 22:29:52 -07:00
2022-09-23 10:43:46 -07:00
Empty `""` by default. (Case Sensitive, Max Length: 64)
2022-11-09 01:50:40 -08:00
### Ethernet Enabled
Enables or Disables Ethernet.
Set to `false` (Disabled) by default.
### IPv4 Networking Mode
Set to `DHCP` by default. Change to `STATIC` to use a static IP address. Applies to both Ethernet and WiFi.
### IPv4 Static Address configuration
contains ip, gateway, subnet and dns server in case you want a static configuration.
2022-06-24 19:42:37 -07:00
:::tip
2022-11-09 01:50:40 -08:00
The first time your device restarts after enabling WiFi or Ethernet, 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.
2022-06-24 19:42:37 -07:00
:::
2022-09-22 14:17:02 -07:00
## Network Config Client Availability
2022-06-24 19:42:37 -07:00
<Tabs
groupId="settings"
2023-01-06 18:56:47 -08:00
defaultValue="cli"
2022-06-24 19:42:37 -07:00
values={[
{label: 'Android', value: 'android'},
{label: 'Apple', value: 'apple'},
2022-06-29 22:33:26 -07:00
{label: 'CLI', value: 'cli'},
2022-06-24 19:42:37 -07:00
{label: 'Web', value: 'web'},
]}>
2022-09-22 14:17:02 -07:00
2022-06-24 19:42:37 -07:00
<TabItem value="android">
2024-02-22 13:09:26 -08:00
#### Android
2022-06-24 19:42:37 -07:00
:::info
2022-12-04 13:09:37 -08:00
Network Config options are available for Android.
1. Open the Meshtastic App
2023-06-17 22:06:11 -07:00
2. Navigate to: **Vertical Ellipsis (3 dots top right) > Radio Configuration > Network**
2022-12-04 13:09:37 -08:00
2022-06-24 19:42:37 -07:00
:::
</TabItem>
2022-09-22 14:17:02 -07:00
2022-06-24 19:42:37 -07:00
<TabItem value="apple">
2024-02-22 13:09:26 -08:00
#### Apple
2022-06-24 19:42:37 -07:00
:::info
2024-03-07 13:12:16 -08:00
All Network config options are available on iOS, iPadOS and macOS at Settings > Device Configuration > Network.
2023-07-05 07:18:25 -07:00
2022-06-24 19:42:37 -07:00
:::
</TabItem>
2022-09-22 14:17:02 -07:00
2022-06-24 19:42:37 -07:00
<TabItem value="cli">
2024-02-22 13:09:26 -08:00
#### CLI
2023-01-06 18:56:47 -08:00
:::info
2022-09-22 14:17:02 -07:00
All Network config options are available in the python CLI.
2022-06-24 19:42:37 -07:00
2023-01-06 18:56:47 -08:00
:::
2023-01-19 05:01:57 -08:00
| Setting | Acceptable Values | Default |
| :------------------: | :---------------: | :--------------: |
| network.ntp_server | string | `0.pool.ntp.org` |
| network.wifi_enabled | `true`, `false` | `false` |
| network.wifi_ssid | string | `""` |
2023-07-04 23:26:25 -07:00
| network.wifi_psk | string | `""` |
| network.eth_enabled | `true`, `false` | `false` |
| network.address_mode | `DHCP`, `STATIC` | `DHCP` |
2022-09-22 14:17:02 -07:00
2023-01-06 18:56:47 -08:00
:::tip
Because the device will reboot after each command is sent via CLI, it is recommended when setting multiple values in a config section that commands be chained together as one.
```shell title="Example:"
meshtastic --set network.wifi_enabled true --set network.wifi_ssid "my network" --set network.wifi_psk mypassword
```
:::
2022-09-22 14:17:02 -07:00
```shell title="Set NTP Server"
meshtastic --set network.ntp_server "0.pool.ntp.org"
```
2022-06-24 19:42:37 -07:00
2022-08-08 16:56:18 -07:00
```shell title="Enable / Disable WiFi"
2022-09-22 14:17:02 -07:00
meshtastic --set network.wifi_enabled true
meshtastic --set network.wifi_enabled false
2022-06-24 19:42:37 -07:00
```
2022-06-25 19:18:02 -07:00
```shell title="Set WiFi SSID"
2022-06-24 19:42:37 -07:00
2022-09-22 14:17:02 -07:00
meshtastic --set network.wifi_ssid mynetwork
2022-06-25 19:18:02 -07:00
// With spaces
2022-09-22 14:17:02 -07:00
meshtastic --set network.wifi_ssid "my network"
2022-06-24 19:42:37 -07:00
```
```shell title="Set WiFi password"
2022-09-22 14:17:02 -07:00
meshtastic --set network.wifi_psk mypassword
2022-06-25 19:18:02 -07:00
// With spaces
2022-09-22 14:17:02 -07:00
meshtastic --set network.wifi_psk "my password"
2022-06-24 19:42:37 -07:00
```
</TabItem>
2022-09-22 14:17:02 -07:00
<TabItem value="web">
2022-06-24 19:42:37 -07:00
2024-02-22 13:09:26 -08:00
#### Web
2022-06-24 19:42:37 -07:00
:::info
2022-09-22 14:17:02 -07:00
All Network config options are available in the Web UI.
2022-06-24 19:42:37 -07:00
:::
2023-01-19 05:01:57 -08:00
2022-09-22 14:17:02 -07:00
</TabItem>
2022-06-24 19:42:37 -07:00
</Tabs>
2022-08-02 22:29:52 -07:00
## Examples
2022-06-24 19:42:37 -07:00
### WiFi Client
2024-02-25 05:13:58 -08:00
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 and it is a 2.4GHz-only network. 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.
2022-06-24 19:42:37 -07:00
### Disable WiFi
2023-01-19 05:01:57 -08:00
To disable WiFi completely, set `network.wifi_enabled` to `false`.