From 415894cd3bfc687436b630781fe7ec8e8ed0e4d9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20G=C3=B6ttgens?= Date: Sat, 22 Oct 2022 15:54:15 +0200 Subject: [PATCH] add config for ethernet shield --- config.proto | 49 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) diff --git a/config.proto b/config.proto index dfdd3ad..68d093f 100644 --- a/config.proto +++ b/config.proto @@ -266,6 +266,40 @@ message Config { ACCESS_POINT_HIDDEN = 2; } + enum ethMode { + /* + * obtain ip address via DHCP + */ + DHCP = 0; + + /* + * use static ip address + */ + STATIC = 1; + } + + message ethConfig { + /* + * Static IP address + */ + fixed32 ip = 1; + + /* + * Static gateway address + */ + fixed32 gateway = 2; + + /* + * Static subnet mask + */ + fixed32 subnet = 3; + + /* + * Static DNS server address + */ + fixed32 dns = 4; + } + /* * Enable WiFi (disables Bluetooth) */ @@ -292,6 +326,21 @@ message Config { * NTP server to use if WiFi is conneced, defaults to `0.pool.ntp.org` */ string ntp_server = 5; + + /* + * Enable Ethernet + */ + bool eth_enabled = 6; + + /* + * acquire an address via DHCP or assign static + */ + ethMode eth_mode = 7; + + /* + * struct to keep static address + */ + ethConfig eth_config = 8; } /*