From 4a6a0efcfd286bc0a2c19e91b2167c6b8dd8577f Mon Sep 17 00:00:00 2001 From: lizthedeveloper <915684+lizTheDeveloper@users.noreply.github.com> Date: Thu, 6 Feb 2025 16:29:48 -0800 Subject: [PATCH 1/2] log the nonce value at DEBUG instead of INFO (#6001) you're leaking the nonce to stdout, if your logs are routed to a folder, this logs the nonce every time, leading to replay attack surface area being higher. Changed to debug. --- src/mesh/CryptoEngine.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mesh/CryptoEngine.cpp b/src/mesh/CryptoEngine.cpp index 1624ab0d5..4613a6218 100644 --- a/src/mesh/CryptoEngine.cpp +++ b/src/mesh/CryptoEngine.cpp @@ -74,7 +74,7 @@ bool CryptoEngine::encryptCurve25519(uint32_t toNode, uint32_t fromNode, meshtas auth = bytesOut + numBytes; memcpy((uint8_t *)(auth + 8), &extraNonceTmp, sizeof(uint32_t)); // do not use dereference on potential non aligned pointers : *extraNonce = extraNonceTmp; - LOG_INFO("Random nonce value: %d", extraNonceTmp); + LOG_DEBUG("Random nonce value: %d", extraNonceTmp); if (remotePublic.size == 0) { LOG_DEBUG("Node %d or their public_key not found", toNode); return false; From 4e8c4f0d558e8b9ed852f9fbb60fc5ab0c89864a Mon Sep 17 00:00:00 2001 From: dylanli Date: Fri, 7 Feb 2025 16:02:56 +0800 Subject: [PATCH 2/2] T1000-E hardware updates and GPS positioning accuracy optimisation (#6003) * T1000-E button setting update * T1000-E GNSS lock error fix * T1000-E GNSS improve detection success --------- Co-authored-by: WayenWeng --- src/gps/GPS.cpp | 22 ++++++++++++++++++++++ variants/tracker-t1000-e/variant.h | 2 +- 2 files changed, 23 insertions(+), 1 deletion(-) diff --git a/src/gps/GPS.cpp b/src/gps/GPS.cpp index 863f956cf..c2aae0381 100644 --- a/src/gps/GPS.cpp +++ b/src/gps/GPS.cpp @@ -449,7 +449,22 @@ bool GPS::setup() if (!didSerialInit) { int msglen = 0; if (tx_gpio && gnssModel == GNSS_MODEL_UNKNOWN) { +#ifdef TRACKER_T1000_E + // add power up/down strategy, improve ag3335 detection success + digitalWrite(PIN_GPS_EN, LOW); + delay(500); + digitalWrite(GPS_VRTC_EN, LOW); + delay(1000); + digitalWrite(GPS_VRTC_EN, HIGH); + delay(500); + digitalWrite(PIN_GPS_EN, HIGH); + delay(1000); +#endif +#ifdef TRACKER_T1000_E + if (probeTries < 5) { +#else if (probeTries < 2) { +#endif LOG_DEBUG("Probe for GPS at %d", serialSpeeds[speedSelect]); gnssModel = probe(serialSpeeds[speedSelect]); if (gnssModel == GNSS_MODEL_UNKNOWN) { @@ -460,7 +475,11 @@ bool GPS::setup() } } // Rare Serial Speeds +#ifdef TRACKER_T1000_E + if (probeTries == 5) { +#else if (probeTries == 2) { +#endif LOG_DEBUG("Probe for GPS at %d", rareSerialSpeeds[speedSelect]); gnssModel = probe(rareSerialSpeeds[speedSelect]); if (gnssModel == GNSS_MODEL_UNKNOWN) { @@ -772,6 +791,9 @@ void GPS::setPowerState(GPSPowerState newState, uint32_t sleepTime) setPowerPMU(true); // Power (PMU): on writePinStandby(false); // Standby (pin): awake (not standby) setPowerUBLOX(true); // Standby (UBLOX): awake +#ifdef GNSS_AIROHA + lastFixStartMsec = 0; +#endif break; case GPS_SOFTSLEEP: diff --git a/variants/tracker-t1000-e/variant.h b/variants/tracker-t1000-e/variant.h index 6a1f99600..e65f26c93 100644 --- a/variants/tracker-t1000-e/variant.h +++ b/variants/tracker-t1000-e/variant.h @@ -55,7 +55,7 @@ extern "C" { #define BUTTON_PIN (0 + 6) // P0.06 #define BUTTON_ACTIVE_LOW false #define BUTTON_ACTIVE_PULLUP false -#define BUTTON_SENSE_TYPE 0x6 +#define BUTTON_SENSE_TYPE 0x5 // enable input pull-down #define HAS_WIRE 1