From fc16d9342116235fa86cf6ac163b17125bb4b50e Mon Sep 17 00:00:00 2001 From: Ben Meadors Date: Fri, 6 Dec 2024 20:01:47 -0600 Subject: [PATCH 01/18] Add heltec capsule back --- lib/device-ui | 1 + .../heltec_capsule_sensor_v3/platformio.ini | 10 ++++ variants/heltec_capsule_sensor_v3/variant.h | 53 +++++++++++++++++++ 3 files changed, 64 insertions(+) create mode 160000 lib/device-ui create mode 100644 variants/heltec_capsule_sensor_v3/platformio.ini create mode 100644 variants/heltec_capsule_sensor_v3/variant.h diff --git a/lib/device-ui b/lib/device-ui new file mode 160000 index 000000000..6b760f537 --- /dev/null +++ b/lib/device-ui @@ -0,0 +1 @@ +Subproject commit 6b760f5373b91de1d8234922a446f7232d5247d0 diff --git a/variants/heltec_capsule_sensor_v3/platformio.ini b/variants/heltec_capsule_sensor_v3/platformio.ini new file mode 100644 index 000000000..b5ffb65c2 --- /dev/null +++ b/variants/heltec_capsule_sensor_v3/platformio.ini @@ -0,0 +1,10 @@ +[env:heltec_capsule_sensor_v3] +extends = esp32s3_base +board = heltec_wifi_lora_32_V3 +board_check = true + +build_flags = + ${esp32s3_base.build_flags} -I variants/heltec_capsule_sensor_v3 + -D HELTEC_CAPSULE_SENSOR_V3 + -D GPS_POWER_TOGGLE ; comment this line to disable triple press function on the user button to turn off gps entirely. + ;-D DEBUG_DISABLED ; uncomment this line to disable DEBUG output \ No newline at end of file diff --git a/variants/heltec_capsule_sensor_v3/variant.h b/variants/heltec_capsule_sensor_v3/variant.h new file mode 100644 index 000000000..415de0559 --- /dev/null +++ b/variants/heltec_capsule_sensor_v3/variant.h @@ -0,0 +1,53 @@ +#define LED_PIN 33 +#define LED_PIN2 34 +#define EXT_PWR_DETECT 35 + +#define BUTTON_PIN 18 + +#define BATTERY_PIN 7 // A battery voltage measurement pin, voltage divider connected here to measure battery voltage +#define ADC_CHANNEL ADC1_GPIO7_CHANNEL +#define ADC_ATTENUATION ADC_ATTEN_DB_2_5 // lower dB for high resistance voltage divider +#define ADC_MULTIPLIER (4.9 * 1.045) +#define ADC_CTRL 36 // active HIGH, powers the voltage divider. Only on 1.1 +#define ADC_CTRL_ENABLED HIGH + +#undef GPS_RX_PIN +#undef GPS_TX_PIN +#define GPS_RX_PIN 5 +#define GPS_TX_PIN 4 +#define PIN_GPS_RESET 3 +#define GPS_RESET_MODE LOW +#define PIN_GPS_PPS 1 +#define PIN_GPS_EN 21 +#define GPS_EN_ACTIVE HIGH + +#define USE_SX1262 +#define LORA_DIO0 -1 // a No connect on the SX1262 module +#define LORA_RESET 12 +#define LORA_DIO1 14 // SX1262 IRQ +#define LORA_DIO2 13 // SX1262 BUSY +#define LORA_DIO3 // Not connected on PCB, but internally on the TTGO SX1262, if DIO3 is high the TXCO is enabled + +#define LORA_SCK 9 +#define LORA_MISO 11 +#define LORA_MOSI 10 +#define LORA_CS 8 + +#define SX126X_CS LORA_CS +#define SX126X_DIO1 LORA_DIO1 +#define SX126X_BUSY LORA_DIO2 +#define SX126X_RESET LORA_RESET + +#define SX126X_DIO2_AS_RF_SWITCH +#define SX126X_DIO3_TCXO_VOLTAGE 1.8 + +#define I2C_SDA 1 +#define I2C_SCL 2 +#define HAS_SCREEN 0 +#define SENSOR_POWER_CTRL_PIN 21 +#define SENSOR_POWER_ON 1 + +#define PERIPHERAL_WARMUP_MS 100 +#define SENSOR_GPS_CONFLICT + +#define ESP32S3_WAKE_TYPE ESP_EXT1_WAKEUP_ANY_HIGH \ No newline at end of file From 39b5fb041e2423ed5b4d4d67b51be2feeb2a7e4b Mon Sep 17 00:00:00 2001 From: Ben Meadors Date: Sat, 7 Dec 2024 05:29:13 -0600 Subject: [PATCH 02/18] Revert "Add heltec capsule back" This reverts commit fc16d9342116235fa86cf6ac163b17125bb4b50e. --- lib/device-ui | 1 - .../heltec_capsule_sensor_v3/platformio.ini | 10 ---- variants/heltec_capsule_sensor_v3/variant.h | 53 ------------------- 3 files changed, 64 deletions(-) delete mode 160000 lib/device-ui delete mode 100644 variants/heltec_capsule_sensor_v3/platformio.ini delete mode 100644 variants/heltec_capsule_sensor_v3/variant.h diff --git a/lib/device-ui b/lib/device-ui deleted file mode 160000 index 6b760f537..000000000 --- a/lib/device-ui +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 6b760f5373b91de1d8234922a446f7232d5247d0 diff --git a/variants/heltec_capsule_sensor_v3/platformio.ini b/variants/heltec_capsule_sensor_v3/platformio.ini deleted file mode 100644 index b5ffb65c2..000000000 --- a/variants/heltec_capsule_sensor_v3/platformio.ini +++ /dev/null @@ -1,10 +0,0 @@ -[env:heltec_capsule_sensor_v3] -extends = esp32s3_base -board = heltec_wifi_lora_32_V3 -board_check = true - -build_flags = - ${esp32s3_base.build_flags} -I variants/heltec_capsule_sensor_v3 - -D HELTEC_CAPSULE_SENSOR_V3 - -D GPS_POWER_TOGGLE ; comment this line to disable triple press function on the user button to turn off gps entirely. - ;-D DEBUG_DISABLED ; uncomment this line to disable DEBUG output \ No newline at end of file diff --git a/variants/heltec_capsule_sensor_v3/variant.h b/variants/heltec_capsule_sensor_v3/variant.h deleted file mode 100644 index 415de0559..000000000 --- a/variants/heltec_capsule_sensor_v3/variant.h +++ /dev/null @@ -1,53 +0,0 @@ -#define LED_PIN 33 -#define LED_PIN2 34 -#define EXT_PWR_DETECT 35 - -#define BUTTON_PIN 18 - -#define BATTERY_PIN 7 // A battery voltage measurement pin, voltage divider connected here to measure battery voltage -#define ADC_CHANNEL ADC1_GPIO7_CHANNEL -#define ADC_ATTENUATION ADC_ATTEN_DB_2_5 // lower dB for high resistance voltage divider -#define ADC_MULTIPLIER (4.9 * 1.045) -#define ADC_CTRL 36 // active HIGH, powers the voltage divider. Only on 1.1 -#define ADC_CTRL_ENABLED HIGH - -#undef GPS_RX_PIN -#undef GPS_TX_PIN -#define GPS_RX_PIN 5 -#define GPS_TX_PIN 4 -#define PIN_GPS_RESET 3 -#define GPS_RESET_MODE LOW -#define PIN_GPS_PPS 1 -#define PIN_GPS_EN 21 -#define GPS_EN_ACTIVE HIGH - -#define USE_SX1262 -#define LORA_DIO0 -1 // a No connect on the SX1262 module -#define LORA_RESET 12 -#define LORA_DIO1 14 // SX1262 IRQ -#define LORA_DIO2 13 // SX1262 BUSY -#define LORA_DIO3 // Not connected on PCB, but internally on the TTGO SX1262, if DIO3 is high the TXCO is enabled - -#define LORA_SCK 9 -#define LORA_MISO 11 -#define LORA_MOSI 10 -#define LORA_CS 8 - -#define SX126X_CS LORA_CS -#define SX126X_DIO1 LORA_DIO1 -#define SX126X_BUSY LORA_DIO2 -#define SX126X_RESET LORA_RESET - -#define SX126X_DIO2_AS_RF_SWITCH -#define SX126X_DIO3_TCXO_VOLTAGE 1.8 - -#define I2C_SDA 1 -#define I2C_SCL 2 -#define HAS_SCREEN 0 -#define SENSOR_POWER_CTRL_PIN 21 -#define SENSOR_POWER_ON 1 - -#define PERIPHERAL_WARMUP_MS 100 -#define SENSOR_GPS_CONFLICT - -#define ESP32S3_WAKE_TYPE ESP_EXT1_WAKEUP_ANY_HIGH \ No newline at end of file From 46eab20a9025d22d97b84eeb9ad96f7e5170e43c Mon Sep 17 00:00:00 2001 From: Ben Meadors Date: Sat, 7 Dec 2024 05:30:59 -0600 Subject: [PATCH 03/18] Lets try this again minus device ui --- .../heltec_capsule_sensor_v3/platformio.ini | 10 ++++ variants/heltec_capsule_sensor_v3/variant.h | 53 +++++++++++++++++++ 2 files changed, 63 insertions(+) create mode 100644 variants/heltec_capsule_sensor_v3/platformio.ini create mode 100644 variants/heltec_capsule_sensor_v3/variant.h diff --git a/variants/heltec_capsule_sensor_v3/platformio.ini b/variants/heltec_capsule_sensor_v3/platformio.ini new file mode 100644 index 000000000..b5ffb65c2 --- /dev/null +++ b/variants/heltec_capsule_sensor_v3/platformio.ini @@ -0,0 +1,10 @@ +[env:heltec_capsule_sensor_v3] +extends = esp32s3_base +board = heltec_wifi_lora_32_V3 +board_check = true + +build_flags = + ${esp32s3_base.build_flags} -I variants/heltec_capsule_sensor_v3 + -D HELTEC_CAPSULE_SENSOR_V3 + -D GPS_POWER_TOGGLE ; comment this line to disable triple press function on the user button to turn off gps entirely. + ;-D DEBUG_DISABLED ; uncomment this line to disable DEBUG output \ No newline at end of file diff --git a/variants/heltec_capsule_sensor_v3/variant.h b/variants/heltec_capsule_sensor_v3/variant.h new file mode 100644 index 000000000..415de0559 --- /dev/null +++ b/variants/heltec_capsule_sensor_v3/variant.h @@ -0,0 +1,53 @@ +#define LED_PIN 33 +#define LED_PIN2 34 +#define EXT_PWR_DETECT 35 + +#define BUTTON_PIN 18 + +#define BATTERY_PIN 7 // A battery voltage measurement pin, voltage divider connected here to measure battery voltage +#define ADC_CHANNEL ADC1_GPIO7_CHANNEL +#define ADC_ATTENUATION ADC_ATTEN_DB_2_5 // lower dB for high resistance voltage divider +#define ADC_MULTIPLIER (4.9 * 1.045) +#define ADC_CTRL 36 // active HIGH, powers the voltage divider. Only on 1.1 +#define ADC_CTRL_ENABLED HIGH + +#undef GPS_RX_PIN +#undef GPS_TX_PIN +#define GPS_RX_PIN 5 +#define GPS_TX_PIN 4 +#define PIN_GPS_RESET 3 +#define GPS_RESET_MODE LOW +#define PIN_GPS_PPS 1 +#define PIN_GPS_EN 21 +#define GPS_EN_ACTIVE HIGH + +#define USE_SX1262 +#define LORA_DIO0 -1 // a No connect on the SX1262 module +#define LORA_RESET 12 +#define LORA_DIO1 14 // SX1262 IRQ +#define LORA_DIO2 13 // SX1262 BUSY +#define LORA_DIO3 // Not connected on PCB, but internally on the TTGO SX1262, if DIO3 is high the TXCO is enabled + +#define LORA_SCK 9 +#define LORA_MISO 11 +#define LORA_MOSI 10 +#define LORA_CS 8 + +#define SX126X_CS LORA_CS +#define SX126X_DIO1 LORA_DIO1 +#define SX126X_BUSY LORA_DIO2 +#define SX126X_RESET LORA_RESET + +#define SX126X_DIO2_AS_RF_SWITCH +#define SX126X_DIO3_TCXO_VOLTAGE 1.8 + +#define I2C_SDA 1 +#define I2C_SCL 2 +#define HAS_SCREEN 0 +#define SENSOR_POWER_CTRL_PIN 21 +#define SENSOR_POWER_ON 1 + +#define PERIPHERAL_WARMUP_MS 100 +#define SENSOR_GPS_CONFLICT + +#define ESP32S3_WAKE_TYPE ESP_EXT1_WAKEUP_ANY_HIGH \ No newline at end of file From b99e57a6fa3ade8cc75c080cfaadb0ad221290ba Mon Sep 17 00:00:00 2001 From: Ben Meadors Date: Sat, 7 Dec 2024 07:03:58 -0600 Subject: [PATCH 04/18] Add popular nrf52 pro micro to the builds (#5523) --- variants/diy/platformio.ini | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/variants/diy/platformio.ini b/variants/diy/platformio.ini index 00ff88da2..b60d46996 100644 --- a/variants/diy/platformio.ini +++ b/variants/diy/platformio.ini @@ -61,7 +61,6 @@ debug_tool = jlink [env:nrf52_promicro_diy_tcxo] extends = nrf52840_base board = promicro-nrf52840 -board_level = extra build_flags = ${nrf52840_base.build_flags} -I variants/diy/nrf52_promicro_diy_tcxo -D NRF52_PROMICRO_DIY @@ -157,4 +156,4 @@ build_src_filter = ${esp32_base.build_src_filter} lib_deps = ${esp32_base.lib_deps} lovyan03/LovyanGFX@^1.1.16 earlephilhower/ESP8266Audio@^1.9.7 - earlephilhower/ESP8266SAM@^1.0.1 + earlephilhower/ESP8266SAM@^1.0.1 \ No newline at end of file From 4a34bf648f40e2e70f92000598dff32f8e78cfdf Mon Sep 17 00:00:00 2001 From: Jonathan Bennett Date: Sat, 7 Dec 2024 10:29:49 -0600 Subject: [PATCH 05/18] Add MACAddress to config.yaml (#5506) * Add MACAddress to config.yaml * Better error handling on native, including failing to launch with blank MAC Address and real hardware. * Re-arrange Mac Address handling and add MACAddressSource * Bump portduino to remove macaddr function there --------- Co-authored-by: Ben Meadors --- arch/portduino/portduino.ini | 2 +- bin/config-dist.yaml | 4 +- src/platform/portduino/PortduinoGlue.cpp | 126 +++++++++++++++++++++-- src/platform/portduino/PortduinoGlue.h | 5 +- 4 files changed, 124 insertions(+), 13 deletions(-) diff --git a/arch/portduino/portduino.ini b/arch/portduino/portduino.ini index 04fd6db09..946a1489b 100644 --- a/arch/portduino/portduino.ini +++ b/arch/portduino/portduino.ini @@ -1,6 +1,6 @@ ; The Portduino based sim environment on top of any host OS, all hardware will be simulated [portduino_base] -platform = https://github.com/meshtastic/platform-native.git#bcd02436cfca91f7d28ad0f7dab977c6aaa781af +platform = https://github.com/meshtastic/platform-native.git#7fcee253a928535ff8b142704035b4b982f7e2d2 framework = arduino build_src_filter = diff --git a/bin/config-dist.yaml b/bin/config-dist.yaml index 77680cc63..cb25b36e7 100644 --- a/bin/config-dist.yaml +++ b/bin/config-dist.yaml @@ -160,4 +160,6 @@ Webserver: General: MaxNodes: 200 MaxMessageQueue: 100 - ConfigDirectory: /etc/meshtasticd/config.d/ \ No newline at end of file + ConfigDirectory: /etc/meshtasticd/config.d/ +# MACAddress: AA:BB:CC:DD:EE:FF +# MACAddressSource: eth0 \ No newline at end of file diff --git a/src/platform/portduino/PortduinoGlue.cpp b/src/platform/portduino/PortduinoGlue.cpp index 2aa6c9054..b6a017d9f 100644 --- a/src/platform/portduino/PortduinoGlue.cpp +++ b/src/platform/portduino/PortduinoGlue.cpp @@ -5,22 +5,27 @@ #include "sleep.h" #include "target_specific.h" -#include -#include - #include "PortduinoGlue.h" #include "api/ServerAPI.h" #include "linux/gpio/LinuxGPIOPin.h" +#include "meshUtils.h" #include "yaml-cpp/yaml.h" +#include +#include +#include +#include #include +#include #include #include +#include #include std::map settingsMap; std::map settingsStrings; std::ofstream traceFile; char *configPath = nullptr; +char *optionMac = nullptr; // FIXME - move setBluetoothEnable into a HALPlatform class void setBluetoothEnable(bool enable) @@ -49,6 +54,10 @@ static error_t parse_opt(int key, char *arg, struct argp_state *state) case 'c': configPath = arg; break; + case 'h': + optionMac = arg; + break; + case ARGP_KEY_ARG: return 0; default: @@ -61,6 +70,7 @@ void portduinoCustomInit() { static struct argp_option options[] = {{"port", 'p', "PORT", 0, "The TCP port to use."}, {"config", 'c', "CONFIG_PATH", 0, "Full path of the .yaml config file to use."}, + {"hwid", 'h', "HWID", 0, "The mac address to assign to this virtual machine"}, {0}}; static void *childArguments; static char doc[] = "Meshtastic native build."; @@ -70,6 +80,51 @@ void portduinoCustomInit() portduinoAddArguments(child, childArguments); } +void getMacAddr(uint8_t *dmac) +{ + // We should store this value, and short-circuit all this if it's already been set. + if (optionMac != nullptr && strlen(optionMac) > 0) { + if (strlen(optionMac) >= 12) { + MAC_from_string(optionMac, dmac); + std::cout << optionMac << std::endl; + } else { + uint32_t hwId = sscanf(optionMac, "%u", &hwId); + dmac[0] = 0x80; + dmac[1] = 0; + dmac[2] = hwId >> 24; + dmac[3] = hwId >> 16; + dmac[4] = hwId >> 8; + dmac[5] = hwId & 0xff; + } + } else if (settingsStrings[mac_address].length() > 11) { + MAC_from_string(settingsStrings[mac_address], dmac); + std::cout << settingsStrings[mac_address] << std::endl; + exit; + } else { + + struct hci_dev_info di; + di.dev_id = 0; + bdaddr_t bdaddr; + char addr[18]; + int btsock; + btsock = socket(AF_BLUETOOTH, SOCK_RAW, 1); + if (btsock < 0) { // If anything fails, just return with the default value + return; + } + + if (ioctl(btsock, HCIGETDEVINFO, (void *)&di)) { + return; + } + + dmac[0] = di.bdaddr.b[5]; + dmac[1] = di.bdaddr.b[4]; + dmac[2] = di.bdaddr.b[3]; + dmac[3] = di.bdaddr.b[2]; + dmac[4] = di.bdaddr.b[1]; + dmac[5] = di.bdaddr.b[0]; + } +} + /** apps run under portduino can optionally define a portduinoSetup() to * use portduino specific init code (such as gpioBind) to setup portduino on their host machine, * before running 'arduino' code. @@ -114,10 +169,20 @@ void portduinoSetup() std::cout << "Unable to use " << configPath << " as config file" << std::endl; exit(EXIT_FAILURE); } - } else if (access("config.yaml", R_OK) == 0 && loadConfig("config.yaml")) { - std::cout << "Using local config.yaml as config file" << std::endl; - } else if (access("/etc/meshtasticd/config.yaml", R_OK) == 0 && loadConfig("/etc/meshtasticd/config.yaml")) { - std::cout << "Using /etc/meshtasticd/config.yaml as config file" << std::endl; + } else if (access("config.yaml", R_OK) == 0) { + if (loadConfig("config.yaml")) { + std::cout << "Using local config.yaml as config file" << std::endl; + } else { + std::cout << "Unable to use local config.yaml as config file" << std::endl; + exit(EXIT_FAILURE); + } + } else if (access("/etc/meshtasticd/config.yaml", R_OK) == 0) { + if (loadConfig("/etc/meshtasticd/config.yaml")) { + std::cout << "Using /etc/meshtasticd/config.yaml as config file" << std::endl; + } else { + std::cout << "Unable to use /etc/meshtasticd/config.yaml as config file" << std::endl; + exit(EXIT_FAILURE); + } } else { std::cout << "No 'config.yaml' found, running simulated." << std::endl; settingsMap[maxnodes] = 200; // Default to 200 nodes @@ -138,6 +203,14 @@ void portduinoSetup() } } + uint8_t dmac[6]; + getMacAddr(dmac); + if (dmac[0] == 0 && dmac[1] == 0 && dmac[2] == 0 && dmac[3] == 0 && dmac[4] == 0 && dmac[5] == 0) { + std::cout << "*** Blank MAC Address not allowed!" << std::endl; + std::cout << "Please set a MAC Address in config.yaml using either MACAddress or MACAddressSource." << std::endl; + exit(EXIT_FAILURE); + } + printBytes("MAC Address: ", dmac, 6); // Rather important to set this, if not running simulated. randomSeed(time(NULL)); @@ -410,10 +483,27 @@ bool loadConfig(const char *configPath) settingsStrings[webserverrootpath] = (yamlConfig["Webserver"]["RootPath"]).as(""); } - settingsMap[maxnodes] = (yamlConfig["General"]["MaxNodes"]).as(200); - settingsMap[maxtophone] = (yamlConfig["General"]["MaxMessageQueue"]).as(100); - settingsStrings[config_directory] = (yamlConfig["General"]["ConfigDirectory"]).as(""); + if (yamlConfig["General"]) { + settingsMap[maxnodes] = (yamlConfig["General"]["MaxNodes"]).as(200); + settingsMap[maxtophone] = (yamlConfig["General"]["MaxMessageQueue"]).as(100); + settingsStrings[config_directory] = (yamlConfig["General"]["ConfigDirectory"]).as(""); + if ((yamlConfig["General"]["MACAddress"]).as("") != "" && + (yamlConfig["General"]["MACAddressSource"]).as("") != "") { + std::cout << "Cannot set both MACAddress and MACAddressSource!" << std::endl; + exit(EXIT_FAILURE); + } + settingsStrings[mac_address] = (yamlConfig["General"]["MACAddress"]).as(""); + if ((yamlConfig["General"]["MACAddressSource"]).as("") != "") { + std::ifstream infile("/sys/class/net/" + (yamlConfig["General"]["MACAddressSource"]).as("") + + "/address"); + std::getline(infile, settingsStrings[mac_address]); + } + // https://stackoverflow.com/a/20326454 + settingsStrings[mac_address].erase( + std::remove(settingsStrings[mac_address].begin(), settingsStrings[mac_address].end(), ':'), + settingsStrings[mac_address].end()); + } } catch (YAML::Exception &e) { std::cout << "*** Exception " << e.what() << std::endl; return false; @@ -426,3 +516,19 @@ static bool ends_with(std::string_view str, std::string_view suffix) { return str.size() >= suffix.size() && str.compare(str.size() - suffix.size(), suffix.size(), suffix) == 0; } + +bool MAC_from_string(std::string mac_str, uint8_t *dmac) +{ + mac_str.erase(std::remove(mac_str.begin(), mac_str.end(), ':'), mac_str.end()); + if (mac_str.length() == 12) { + dmac[0] = std::stoi(settingsStrings[mac_address].substr(0, 2), nullptr, 16); + dmac[1] = std::stoi(settingsStrings[mac_address].substr(2, 2), nullptr, 16); + dmac[2] = std::stoi(settingsStrings[mac_address].substr(4, 2), nullptr, 16); + dmac[3] = std::stoi(settingsStrings[mac_address].substr(6, 2), nullptr, 16); + dmac[4] = std::stoi(settingsStrings[mac_address].substr(8, 2), nullptr, 16); + dmac[5] = std::stoi(settingsStrings[mac_address].substr(10, 2), nullptr, 16); + return true; + } else { + return false; + } +} \ No newline at end of file diff --git a/src/platform/portduino/PortduinoGlue.h b/src/platform/portduino/PortduinoGlue.h index 1e0223c48..01541eeed 100644 --- a/src/platform/portduino/PortduinoGlue.h +++ b/src/platform/portduino/PortduinoGlue.h @@ -59,7 +59,8 @@ enum configNames { maxtophone, maxnodes, ascii_logs, - config_directory + config_directory, + mac_address }; enum { no_screen, x11, st7789, st7735, st7735s, st7796, ili9341, ili9342, ili9488, hx8357d }; enum { no_touchscreen, xpt2046, stmpe610, gt911, ft5x06 }; @@ -71,3 +72,5 @@ extern std::ofstream traceFile; int initGPIOPin(int pinNum, std::string gpioChipname); bool loadConfig(const char *configPath); static bool ends_with(std::string_view str, std::string_view suffix); +void getMacAddr(uint8_t *dmac); +bool MAC_from_string(std::string mac_str, uint8_t *dmac); \ No newline at end of file From 59ed5c90491ced8c88d348a25456224fc3116dde Mon Sep 17 00:00:00 2001 From: Matthias Granberry Date: Sat, 7 Dec 2024 14:32:49 -0600 Subject: [PATCH 06/18] Configure Seeed Xiao S3 RX enable pin (#5517) --- variants/seeed_xiao_s3/variant.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/variants/seeed_xiao_s3/variant.h b/variants/seeed_xiao_s3/variant.h index f854ba38a..8f9282a7a 100644 --- a/variants/seeed_xiao_s3/variant.h +++ b/variants/seeed_xiao_s3/variant.h @@ -80,5 +80,7 @@ L76K GPS Module Information : https://www.seeedstudio.com/L76K-GNSS-Module-for-S // DIO2 controlls an antenna switch and the TCXO voltage is controlled by DIO3 #define SX126X_DIO2_AS_RF_SWITCH +#define SX126X_RXEN 38 +#define SX126X_TXEN RADIOLIB_NC #define SX126X_DIO3_TCXO_VOLTAGE 1.8 #endif From f81d3b045dd1b7e3ca7870af3da915ff4399ea98 Mon Sep 17 00:00:00 2001 From: Mark Trevor Birss Date: Sun, 8 Dec 2024 12:06:45 +0200 Subject: [PATCH 07/18] Create OpenWRT_One_mikroBUS_sx1262.yaml (#5529) --- bin/config.d/OpenWRT_One_mikroBUS_sx1262.yaml | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 bin/config.d/OpenWRT_One_mikroBUS_sx1262.yaml diff --git a/bin/config.d/OpenWRT_One_mikroBUS_sx1262.yaml b/bin/config.d/OpenWRT_One_mikroBUS_sx1262.yaml new file mode 100644 index 000000000..f31411a51 --- /dev/null +++ b/bin/config.d/OpenWRT_One_mikroBUS_sx1262.yaml @@ -0,0 +1,8 @@ +Lora: + Module: sx1262 + IRQ: 10 + Busy: 12 + Reset: 2 + spidev: spidev2.0 + DIO2_AS_RF_SWITCH: true + DIO3_TCXO_VOLTAGE: true From 3ae85e2c829427b3a6a64506afa9b6ecdf3ad081 Mon Sep 17 00:00:00 2001 From: Andrew Yong Date: Mon, 9 Dec 2024 19:38:51 +0800 Subject: [PATCH 08/18] tlora_v2_1_16: Unset BUTTON_PIN and BUTTON_NEED_PULLUP (#5535) Unset BUTTON_PIN and BUTTON_NEED_PULLUP as the board ships without a user button. Devices and users expecting a button on GPIO12 have to set [GPIO for user button](https://meshtastic.org/docs/configuration/radio/device/#gpio-for-user-button) to 12 (or any GPIO pin the momentary switch was connected to) to restore functionality. Signed-off-by: Andrew Yong --- variants/tlora_v2_1_16/variant.h | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/variants/tlora_v2_1_16/variant.h b/variants/tlora_v2_1_16/variant.h index 8bb5ce3b1..48c069ab7 100644 --- a/variants/tlora_v2_1_16/variant.h +++ b/variants/tlora_v2_1_16/variant.h @@ -8,10 +8,7 @@ #define I2C_SDA 21 // I2C pins for this board #define I2C_SCL 22 -#define LED_PIN 25 // If defined we will blink this LED -#define BUTTON_PIN 12 // If defined, this will be used for user button presses, - -#define BUTTON_NEED_PULLUP +#define LED_PIN 25 // If defined we will blink this LED #define USE_RF95 #define LORA_DIO0 26 // a No connect on the SX1262 module From f3850ee73b686a4bb2f5675a73283e9e42ef391d Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 9 Dec 2024 06:50:30 -0600 Subject: [PATCH 09/18] [create-pull-request] automated change (#5530) Co-authored-by: thebentern <9000580+thebentern@users.noreply.github.com> --- version.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/version.properties b/version.properties index 9d03516e4..addcab501 100644 --- a/version.properties +++ b/version.properties @@ -1,4 +1,4 @@ [VERSION] major = 2 minor = 5 -build = 16 +build = 17 From d0e3427ec742223df6338c70b00fcc745bdfc53d Mon Sep 17 00:00:00 2001 From: jake-b <1012393+jake-b@users.noreply.github.com> Date: Mon, 9 Dec 2024 20:46:13 -0500 Subject: [PATCH 10/18] Fix detection for some RadSens hardware versions (#5542) Co-authored-by: Jake-B --- src/detect/ScanI2CTwoWire.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/detect/ScanI2CTwoWire.cpp b/src/detect/ScanI2CTwoWire.cpp index d29e5be8e..551b87d27 100644 --- a/src/detect/ScanI2CTwoWire.cpp +++ b/src/detect/ScanI2CTwoWire.cpp @@ -425,11 +425,14 @@ void ScanI2CTwoWire::scanPort(I2CPort port, uint8_t *address, uint8_t asize) case CGRADSENS_ADDR: // Register 0x00 of the RadSens sensor contains is product identifier 0x7D + // Undocumented, but some devices return a product identifier of 0x7A registerValue = getRegisterValue(ScanI2CTwoWire::RegisterLocation(addr, 0x00), 1); - if (registerValue == 0x7D) { + if (registerValue == 0x7D || registerValue == 0x7A) { type = CGRADSENS; logFoundDevice("ClimateGuard RadSens", (uint8_t)addr.address); break; + } else { + LOG_DEBUG("Unexpected Device ID for RadSense: addr=0x%x id=0x%x", CGRADSENS_ADDR, registerValue); } break; From 0e3dae4fec297b459da157872961fef506b808d0 Mon Sep 17 00:00:00 2001 From: Jonathan Bennett Date: Mon, 9 Dec 2024 21:51:55 -0600 Subject: [PATCH 11/18] Initialize dmac array to nulls (#5538) * Initialize dmac array to nulls * Use std::cout for print before console is init. --- src/platform/portduino/PortduinoGlue.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/platform/portduino/PortduinoGlue.cpp b/src/platform/portduino/PortduinoGlue.cpp index b6a017d9f..50b5c5b7b 100644 --- a/src/platform/portduino/PortduinoGlue.cpp +++ b/src/platform/portduino/PortduinoGlue.cpp @@ -86,7 +86,6 @@ void getMacAddr(uint8_t *dmac) if (optionMac != nullptr && strlen(optionMac) > 0) { if (strlen(optionMac) >= 12) { MAC_from_string(optionMac, dmac); - std::cout << optionMac << std::endl; } else { uint32_t hwId = sscanf(optionMac, "%u", &hwId); dmac[0] = 0x80; @@ -98,7 +97,6 @@ void getMacAddr(uint8_t *dmac) } } else if (settingsStrings[mac_address].length() > 11) { MAC_from_string(settingsStrings[mac_address], dmac); - std::cout << settingsStrings[mac_address] << std::endl; exit; } else { @@ -203,14 +201,14 @@ void portduinoSetup() } } - uint8_t dmac[6]; + uint8_t dmac[6] = {0}; getMacAddr(dmac); if (dmac[0] == 0 && dmac[1] == 0 && dmac[2] == 0 && dmac[3] == 0 && dmac[4] == 0 && dmac[5] == 0) { std::cout << "*** Blank MAC Address not allowed!" << std::endl; std::cout << "Please set a MAC Address in config.yaml using either MACAddress or MACAddressSource." << std::endl; exit(EXIT_FAILURE); } - printBytes("MAC Address: ", dmac, 6); + std::cout << "MAC Address: " << std::hex << +dmac[0] << +dmac[1] << +dmac[2] << +dmac[3] << +dmac[4] << +dmac[5] << std::endl; // Rather important to set this, if not running simulated. randomSeed(time(NULL)); @@ -531,4 +529,4 @@ bool MAC_from_string(std::string mac_str, uint8_t *dmac) } else { return false; } -} \ No newline at end of file +} From 438f627e9b856e20f0b537c5133f8cea5c4e795f Mon Sep 17 00:00:00 2001 From: Mark Trevor Birss Date: Tue, 10 Dec 2024 09:46:50 +0200 Subject: [PATCH 12/18] Update OpenWRT_One_mikroBUS_sx1262.yaml (#5544) --- bin/config.d/OpenWRT_One_mikroBUS_sx1262.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/config.d/OpenWRT_One_mikroBUS_sx1262.yaml b/bin/config.d/OpenWRT_One_mikroBUS_sx1262.yaml index f31411a51..6dc1e870d 100644 --- a/bin/config.d/OpenWRT_One_mikroBUS_sx1262.yaml +++ b/bin/config.d/OpenWRT_One_mikroBUS_sx1262.yaml @@ -2,7 +2,7 @@ Lora: Module: sx1262 IRQ: 10 Busy: 12 - Reset: 2 +# Reset: 2 spidev: spidev2.0 DIO2_AS_RF_SWITCH: true DIO3_TCXO_VOLTAGE: true From cf46e675caf241994c0cf030848bcb2ac561d767 Mon Sep 17 00:00:00 2001 From: Austin Date: Tue, 10 Dec 2024 10:14:52 -0500 Subject: [PATCH 13/18] Add portduino-buildroot variant (#5540) * Add portduino-buildroot variant * Update platform-native for platform-buildroot --- arch/portduino/portduino.ini | 4 ++-- variants/portduino-buildroot/platformio.ini | 10 ++++++++++ variants/portduino-buildroot/variant.h | 5 +++++ 3 files changed, 17 insertions(+), 2 deletions(-) create mode 100644 variants/portduino-buildroot/platformio.ini create mode 100644 variants/portduino-buildroot/variant.h diff --git a/arch/portduino/portduino.ini b/arch/portduino/portduino.ini index 946a1489b..bbafef4da 100644 --- a/arch/portduino/portduino.ini +++ b/arch/portduino/portduino.ini @@ -1,6 +1,6 @@ -; The Portduino based sim environment on top of any host OS, all hardware will be simulated +; The Portduino based 'native' environment. Currently supported on Linux targets with real LoRa hardware (or simulated). [portduino_base] -platform = https://github.com/meshtastic/platform-native.git#7fcee253a928535ff8b142704035b4b982f7e2d2 +platform = https://github.com/meshtastic/platform-native.git#73bd1a21183ca8b00c4ea58bb21315df31a50dff framework = arduino build_src_filter = diff --git a/variants/portduino-buildroot/platformio.ini b/variants/portduino-buildroot/platformio.ini new file mode 100644 index 000000000..8ef183ef3 --- /dev/null +++ b/variants/portduino-buildroot/platformio.ini @@ -0,0 +1,10 @@ +[env:buildroot] +extends = portduino_base +; The pkg-config commands below optionally add link flags. +; the || : is just a "or run the null command" to avoid returning an error code +build_flags = ${portduino_base.build_flags} -O0 -I variants/portduino-buildroot + !pkg-config --libs libulfius --silence-errors || : + !pkg-config --libs openssl --silence-errors || : +board = buildroot +lib_deps = ${portduino_base.lib_deps} +build_src_filter = ${portduino_base.build_src_filter} diff --git a/variants/portduino-buildroot/variant.h b/variants/portduino-buildroot/variant.h new file mode 100644 index 000000000..b7b39d6e8 --- /dev/null +++ b/variants/portduino-buildroot/variant.h @@ -0,0 +1,5 @@ +#define HAS_SCREEN 1 +#define CANNED_MESSAGE_MODULE_ENABLE 1 +#define HAS_GPS 1 +#define MAX_RX_TOPHONE settingsMap[maxtophone] +#define MAX_NUM_NODES settingsMap[maxnodes] \ No newline at end of file From 761a99d2411093f8902d23e513c13ffc429b49e2 Mon Sep 17 00:00:00 2001 From: Austin Date: Tue, 10 Dec 2024 11:09:54 -0500 Subject: [PATCH 14/18] portduino-buildroot: Define c standard (#5547) --- variants/portduino-buildroot/platformio.ini | 1 + 1 file changed, 1 insertion(+) diff --git a/variants/portduino-buildroot/platformio.ini b/variants/portduino-buildroot/platformio.ini index 8ef183ef3..3c8f21537 100644 --- a/variants/portduino-buildroot/platformio.ini +++ b/variants/portduino-buildroot/platformio.ini @@ -3,6 +3,7 @@ extends = portduino_base ; The pkg-config commands below optionally add link flags. ; the || : is just a "or run the null command" to avoid returning an error code build_flags = ${portduino_base.build_flags} -O0 -I variants/portduino-buildroot + -std=c++17 !pkg-config --libs libulfius --silence-errors || : !pkg-config --libs openssl --silence-errors || : board = buildroot From cabeb40c303fb8fc4da2b477c75c7d7a2b9201b9 Mon Sep 17 00:00:00 2001 From: Austin Date: Tue, 10 Dec 2024 14:58:16 -0500 Subject: [PATCH 15/18] Portduino: Move meshtasticd/web out of /usr/share/doc/ (#5548) --- .github/workflows/package_amd64.yml | 17 +++++++++++------ .github/workflows/package_raspbian.yml | 17 +++++++++++------ .github/workflows/package_raspbian_armv7l.yml | 17 +++++++++++------ bin/config-dist.yaml | 2 +- 4 files changed, 34 insertions(+), 19 deletions(-) diff --git a/.github/workflows/package_amd64.yml b/.github/workflows/package_amd64.yml index ce2c85d54..aec3bca30 100644 --- a/.github/workflows/package_amd64.yml +++ b/.github/workflows/package_amd64.yml @@ -47,18 +47,18 @@ jobs: - name: build .debpkg run: | mkdir -p .debpkg/DEBIAN - mkdir -p .debpkg/usr/share/doc/meshtasticd/web + mkdir -p .debpkg/usr/share/meshtasticd/web mkdir -p .debpkg/usr/sbin mkdir -p .debpkg/etc/meshtasticd mkdir -p .debpkg/etc/meshtasticd/config.d mkdir -p .debpkg/etc/meshtasticd/available.d mkdir -p .debpkg/usr/lib/systemd/system/ - tar -xf build.tar -C .debpkg/usr/share/doc/meshtasticd/web + tar -xf build.tar -C .debpkg/usr/share/meshtasticd/web shopt -s dotglob nullglob - if [ -d .debpkg/usr/share/doc/meshtasticd/web/build ]; then mv .debpkg/usr/share/doc/meshtasticd/web/build/* .debpkg/usr/share/doc/meshtasticd/web/; fi - if [ -d .debpkg/usr/share/doc/meshtasticd/web/build ]; then rmdir .debpkg/usr/share/doc/meshtasticd/web/build; fi - if [ -d .debpkg/usr/share/doc/meshtasticd/web/.DS_Store ]; then rm -f .debpkg/usr/share/doc/meshtasticd/web/.DS_Store; fi - gunzip .debpkg/usr/share/doc/meshtasticd/web/ -r + if [ -d .debpkg/usr/share/meshtasticd/web/build ]; then mv .debpkg/usr/share/meshtasticd/web/build/* .debpkg/usr/share/meshtasticd/web/; fi + if [ -d .debpkg/usr/share/meshtasticd/web/build ]; then rmdir .debpkg/usr/share/meshtasticd/web/build; fi + if [ -d .debpkg/usr/share/meshtasticd/web/.DS_Store ]; then rm -f .debpkg/usr/share/meshtasticd/web/.DS_Store; fi + gunzip .debpkg/usr/share/meshtasticd/web/ -r cp release/meshtasticd_linux_x86_64 .debpkg/usr/sbin/meshtasticd cp bin/config-dist.yaml .debpkg/etc/meshtasticd/config.yaml cp bin/config.d/* .debpkg/etc/meshtasticd/available.d/ -r @@ -66,6 +66,11 @@ jobs: cp bin/meshtasticd.service .debpkg/usr/lib/systemd/system/meshtasticd.service echo "/etc/meshtasticd/config.yaml" > .debpkg/DEBIAN/conffiles chmod +x .debpkg/DEBIAN/conffiles + # Transition /usr/share/doc/meshtasticd to /usr/share/meshtasticd + echo "rm -rf /usr/share/doc/meshtasticd" > .debpkg/DEBIAN/preinst + chmod +x .debpkg/DEBIAN/preinst + echo "/usr/share/meshtasticd /usr/share/doc/meshtasticd" > .debpkg/DEBIAN/meshtasticd.links + chmod +x .debpkg/DEBIAN/meshtasticd.links - uses: jiro4989/build-deb-action@v3 with: diff --git a/.github/workflows/package_raspbian.yml b/.github/workflows/package_raspbian.yml index 46039b6ea..b0a4a40d7 100644 --- a/.github/workflows/package_raspbian.yml +++ b/.github/workflows/package_raspbian.yml @@ -47,18 +47,18 @@ jobs: - name: build .debpkg run: | mkdir -p .debpkg/DEBIAN - mkdir -p .debpkg/usr/share/doc/meshtasticd/web + mkdir -p .debpkg/usr/share/meshtasticd/web mkdir -p .debpkg/usr/sbin mkdir -p .debpkg/etc/meshtasticd mkdir -p .debpkg/etc/meshtasticd/config.d mkdir -p .debpkg/etc/meshtasticd/available.d mkdir -p .debpkg/usr/lib/systemd/system/ - tar -xf build.tar -C .debpkg/usr/share/doc/meshtasticd/web + tar -xf build.tar -C .debpkg/usr/share/meshtasticd/web shopt -s dotglob nullglob - if [ -d .debpkg/usr/share/doc/meshtasticd/web/build ]; then mv .debpkg/usr/share/doc/meshtasticd/web/build/* .debpkg/usr/share/doc/meshtasticd/web/; fi - if [ -d .debpkg/usr/share/doc/meshtasticd/web/build ]; then rmdir .debpkg/usr/share/doc/meshtasticd/web/build; fi - if [ -d .debpkg/usr/share/doc/meshtasticd/web/.DS_Store ]; then rm -f .debpkg/usr/share/doc/meshtasticd/web/.DS_Store; fi - gunzip .debpkg/usr/share/doc/meshtasticd/web/ -r + if [ -d .debpkg/usr/share/meshtasticd/web/build ]; then mv .debpkg/usr/share/meshtasticd/web/build/* .debpkg/usr/share/meshtasticd/web/; fi + if [ -d .debpkg/usr/share/meshtasticd/web/build ]; then rmdir .debpkg/usr/share/meshtasticd/web/build; fi + if [ -d .debpkg/usr/share/meshtasticd/web/.DS_Store ]; then rm -f .debpkg/usr/share/meshtasticd/web/.DS_Store; fi + gunzip .debpkg/usr/share/meshtasticd/web/ -r cp release/meshtasticd_linux_aarch64 .debpkg/usr/sbin/meshtasticd cp bin/config-dist.yaml .debpkg/etc/meshtasticd/config.yaml cp bin/config.d/* .debpkg/etc/meshtasticd/available.d/ -r @@ -66,6 +66,11 @@ jobs: cp bin/meshtasticd.service .debpkg/usr/lib/systemd/system/meshtasticd.service echo "/etc/meshtasticd/config.yaml" > .debpkg/DEBIAN/conffiles chmod +x .debpkg/DEBIAN/conffiles + # Transition /usr/share/doc/meshtasticd to /usr/share/meshtasticd + echo "rm -rf /usr/share/doc/meshtasticd" > .debpkg/DEBIAN/preinst + chmod +x .debpkg/DEBIAN/preinst + echo "/usr/share/meshtasticd /usr/share/doc/meshtasticd" > .debpkg/DEBIAN/meshtasticd.links + chmod +x .debpkg/DEBIAN/meshtasticd.links - uses: jiro4989/build-deb-action@v3 with: diff --git a/.github/workflows/package_raspbian_armv7l.yml b/.github/workflows/package_raspbian_armv7l.yml index 2eda103ca..d66b46dc2 100644 --- a/.github/workflows/package_raspbian_armv7l.yml +++ b/.github/workflows/package_raspbian_armv7l.yml @@ -47,18 +47,18 @@ jobs: - name: build .debpkg run: | mkdir -p .debpkg/DEBIAN - mkdir -p .debpkg/usr/share/doc/meshtasticd/web + mkdir -p .debpkg/usr/share/meshtasticd/web mkdir -p .debpkg/usr/sbin mkdir -p .debpkg/etc/meshtasticd mkdir -p .debpkg/etc/meshtasticd/config.d mkdir -p .debpkg/etc/meshtasticd/available.d mkdir -p .debpkg/usr/lib/systemd/system/ - tar -xf build.tar -C .debpkg/usr/share/doc/meshtasticd/web + tar -xf build.tar -C .debpkg/usr/share/meshtasticd/web shopt -s dotglob nullglob - if [ -d .debpkg/usr/share/doc/meshtasticd/web/build ]; then mv .debpkg/usr/share/doc/meshtasticd/web/build/* .debpkg/usr/share/doc/meshtasticd/web/; fi - if [ -d .debpkg/usr/share/doc/meshtasticd/web/build ]; then rmdir .debpkg/usr/share/doc/meshtasticd/web/build; fi - if [ -d .debpkg/usr/share/doc/meshtasticd/web/.DS_Store ]; then rm -f .debpkg/usr/share/doc/meshtasticd/web/.DS_Store; fi - gunzip .debpkg/usr/share/doc/meshtasticd/web/ -r + if [ -d .debpkg/usr/share/meshtasticd/web/build ]; then mv .debpkg/usr/share/meshtasticd/web/build/* .debpkg/usr/share/meshtasticd/web/; fi + if [ -d .debpkg/usr/share/meshtasticd/web/build ]; then rmdir .debpkg/usr/share/meshtasticd/web/build; fi + if [ -d .debpkg/usr/share/meshtasticd/web/.DS_Store ]; then rm -f .debpkg/usr/share/meshtasticd/web/.DS_Store; fi + gunzip .debpkg/usr/share/meshtasticd/web/ -r cp release/meshtasticd_linux_armv7l .debpkg/usr/sbin/meshtasticd cp bin/config-dist.yaml .debpkg/etc/meshtasticd/config.yaml cp bin/config.d/* .debpkg/etc/meshtasticd/available.d/ -r @@ -66,6 +66,11 @@ jobs: cp bin/meshtasticd.service .debpkg/usr/lib/systemd/system/meshtasticd.service echo "/etc/meshtasticd/config.yaml" > .debpkg/DEBIAN/conffiles chmod +x .debpkg/DEBIAN/conffiles + # Transition /usr/share/doc/meshtasticd to /usr/share/meshtasticd + echo "rm -rf /usr/share/doc/meshtasticd" > .debpkg/DEBIAN/preinst + chmod +x .debpkg/DEBIAN/preinst + echo "/usr/share/meshtasticd /usr/share/doc/meshtasticd" > .debpkg/DEBIAN/meshtasticd.links + chmod +x .debpkg/DEBIAN/meshtasticd.links - uses: jiro4989/build-deb-action@v3 with: diff --git a/bin/config-dist.yaml b/bin/config-dist.yaml index cb25b36e7..ec262536f 100644 --- a/bin/config-dist.yaml +++ b/bin/config-dist.yaml @@ -155,7 +155,7 @@ Logging: Webserver: # Port: 443 # Port for Webserver & Webservices -# RootPath: /usr/share/doc/meshtasticd/web # Root Dir of WebServer +# RootPath: /usr/share/meshtasticd/web # Root Dir of WebServer General: MaxNodes: 200 From 7dd362950111fbf6ca134b678ec1975d3b6eb1fd Mon Sep 17 00:00:00 2001 From: Austin Date: Tue, 10 Dec 2024 16:02:38 -0500 Subject: [PATCH 16/18] Portduino: fix transitional symlinks (#5550) --- .github/workflows/package_amd64.yml | 4 ++-- .github/workflows/package_raspbian.yml | 4 ++-- .github/workflows/package_raspbian_armv7l.yml | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/package_amd64.yml b/.github/workflows/package_amd64.yml index aec3bca30..782ef479b 100644 --- a/.github/workflows/package_amd64.yml +++ b/.github/workflows/package_amd64.yml @@ -69,8 +69,8 @@ jobs: # Transition /usr/share/doc/meshtasticd to /usr/share/meshtasticd echo "rm -rf /usr/share/doc/meshtasticd" > .debpkg/DEBIAN/preinst chmod +x .debpkg/DEBIAN/preinst - echo "/usr/share/meshtasticd /usr/share/doc/meshtasticd" > .debpkg/DEBIAN/meshtasticd.links - chmod +x .debpkg/DEBIAN/meshtasticd.links + echo "ln -sf /usr/share/meshtasticd /usr/share/doc/meshtasticd" > .debpkg/DEBIAN/postinst + chmod +x .debpkg/DEBIAN/postinst - uses: jiro4989/build-deb-action@v3 with: diff --git a/.github/workflows/package_raspbian.yml b/.github/workflows/package_raspbian.yml index b0a4a40d7..aef8905f8 100644 --- a/.github/workflows/package_raspbian.yml +++ b/.github/workflows/package_raspbian.yml @@ -69,8 +69,8 @@ jobs: # Transition /usr/share/doc/meshtasticd to /usr/share/meshtasticd echo "rm -rf /usr/share/doc/meshtasticd" > .debpkg/DEBIAN/preinst chmod +x .debpkg/DEBIAN/preinst - echo "/usr/share/meshtasticd /usr/share/doc/meshtasticd" > .debpkg/DEBIAN/meshtasticd.links - chmod +x .debpkg/DEBIAN/meshtasticd.links + echo "ln -sf /usr/share/meshtasticd /usr/share/doc/meshtasticd" > .debpkg/DEBIAN/postinst + chmod +x .debpkg/DEBIAN/postinst - uses: jiro4989/build-deb-action@v3 with: diff --git a/.github/workflows/package_raspbian_armv7l.yml b/.github/workflows/package_raspbian_armv7l.yml index d66b46dc2..ddb84d4a7 100644 --- a/.github/workflows/package_raspbian_armv7l.yml +++ b/.github/workflows/package_raspbian_armv7l.yml @@ -69,8 +69,8 @@ jobs: # Transition /usr/share/doc/meshtasticd to /usr/share/meshtasticd echo "rm -rf /usr/share/doc/meshtasticd" > .debpkg/DEBIAN/preinst chmod +x .debpkg/DEBIAN/preinst - echo "/usr/share/meshtasticd /usr/share/doc/meshtasticd" > .debpkg/DEBIAN/meshtasticd.links - chmod +x .debpkg/DEBIAN/meshtasticd.links + echo "ln -sf /usr/share/meshtasticd /usr/share/doc/meshtasticd" > .debpkg/DEBIAN/postinst + chmod +x .debpkg/DEBIAN/postinst - uses: jiro4989/build-deb-action@v3 with: From 1790407078c4648f5fd15a7e6938e3b2b405cb32 Mon Sep 17 00:00:00 2001 From: Tom Fifield Date: Fri, 13 Dec 2024 02:58:19 +1100 Subject: [PATCH 17/18] Windows Support - Trunk and Platformio (#5397) (#5518) * Add support for GPG * Add usb device support * Add trunk.io to devcontainer * Trunk things * trunk fmt * formatting * fix trivy/DS002, checkov/CKV_DOCKER_3 * hide docker extension popup * fix trivy/DS026, checkov/CKV_DOCKER_2 Co-authored-by: Kalle Lilja <15094562+ThatKalle@users.noreply.github.com> --- .devcontainer/99-platformio-udev.rules | 183 +++++++++++++++++++++++++ .devcontainer/Dockerfile | 17 ++- .devcontainer/devcontainer.json | 13 +- 3 files changed, 210 insertions(+), 3 deletions(-) create mode 100644 .devcontainer/99-platformio-udev.rules diff --git a/.devcontainer/99-platformio-udev.rules b/.devcontainer/99-platformio-udev.rules new file mode 100644 index 000000000..83c7b8731 --- /dev/null +++ b/.devcontainer/99-platformio-udev.rules @@ -0,0 +1,183 @@ +# Copyright (c) 2014-present PlatformIO +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +##################################################################################### +# +# INSTALLATION +# +# Please visit > https://docs.platformio.org/en/latest/core/installation/udev-rules.html +# +##################################################################################### + +# +# Boards +# + +# CP210X USB UART +ATTRS{idVendor}=="10c4", ATTRS{idProduct}=="ea[67][013]", MODE:="0666", ENV{ID_MM_DEVICE_IGNORE}="1", ENV{ID_MM_PORT_IGNORE}="1" +ATTRS{idVendor}=="10c4", ATTRS{idProduct}=="80a9", MODE:="0666", ENV{ID_MM_DEVICE_IGNORE}="1", ENV{ID_MM_PORT_IGNORE}="1" + +# FT231XS USB UART +ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6015", MODE:="0666", ENV{ID_MM_DEVICE_IGNORE}="1", ENV{ID_MM_PORT_IGNORE}="1" + +# Prolific Technology, Inc. PL2303 Serial Port +ATTRS{idVendor}=="067b", ATTRS{idProduct}=="2303", MODE:="0666", ENV{ID_MM_DEVICE_IGNORE}="1", ENV{ID_MM_PORT_IGNORE}="1" + +# QinHeng Electronics HL-340 USB-Serial adapter +ATTRS{idVendor}=="1a86", ATTRS{idProduct}=="7523", MODE:="0666", ENV{ID_MM_DEVICE_IGNORE}="1", ENV{ID_MM_PORT_IGNORE}="1" +# QinHeng Electronics CH343 USB-Serial adapter +ATTRS{idVendor}=="1a86", ATTRS{idProduct}=="55d3", MODE:="0666", ENV{ID_MM_DEVICE_IGNORE}="1", ENV{ID_MM_PORT_IGNORE}="1" +# QinHeng Electronics CH9102 USB-Serial adapter +ATTRS{idVendor}=="1a86", ATTRS{idProduct}=="55d4", MODE:="0666", ENV{ID_MM_DEVICE_IGNORE}="1", ENV{ID_MM_PORT_IGNORE}="1" + +# Arduino boards +ATTRS{idVendor}=="2341", ATTRS{idProduct}=="[08][023]*", MODE:="0666", ENV{ID_MM_DEVICE_IGNORE}="1", ENV{ID_MM_PORT_IGNORE}="1" +ATTRS{idVendor}=="2a03", ATTRS{idProduct}=="[08][02]*", MODE:="0666", ENV{ID_MM_DEVICE_IGNORE}="1", ENV{ID_MM_PORT_IGNORE}="1" + +# Arduino SAM-BA +ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="6124", MODE:="0666", ENV{ID_MM_DEVICE_IGNORE}="1", ENV{MTP_NO_PROBE}="1" + +# Digistump boards +ATTRS{idVendor}=="16d0", ATTRS{idProduct}=="0753", MODE:="0666", ENV{ID_MM_DEVICE_IGNORE}="1", ENV{ID_MM_PORT_IGNORE}="1" + +# Maple with DFU +ATTRS{idVendor}=="1eaf", ATTRS{idProduct}=="000[34]", MODE:="0666", ENV{ID_MM_DEVICE_IGNORE}="1", ENV{ID_MM_PORT_IGNORE}="1" + +# USBtiny +ATTRS{idProduct}=="0c9f", ATTRS{idVendor}=="1781", MODE:="0666", ENV{ID_MM_DEVICE_IGNORE}="1", ENV{ID_MM_PORT_IGNORE}="1" + +# USBasp V2.0 +ATTRS{idVendor}=="16c0", ATTRS{idProduct}=="05dc", MODE:="0666", ENV{ID_MM_DEVICE_IGNORE}="1", ENV{ID_MM_PORT_IGNORE}="1" + +# Teensy boards +ATTRS{idVendor}=="16c0", ATTRS{idProduct}=="04[789B]?", ENV{ID_MM_DEVICE_IGNORE}="1", ENV{ID_MM_PORT_IGNORE}="1" +ATTRS{idVendor}=="16c0", ATTRS{idProduct}=="04[789A]?", ENV{MTP_NO_PROBE}="1" +SUBSYSTEMS=="usb", ATTRS{idVendor}=="16c0", ATTRS{idProduct}=="04[789ABCD]?", MODE:="0666" +KERNEL=="ttyACM*", ATTRS{idVendor}=="16c0", ATTRS{idProduct}=="04[789B]?", MODE:="0666" + +# TI Stellaris Launchpad +ATTRS{idVendor}=="1cbe", ATTRS{idProduct}=="00fd", MODE="0666", ENV{ID_MM_DEVICE_IGNORE}="1", ENV{ID_MM_PORT_IGNORE}="1" + +# TI MSP430 Launchpad +ATTRS{idVendor}=="0451", ATTRS{idProduct}=="f432", MODE="0666", ENV{ID_MM_DEVICE_IGNORE}="1", ENV{ID_MM_PORT_IGNORE}="1" + +# GD32V DFU Bootloader +ATTRS{idVendor}=="28e9", ATTRS{idProduct}=="0189", MODE="0666", ENV{ID_MM_DEVICE_IGNORE}="1", ENV{ID_MM_PORT_IGNORE}="1" + +# FireBeetle-ESP32 +ATTRS{idVendor}=="1a86", ATTRS{idProduct}=="7522", MODE="0666", ENV{ID_MM_DEVICE_IGNORE}="1", ENV{ID_MM_PORT_IGNORE}="1" + +# Wio Terminal +ATTRS{idVendor}=="2886", ATTRS{idProduct}=="[08]02d", MODE="0666", ENV{ID_MM_DEVICE_IGNORE}="1", ENV{ID_MM_PORT_IGNORE}="1" + +# Raspberry Pi Pico +ATTRS{idVendor}=="2e8a", ATTRS{idProduct}=="[01]*", MODE:="0666", ENV{ID_MM_DEVICE_IGNORE}="1", ENV{ID_MM_PORT_IGNORE}="1" + +# AIR32F103 +ATTRS{idVendor}=="0d28", ATTRS{idProduct}=="0204", MODE="0666", ENV{ID_MM_DEVICE_IGNORE}="1", ENV{ID_MM_PORT_IGNORE}="1" + +# STM32 virtual COM port +ATTRS{idVendor}=="0483", ATTRS{idProduct}=="5740", MODE="0666", ENV{ID_MM_DEVICE_IGNORE}="1", ENV{ID_MM_PORT_IGNORE}="1" + +# +# Debuggers +# + +# Black Magic Probe +SUBSYSTEM=="tty", ATTRS{interface}=="Black Magic GDB Server", MODE="0666", ENV{ID_MM_DEVICE_IGNORE}="1", ENV{ID_MM_PORT_IGNORE}="1" +SUBSYSTEM=="tty", ATTRS{interface}=="Black Magic UART Port", MODE="0666", ENV{ID_MM_DEVICE_IGNORE}="1", ENV{ID_MM_PORT_IGNORE}="1" + +# opendous and estick +ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="204f", MODE="0666", ENV{ID_MM_DEVICE_IGNORE}="1", ENV{ID_MM_PORT_IGNORE}="1" + +# Original FT232/FT245/FT2232/FT232H/FT4232 +ATTRS{idVendor}=="0403", ATTRS{idProduct}=="60[01][104]", MODE="0666", ENV{ID_MM_DEVICE_IGNORE}="1", ENV{ID_MM_PORT_IGNORE}="1" + +# DISTORTEC JTAG-lock-pick Tiny 2 +ATTRS{idVendor}=="0403", ATTRS{idProduct}=="8220", MODE="0666", ENV{ID_MM_DEVICE_IGNORE}="1", ENV{ID_MM_PORT_IGNORE}="1" + +# TUMPA, TUMPA Lite +ATTRS{idVendor}=="0403", ATTRS{idProduct}=="8a9[89]", MODE="0666", ENV{ID_MM_DEVICE_IGNORE}="1", ENV{ID_MM_PORT_IGNORE}="1" + +# XDS100v2 +ATTRS{idVendor}=="0403", ATTRS{idProduct}=="a6d0", MODE="0666", ENV{ID_MM_DEVICE_IGNORE}="1", ENV{ID_MM_PORT_IGNORE}="1" + +# Xverve Signalyzer Tool (DT-USB-ST), Signalyzer LITE (DT-USB-SLITE) +ATTRS{idVendor}=="0403", ATTRS{idProduct}=="bca[01]", MODE="0666", ENV{ID_MM_DEVICE_IGNORE}="1", ENV{ID_MM_PORT_IGNORE}="1" + +# TI/Luminary Stellaris Evaluation Board FTDI (several) +ATTRS{idVendor}=="0403", ATTRS{idProduct}=="bcd[9a]", MODE="0666", ENV{ID_MM_DEVICE_IGNORE}="1", ENV{ID_MM_PORT_IGNORE}="1" + +# egnite Turtelizer 2 +ATTRS{idVendor}=="0403", ATTRS{idProduct}=="bdc8", MODE="0666", ENV{ID_MM_DEVICE_IGNORE}="1", ENV{ID_MM_PORT_IGNORE}="1" + +# Section5 ICEbear +ATTRS{idVendor}=="0403", ATTRS{idProduct}=="c14[01]", MODE="0666", ENV{ID_MM_DEVICE_IGNORE}="1", ENV{ID_MM_PORT_IGNORE}="1" + +# Amontec JTAGkey and JTAGkey-tiny +ATTRS{idVendor}=="0403", ATTRS{idProduct}=="cff8", MODE="0666", ENV{ID_MM_DEVICE_IGNORE}="1", ENV{ID_MM_PORT_IGNORE}="1" + +# TI ICDI +ATTRS{idVendor}=="0451", ATTRS{idProduct}=="c32a", MODE="0666", ENV{ID_MM_DEVICE_IGNORE}="1", ENV{ID_MM_PORT_IGNORE}="1" + +# STLink probes +ATTRS{idVendor}=="0483", MODE="0666", ENV{ID_MM_DEVICE_IGNORE}="1", ENV{ID_MM_PORT_IGNORE}="1" + +# Hilscher NXHX Boards +ATTRS{idVendor}=="0640", ATTRS{idProduct}=="0028", MODE="0666", ENV{ID_MM_DEVICE_IGNORE}="1", ENV{ID_MM_PORT_IGNORE}="1" + +# Hitex probes +ATTRS{idVendor}=="0640", MODE="0666", ENV{ID_MM_DEVICE_IGNORE}="1", ENV{ID_MM_PORT_IGNORE}="1" + +# Altera USB Blaster +ATTRS{idVendor}=="09fb", ATTRS{idProduct}=="6001", MODE="0666", ENV{ID_MM_DEVICE_IGNORE}="1", ENV{ID_MM_PORT_IGNORE}="1" + +# Amontec JTAGkey-HiSpeed +ATTRS{idVendor}=="0fbb", ATTRS{idProduct}=="1000", MODE="0666", ENV{ID_MM_DEVICE_IGNORE}="1", ENV{ID_MM_PORT_IGNORE}="1" + +# SEGGER J-Link +ATTRS{idVendor}=="1366", MODE="0666", ENV{ID_MM_DEVICE_IGNORE}="1", ENV{ID_MM_PORT_IGNORE}="1" + +# Raisonance RLink +ATTRS{idVendor}=="138e", ATTRS{idProduct}=="9000", MODE="0666", ENV{ID_MM_DEVICE_IGNORE}="1", ENV{ID_MM_PORT_IGNORE}="1" + +# Debug Board for Neo1973 +ATTRS{idVendor}=="1457", ATTRS{idProduct}=="5118", MODE="0666", ENV{ID_MM_DEVICE_IGNORE}="1", ENV{ID_MM_PORT_IGNORE}="1" + +# Olimex probes +ATTRS{idVendor}=="15ba", MODE="0666", ENV{ID_MM_DEVICE_IGNORE}="1", ENV{ID_MM_PORT_IGNORE}="1" + +# USBprog with OpenOCD firmware +ATTRS{idVendor}=="1781", ATTRS{idProduct}=="0c63", MODE="0666", ENV{ID_MM_DEVICE_IGNORE}="1", ENV{ID_MM_PORT_IGNORE}="1" + +# TI/Luminary Stellaris In-Circuit Debug Interface (ICDI) Board +ATTRS{idVendor}=="1cbe", ATTRS{idProduct}=="00fd", MODE="0666", ENV{ID_MM_DEVICE_IGNORE}="1", ENV{ID_MM_PORT_IGNORE}="1" + +# Marvell Sheevaplug +ATTRS{idVendor}=="9e88", ATTRS{idProduct}=="9e8f", MODE="0666", ENV{ID_MM_DEVICE_IGNORE}="1", ENV{ID_MM_PORT_IGNORE}="1" + +# Keil Software, Inc. ULink +ATTRS{idVendor}=="c251", ATTRS{idProduct}=="2710", MODE="0666", ENV{ID_MM_DEVICE_IGNORE}="1", ENV{ID_MM_PORT_IGNORE}="1" + +# CMSIS-DAP compatible adapters +ATTRS{product}=="*CMSIS-DAP*", MODE="0666", ENV{ID_MM_DEVICE_IGNORE}="1", ENV{ID_MM_PORT_IGNORE}="1" + +# Atmel AVR Dragon +ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="2107", MODE="0666", ENV{ID_MM_DEVICE_IGNORE}="1", ENV{ID_MM_PORT_IGNORE}="1" + +# Espressif USB JTAG/serial debug unit +ATTRS{idVendor}=="303a", ATTRS{idProduct}=="1001", MODE="0666", ENV{ID_MM_DEVICE_IGNORE}="1", ENV{ID_MM_PORT_IGNORE}="1" + +# Zephyr framework USB CDC-ACM +ATTRS{idVendor}=="2fe3", ATTRS{idProduct}=="0100", MODE="0666", ENV{ID_MM_DEVICE_IGNORE}="1", ENV{ID_MM_PORT_IGNORE}="1" \ No newline at end of file diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index c21564491..62f0b7ead 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -1,6 +1,9 @@ FROM mcr.microsoft.com/devcontainers/cpp:1-debian-12 -# [Optional] Uncomment this section to install additional packages. +USER root + +# trunk-ignore(terrascan/AC_DOCKER_0002): Known terrascan issue +# trunk-ignore(hadolint/DL3008): Use latest version of packages RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \ && apt-get -y install --no-install-recommends \ ca-certificates \ @@ -20,6 +23,16 @@ RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \ python3-wheel \ wget \ zip \ + usbutils \ + hwdata \ + gpg \ + gnupg2 \ && apt-get clean && rm -rf /var/lib/apt/lists/* -RUN pipx install platformio==6.1.15 \ No newline at end of file +RUN pipx install platformio==6.1.15 + +COPY 99-platformio-udev.rules /etc/udev/rules.d/99-platformio-udev.rules + +USER vscode + +HEALTHCHECK NONE \ No newline at end of file diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index d83d052b0..bf1c50982 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -13,13 +13,24 @@ }, "customizations": { "vscode": { - "extensions": ["ms-vscode.cpptools", "platformio.platformio-ide"] + "extensions": [ + "ms-vscode.cpptools", + "platformio.platformio-ide", + "Trunk.io" + ], + "unwantedRecommendations": ["ms-azuretools.vscode-docker"], + "settings": { + "extensions.ignoreRecommendations": true + } } }, // Use 'forwardPorts' to make a list of ports inside the container available locally. "forwardPorts": [4403], + // Use "--device=" to make a local device available inside the container. + // "runArgs": ["--device=/dev/ttyACM0"], + // Run commands to prepare the container for use "postCreateCommand": ".devcontainer/setup.sh" } From 03770b799f7821275945ba70896012ec60bfea85 Mon Sep 17 00:00:00 2001 From: Tom Fifield Date: Fri, 13 Dec 2024 03:42:41 +1100 Subject: [PATCH 18/18] Synch minor changes from TFT branch (#5520) * Synch minor changes from TFT branch Includes: * New nordicnrf52 minor version (10.5.0 --> 10.6.0) * Optimisations for T_DECK * preparation for MESH_TAB * add ext notification module to portduino --------- Co-authored-by: mverch67 --- arch/nrf52/nrf52.ini | 3 ++- src/main.cpp | 5 ++--- src/mesh/NodeDB.cpp | 4 ++-- src/modules/Modules.cpp | 6 +++--- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/arch/nrf52/nrf52.ini b/arch/nrf52/nrf52.ini index d75f86306..778be5523 100644 --- a/arch/nrf52/nrf52.ini +++ b/arch/nrf52/nrf52.ini @@ -1,10 +1,11 @@ [nrf52_base] ; Instead of the standard nordicnrf52 platform, we use our fork which has our added variant files -platform = platformio/nordicnrf52@^10.5.0 +platform = platformio/nordicnrf52@^10.6.0 extends = arduino_base platform_packages = ; our custom Git version until they merge our PR framework-arduinoadafruitnrf52 @ https://github.com/geeksville/Adafruit_nRF52_Arduino.git + toolchain-gccarmnoneeabi@~1.90301.0 build_type = debug build_flags = diff --git a/src/main.cpp b/src/main.cpp index 53a662272..2357a00de 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -409,13 +409,13 @@ void setup() digitalWrite(AQ_SET_PIN, HIGH); #endif -#ifdef T_DECK +#if defined(T_DECK) // enable keyboard pinMode(KB_POWERON, OUTPUT); digitalWrite(KB_POWERON, HIGH); // There needs to be a delay after power on, give LILYGO-KEYBOARD some startup time // otherwise keyboard and touch screen will not work - delay(800); + delay(200); #endif // Currently only the tbeam has a PMU @@ -577,7 +577,6 @@ void setup() scannerToSensorsMap(i2cScanner, ScanI2C::DeviceType::INA3221, meshtastic_TelemetrySensorType_INA3221); scannerToSensorsMap(i2cScanner, ScanI2C::DeviceType::MAX17048, meshtastic_TelemetrySensorType_MAX17048); scannerToSensorsMap(i2cScanner, ScanI2C::DeviceType::MCP9808, meshtastic_TelemetrySensorType_MCP9808); - scannerToSensorsMap(i2cScanner, ScanI2C::DeviceType::MCP9808, meshtastic_TelemetrySensorType_MCP9808); scannerToSensorsMap(i2cScanner, ScanI2C::DeviceType::SHT31, meshtastic_TelemetrySensorType_SHT31); scannerToSensorsMap(i2cScanner, ScanI2C::DeviceType::SHTC3, meshtastic_TelemetrySensorType_SHTC3); scannerToSensorsMap(i2cScanner, ScanI2C::DeviceType::LPS22HB, meshtastic_TelemetrySensorType_LPS22); diff --git a/src/mesh/NodeDB.cpp b/src/mesh/NodeDB.cpp index 90b3e0747..6ad1a953d 100644 --- a/src/mesh/NodeDB.cpp +++ b/src/mesh/NodeDB.cpp @@ -541,7 +541,7 @@ void NodeDB::initConfigIntervals() config.display.screen_on_secs = default_screen_on_secs; -#if defined(T_WATCH_S3) || defined(T_DECK) || defined(RAK14014) +#if defined(T_WATCH_S3) || defined(T_DECK) || defined(MESH_TAB) || defined(RAK14014) config.power.is_power_saving = true; config.display.screen_on_secs = 30; config.power.wait_bluetooth_secs = 30; @@ -1422,4 +1422,4 @@ void recordCriticalError(meshtastic_CriticalErrorCode code, uint32_t address, co LOG_ERROR("A critical failure occurred, portduino is exiting"); exit(2); #endif -} \ No newline at end of file +} diff --git a/src/modules/Modules.cpp b/src/modules/Modules.cpp index ad3f0ace4..9baed824c 100644 --- a/src/modules/Modules.cpp +++ b/src/modules/Modules.cpp @@ -74,7 +74,7 @@ #include "modules/StoreForwardModule.h" #endif #endif -#if defined(ARCH_ESP32) || defined(ARCH_NRF52) || defined(ARCH_RP2040) +#if defined(ARCH_ESP32) || defined(ARCH_NRF52) || defined(ARCH_RP2040) || defined(ARCH_PORTDUINO) #if !MESHTASTIC_EXCLUDE_EXTERNALNOTIFICATION #include "modules/ExternalNotificationModule.h" #endif @@ -223,7 +223,7 @@ void setupModules() storeForwardModule = new StoreForwardModule(); #endif #endif -#if defined(ARCH_ESP32) || defined(ARCH_NRF52) || defined(ARCH_RP2040) +#if defined(ARCH_ESP32) || defined(ARCH_NRF52) || defined(ARCH_RP2040) || defined(ARCH_PORTDUINO) #if !MESHTASTIC_EXCLUDE_EXTERNALNOTIFICATION externalNotificationModule = new ExternalNotificationModule(); #endif @@ -245,4 +245,4 @@ void setupModules() // NOTE! This module must be added LAST because it likes to check for replies from other modules and avoid sending extra // acks routingModule = new RoutingModule(); -} \ No newline at end of file +}