2813 Commits

Author SHA1 Message Date
Wessel Nieboer c0c9c17cf5 and buildscript 2026-03-03 15:37:33 +01:00
Wessel Nieboer 780720c117 and board! 2026-03-03 15:37:33 +01:00
Wessel Nieboer 90fcd1043f Fix ikoka handheld build
The extends was wrong.
2026-03-03 15:37:32 +01:00
Liam Cottle cdd3d5f34e Merge pull request #1841 from weebl2000/nit-prefs
prefs is 5 char length :nerd:
2026-03-04 01:39:55 +13:00
ripplebiz 7c594ebc50 Merge pull request #1743 from weebl2000/fixagcreset
fix agc reset on SX126x, SX1276 & LR11x0 chips
2026-03-03 22:19:34 +11:00
Liam Cottle ba3d9e264e Merge pull request #1836 from weebl2000/fix-rak3401-sky66122-11-fem
Fix RAK3401 SKY66122-11 FEM control: enable CSD/CPS for proper PA/LNA operation
2026-03-03 23:51:42 +13:00
Liam Cottle d7ad89046b Merge pull request #1633 from weebl2000/fix/gps-uart-power-leak
Fix GPS UART consuming +8mA when disabled (nRF52)
2026-03-03 23:26:58 +13:00
Liam Cottle 67779aded8 Merge pull request #1600 from weebl2000/heltec_deep_sleep_lna
Hold GC1109 PA_POWER during deep sleep for LNA RX wake
2026-03-03 23:20:22 +13:00
Liam Cottle bbd621ba85 Merge pull request #1351 from weebl2000/heltec_wireless_tracker_gps
Support GPS properly on Heltec Wireless Tracker v1.x
2026-03-03 23:11:46 +13:00
ripplebiz 6431cd2d47 Merge pull request #1900 from wbijen/feature/contact-filter-by-hops
Add configurable max hops filter for auto-add contacts
2026-03-03 21:05:44 +11:00
Quency-D c6d530143c Merge pull request #3 from weebl2000/dev-heltec-v4.3
Default LNA enabled=true and fix the sleep order
2026-03-03 17:59:44 +08:00
Quency-D 3b5139a655 Update variants/heltec_v4/LoRaFEMControl.cpp
Co-authored-by: Wessel <wessel@weebl.me>
2026-03-03 17:08:32 +08:00
Quency-D bab650fe61 LNA is enabled by default.
Co-authored-by: Wessel <wessel@weebl.me>
2026-03-03 17:07:56 +08:00
Quency-D 70d3b96768 Update variants/heltec_v4/LoRaFEMControl.cpp init function
Co-authored-by: Wessel <wessel@weebl.me>
2026-03-03 17:06:58 +08:00
Wouter Bijen 1d190ad944 Clamp max_hops to 64 to cover full protocol hop range (0-63) 2026-03-03 09:05:53 +01:00
Wouter Bijen 2cb08775c0 Clarify comment wording: 1 = direct (0 hops)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-03 08:40:17 +01:00
Wouter Bijen c016db86d5 Address PR review: subtract-1 encoding and clamp max_hops
- Change > to >= so stored value 1 means direct/0-hop only (liamcottle)
- Clamp max_hops to 63 on write since getPathHashCount() caps at 63 (robekl)
- Update comments to reflect encoding: 0=no limit, 1=direct only, N=up to N-1 hops

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-03 08:37:22 +01:00
Wouter Bijen 00566741f6 Add configurable max hops filter for auto-add contacts
Filter auto-add of new contacts by hop count (issues #1533, #1546).
Setting is configurable from the companion app via extended
CMD_SET/GET_AUTOADD_CONFIG protocol (0 = no limit, 1-63 = max hops).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-02 20:41:41 +01:00
Wessel Nieboer 14f066bed0 Fix sleep 2026-03-02 11:34:42 +01:00
Wessel Nieboer 8b7fed65de default lna_enabled=true 2026-03-02 11:34:12 +01:00
Daniel Novak 0d87dcc989 Also fix countBefore(0xFFFFFFFF) to return _num
The signed comparison in countBefore breaks for the max uint32_t value.
Even though callers now use getOutboundTotal(), the function itself
should be correct for all inputs.
2026-03-01 07:41:50 +01:00
Wessel Nieboer 8a9a0dca5f Fix GPS +8mA power leak when disabled (nRF52)
On the T114, GPS_RESET (pin 38) is the same pin as PIN_3V3_EN.
MicroNMEALocationProvider::begin() sets pin 38 HIGH (powering the 3V3
rail) but stop() never set it back LOW, leaving the GPS module powered
even when disabled.

Assert reset pin in stop() to mirror begin(), and guard
_location->loop() behind gps_active check.

Fixes meshcore-dev/MeshCore#1628
2026-02-28 19:13:42 +01:00
Wessel Nieboer 59d9770ab9 Add GPS support Heltec Wireless Tracker v1.x
Pin mapping verified against HTIT-Tracker V0.5 schematic:
- GPIO35 (GPS_EN): N-ch MOSFET drives P-ch high-side switch, active HIGH
- GPIO36 (GPS_RST): hardware reset, active LOW
- GPIO33/34: UART TX/RX

Delegates power management to MicroNMEALocationProvider begin()/stop()
which independently controls GPS power via GPS_EN and shares VEXT with
the display through RefCountedDigitalPin.
2026-02-28 19:09:28 +01:00
Wessel Nieboer 9bae9d0ed2 fix comment, we know the band now after checking LR1110 user manual 2026-02-28 19:09:25 +01:00
Wessel Nieboer 85f764a114 Calibrate configured frequency for AGC reset 2026-02-28 19:09:25 +01:00
Wessel Nieboer f54948e06d Also implement LR11x10 AGC reset
Similar to SX126x but simpler.
2026-02-28 19:09:25 +01:00
Wessel Nieboer b2032e11b6 make it more dry 2026-02-28 19:09:25 +01:00
Wessel Nieboer 9106ab46e1 reset noise_floor sampling after agc reset 2026-02-28 19:09:25 +01:00
Wessel Nieboer a2dc2eb50c when doing AGC reset, call Calibrate(0x7F)
1. warm sleep
2. wake to stdby
3. Calibrate(0x7F) to reset all internal blocks
4. re-apply DIO2 RF / boosted gain & register patch to make sure
everything is as it was
2026-02-28 19:09:25 +01:00
Wessel Nieboer f81ec4b14c fix agc reset 2026-02-28 19:09:25 +01:00
Wessel Nieboer 49d8313501 Fix pin mapping & TX switch (it's DIO2) 2026-02-28 19:09:06 +01:00
Wessel Nieboer 5a5568ed56 Drive CTX low first 2026-02-28 19:09:06 +01:00
Wessel Nieboer ac2aa03b09 Add SX126X_REGISTER_PATCH for RAK3401 2026-02-28 19:09:06 +01:00
Wessel Nieboer 70f1ad4aeb Fix RAK3401 SKY66122-11 FEM control: enable CSD/CPS for proper PA and LNA operation
The RAK13302 1W module uses a Skyworks SKY66122-11 front-end module with
three digital control pins (CSD, CTX, CPS) that must be actively driven
by the host MCU. The previous code only managed CTX (GPIO 31) — toggling
it for TX/RX — but never initialized CSD (GPIO 24) or CPS (GPIO 21),
leaving them floating with no pull-up/pull-down resistors on the PCB.

With floating CSD and CPS, the SKY66122 was in an undefined operating
mode:
- The 30 dB TX PA may not have been reliably engaging
- The 16 dB RX LNA was never reliably active, degrading receive
sensitivity
2026-02-28 19:09:06 +01:00
Wessel Nieboer d9e67222f5 prefs is 5 char length :nerd: 2026-02-28 19:07:38 +01:00
Wessel Nieboer 2bb6f636a4 Add 1ms delay after powering PA (cold-boot) 2026-02-28 19:05:31 +01:00
Wessel Nieboer 329e408197 Hold GC1109 PA_POWER during deep sleep for LNA RX wake
The GC1109 FEM needs its VFEM_Ctrl pin held HIGH during deep sleep
to keep the LNA active, enabling proper RX sensitivity for
wake-on-packet. Without this, the LNA is unpowered during sleep
and RX wake sensitivity is degraded by ~17dB.

Release RTC holds in begin() after configuring GPIO registers
(not before) to ensure glitch-free pin transitions on wake.

Trade-off: ~6.5mA additional sleep current for significantly
improved wake-on-packet range.
2026-02-28 19:05:31 +01:00
Daniel Novak c7568a8db0 Replace 0xFFFFFFFF sentinel with explicit getOutboundTotal()
Instead of overloading getOutboundCount() with a magic sentinel value,
add a dedicated getOutboundTotal() method to the PacketManager interface
that returns the total queue size without time filtering.

This eliminates the fragile convention that caused the regression and
makes the two operations — time-filtered count vs total count —
explicitly separate in the API.
2026-02-28 17:19:04 +01:00
Daniel Novak c436bd42c5 Fix countBefore sentinel regression from millis wraparound fix
PR #1795 changed PacketQueue::countBefore() to use signed 2's complement
arithmetic for millis wraparound safety. However, this broke the
0xFFFFFFFF sentinel pattern used by callers to mean "count all packets
regardless of schedule".

With the signed comparison, countBefore(0xFFFFFFFF) always returns 0,
causing hasPendingWork() to report false and repeaters to sleep with
packets still queued. Stats reporting also shows queue_len as 0.

Add an early-return for the sentinel value before the loop, and document
the sentinel convention on the virtual interface and implementation.
2026-02-28 16:22:58 +01:00
fdlamotte 06ab9f7f6b Merge pull request #1871 from enricolorenzoni59/gps-sync-reply
`gps sync` reply: fill buffer with text
2026-02-28 07:45:19 -04:00
enricolorenzoni59 8ad17d1022 gps sync reply: fill buffer with text 2026-02-28 09:07:30 +00:00
Liam Cottle eee42c5099 Merge pull request #1569 from IoTThinks/MCdev-Fixed-Incorrect-Release-of-RefCountedDigitalPin
Fixed RefCountedDigitalPin.h and SSD1306Display for Heltec v4
2026-02-28 17:35:17 +13:00
Specter242 e08dcbdd03 sensecap solar: stabilize wake pin and add button hold poweroff 2026-02-27 22:51:19 -05:00
Specter242 e323755990 sensecap solar: add poweroff command and board power/LED parity 2026-02-27 22:12:12 -05:00
João Brázio 64a16d7ad2 Merge branch 'dev' into 2026/remote-lna 2026-02-27 10:32:14 +00:00
João Brázio 3a81837845 Merge pull request #1 from weebl2000/2026/remote-lna
Fix remote LNA toggle bugs: correct register comparison, add missing implementation & wire up companion radio
2026-02-27 10:11:46 +00:00
Quency-D f0d37e552d Added version identification. 2026-02-27 16:49:00 +08:00
Quency-D 9312fe780a add heltec v4.3 2026-02-26 17:47:03 +08:00
Scott Powell b67decfba0 * bug fix: Packet::writeTo(), Packet::readFrom() 2026-02-26 15:36:21 +11:00
Scott Powell ca81f645ed Merge branch 'multibyte-paths' into dev 2026-02-26 12:30:23 +11:00