From 7f309d6df29459e05766bda4d888097d11ad5cf8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20G=C3=B6ttgens?= Date: Tue, 18 Oct 2022 14:56:22 +0200 Subject: [PATCH 1/4] add capability to switch out the public default key for OEMs --- deviceonly.options | 4 ++-- deviceonly.proto | 5 +++++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/deviceonly.options b/deviceonly.options index 1905649..fe51ce9 100644 --- a/deviceonly.options +++ b/deviceonly.options @@ -10,5 +10,5 @@ *ChannelFile.channels max_count:8 *OEMStore.oem_text max_size:40 - -*OEMStore.oem_icon_bits max_size:2048 \ No newline at end of file +*OEMStore.oem_icon_bits max_size:2048 +*OEMStore.oem_aes_key max_size:32 diff --git a/deviceonly.proto b/deviceonly.proto index a43ac0d..8f75439 100644 --- a/deviceonly.proto +++ b/deviceonly.proto @@ -134,4 +134,9 @@ message OEMStore { * Use this font for the OEM text. */ string oem_text = 5; + + /* + * The default device encryption key, 16 or 32 byte + */ + bytes oem_aes_key = 6; } 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 2/4] 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; } /* From c099c61cc61214d7e5a7bd5eeb74a52afd4609bd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20G=C3=B6ttgens?= Date: Sat, 22 Oct 2022 15:56:39 +0200 Subject: [PATCH 3/4] make linter happy --- config.proto | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/config.proto b/config.proto index 68d093f..77cd749 100644 --- a/config.proto +++ b/config.proto @@ -278,7 +278,7 @@ message Config { STATIC = 1; } - message ethConfig { + message EthConfig { /* * Static IP address */ @@ -340,7 +340,7 @@ message Config { /* * struct to keep static address */ - ethConfig eth_config = 8; + EthConfig eth_config = 8; } /* From c188b5eb228808e042e2df70776f6048b8c34a0f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20G=C3=B6ttgens?= Date: Sat, 22 Oct 2022 16:01:23 +0200 Subject: [PATCH 4/4] Pascal Case enum too. --- config.proto | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/config.proto b/config.proto index 77cd749..b04df40 100644 --- a/config.proto +++ b/config.proto @@ -266,7 +266,7 @@ message Config { ACCESS_POINT_HIDDEN = 2; } - enum ethMode { + enum EthMode { /* * obtain ip address via DHCP */ @@ -335,7 +335,7 @@ message Config { /* * acquire an address via DHCP or assign static */ - ethMode eth_mode = 7; + EthMode eth_mode = 7; /* * struct to keep static address