From 60a4df9c2d2dd7877006fb30e8a189be71fe2d5d Mon Sep 17 00:00:00 2001 From: sh123 Date: Thu, 21 Oct 2021 13:09:08 +0300 Subject: [PATCH] Add options to enable kiss over tcp/ip and AP mode --- config.h | 2 ++ esp32_loraprs.ino | 4 +++- loraprs_config.h | 4 +++- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/config.h b/config.h index 1a9d7d8..0244ae8 100644 --- a/config.h +++ b/config.h @@ -43,6 +43,7 @@ #define CFG_APRS_FILTER "r/35.60/139.80/25" #define CFG_APRS_RAW_BKN "NOCALL-10>APZMDM,WIDE1-1:!0000.00N/00000.00E#LoRA 433.775MHz/BW125/SF12/CR7/0x34" +#define CFG_WIFI_ENABLE_AP false #define CFG_WIFI_SSID "" #define CFG_WIFI_KEY "" @@ -55,6 +56,7 @@ #define CFG_IS_TO_RF false #define CFG_BEACON false #define CFG_KISS_EXTENSIONS false +#define CFG_KISS_TCP_IP false #define CFG_PTT_ENABLE false #define CFG_PTT_PIN 12 diff --git a/esp32_loraprs.ino b/esp32_loraprs.ino index 5d3e726..c6c45be 100644 --- a/esp32_loraprs.ino +++ b/esp32_loraprs.ino @@ -59,6 +59,7 @@ void initializeConfig(LoraPrs::Config &cfg) { cfg.BtEnableBle = CFG_BT_USE_BLE; // server mode wifi paramaters + cfg.WifiEnableAp = CFG_WIFI_ENABLE_AP; cfg.WifiSsid = CFG_WIFI_SSID; cfg.WifiKey = CFG_WIFI_KEY; @@ -73,7 +74,8 @@ void initializeConfig(LoraPrs::Config &cfg) { cfg.EnableIsToRf = CFG_IS_TO_RF; // send data from aprsis to rf cfg.EnableRepeater = CFG_DIGIREPEAT; // digirepeat incoming packets cfg.EnableBeacon = CFG_BEACON; // enable periodic AprsRawBeacon beacon to rf and aprsis if rf to aprsis is enabled - cfg.EnableKissExtensions = CFG_KISS_EXTENSIONS; // radio control and signal reports + cfg.KissEnableExtensions = CFG_KISS_EXTENSIONS; // radio control and signal reports + cfg.KissEnableTcpIp = CFG_KISS_TCP_IP; // enable KISS ovr TCP/IP as a server // external ptt control cfg.PttEnable = CFG_PTT_ENABLE; diff --git a/loraprs_config.h b/loraprs_config.h index 11e7bdd..061fea0 100644 --- a/loraprs_config.h +++ b/loraprs_config.h @@ -31,11 +31,13 @@ struct Config bool BtEnableBle; // bluetooth device presents as BLE rather than serial bluetooth e.g. for iOS devices // wifi + bool WifiEnableAp; // true to run as access point String WifiSsid; // wifi access point name String WifiKey; // wifi access point key // kiss - bool EnableKissExtensions; // true - enable kiss extensions for radio control and signal reports + bool KissEnableTcpIp; // true to enable KISS over TCP/IP as a server + bool KissEnableExtensions; // true - enable kiss extensions for radio control and signal reports // aprsis connectivity int AprsPort; // aprs server port, 14580