From fc79db45944959ee3246f6f808db18e4debab72b Mon Sep 17 00:00:00 2001 From: geeksville Date: Sun, 21 Jun 2020 14:11:09 -0700 Subject: [PATCH] add support for wifi connections from nodes --- mesh.options | 3 +++ mesh.proto | 11 +++++++++-- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/mesh.options b/mesh.options index ab5875c..ccc4cb7 100644 --- a/mesh.options +++ b/mesh.options @@ -19,6 +19,9 @@ # note: this payload length is ONLY the bytes that are sent inside of the radiohead packet *Data.payload max_size:240 +*UserPreferences.wifi_ssid max_size:33 +*UserPreferences.wifi_password max_size:64 + # 256 bit or 128 bit psk key *ChannelSettings.psk max_size:32 *ChannelSettings.name max_size:12 diff --git a/mesh.proto b/mesh.proto index 9edfa97..e51b4cf 100644 --- a/mesh.proto +++ b/mesh.proto @@ -414,13 +414,20 @@ message RadioConfig { uint32 ls_secs = 10; uint32 min_wake_secs = 11; + /** If set, this node will try to join the specified wifi network and acquire an address via DHCP */ + string wifi_ssid = 12; + /** If set, will be use to authenticate to the named wifi */ + string wifi_password = 13; + /** If set, the node will operate as an AP (and DHCP server), otherwise it will be a station */ + bool wifi_ap_mode = 14; + // If true, radio should not try to be smart about what packets to queue to // the phone - bool keep_all_packets = 100; + //bool keep_all_packets = 100; // If true, we will try to capture all the packets sent on the mesh, not // just the ones destined to our node. - bool promiscuous_mode = 101; + //bool promiscuous_mode = 101; /** For testing it is useful sometimes to force a node to never listen to