Upstream shipped companion/repeater/room-server v1.17.0 today; its tree is
identical to origin/main, so that is what this merges. Our base was 7 Jul
(7b566670), i.e. 350 files / +11k lines of upstream behind.
Conflicts and how they were settled:
* Mesh.cpp -- upstream split the dedup into wasSeen() + explicit markSeen().
Kept BOTH: their new call pair AND our payload-length bound on the TRACE
path-hash read, which is what stops a crafted short TRACE from steering
isHashMatch() past the buffer.
* companion_radio/main.cpp -- upstream grew its own MultiSerialInterface
(BLE + USB + WiFi + Ethernet registered side by side), which is a superset
of the SerialDualInterface we backported from PR #1779. Took theirs whole;
our copy is now dead code. NOTE: envs that relied on the backport for a USB
console alongside BLE now need an explicit -D ENABLE_USB_INTERFACE.
* ui-new/UITask.cpp -- isSerialEnabled() was renamed isBluetoothEnabled()
upstream and DisplayDriver::RED became UIColor::warning_txt. Same intent
either way: no BT pin on screen while Bluetooth is off.
* EnvironmentSensorManager.cpp -- upstream fixed the millis() wrap on the GPS
update timer in the exact line our gpsDutyLoop() call sits on. Kept both,
with their wrap-safe compare.
* NRF52Board.cpp -- upstream independently arrived at the same sd_temp_get()
fix for SoftDevice-protected TEMP. Took their form, kept our comment, which
is the only place recording WHY (APP_MEMACC fault -> reboot on telemetry).
* RadioLibWrappers.{h,cpp}, simple_repeater/main.cpp -- add/add. Their
configSideDetectors()/performChannelScan()/external watchdog next to our
irqDoneMask()/probeDio1()/BLE pump/WDT feed. The repeater console keeps the
1032-byte reply buffer for paged analyzer output and now clears it, since a
static buffer would otherwise reprint the previous reply.
* .vscode/extensions.json -- deleted upstream, and it is in .gitignore; our
only change was a comment. Gone.
Built clean: Xiao_x1_rpt, Xiao_x2_cmp, Xiao_x3_obs, SenseCap_s1_rpt,
T1000E_cmp_cz. Not flashed to anything yet.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
158 lines
5.9 KiB
INI
158 lines
5.9 KiB
INI
[SenseCap_Solar]
|
|
extends = nrf52_base
|
|
board = seeed_sensecap_solar
|
|
board_build.ldscript = boards/nrf52840_s140_v7.ld
|
|
build_flags = ${nrf52_base.build_flags}
|
|
${sensor_base.build_flags}
|
|
-I lib/nrf52/s140_nrf52_7.3.0_API/include
|
|
-I lib/nrf52/s140_nrf52_7.3.0_API/include/nrf52
|
|
-I variants/sensecap_solar
|
|
-I src/helpers/nrf52
|
|
-D NRF52_PLATFORM=1
|
|
-D USE_SX1262
|
|
-D NRF52_POWER_MANAGEMENT
|
|
-D RADIO_CLASS=CustomSX1262
|
|
-D WRAPPER_CLASS=CustomSX1262Wrapper
|
|
-D P_LORA_TX_LED=12
|
|
-D P_LORA_DIO_1=1
|
|
-D P_LORA_RESET=2
|
|
-D P_LORA_BUSY=3
|
|
-D P_LORA_NSS=4
|
|
-D PIN_USER_BTN=PIN_BUTTON1
|
|
-D LORA_TX_POWER=22
|
|
-D SX126X_RXEN=5
|
|
-D SX126X_TXEN=RADIOLIB_NC
|
|
-D SX126X_DIO2_AS_RF_SWITCH=1
|
|
-D SX126X_DIO3_TCXO_VOLTAGE=1.8
|
|
-D SX126X_CURRENT_LIMIT=140
|
|
-D SX126X_RX_BOOSTED_GAIN=1
|
|
-D ENV_INCLUDE_GPS=1
|
|
build_src_filter = ${nrf52_base.build_src_filter}
|
|
+<helpers/*.cpp>
|
|
+<helpers/sensors>
|
|
+<../variants/sensecap_solar>
|
|
debug_tool = jlink
|
|
upload_protocol = nrfutil
|
|
lib_deps =
|
|
${nrf52_base.lib_deps}
|
|
${sensor_base.lib_deps}
|
|
|
|
[env:SenseCap_Solar_repeater]
|
|
extends = SenseCap_Solar
|
|
build_flags =
|
|
${SenseCap_Solar.build_flags}
|
|
-D ADVERT_NAME='"SenseCap_Solar Repeater"'
|
|
-D ADVERT_LAT=0.0
|
|
-D ADVERT_LON=0.0
|
|
-D ADMIN_PASSWORD='"password"'
|
|
-D MAX_NEIGHBOURS=50
|
|
; -D MESH_PACKET_LOGGING=1
|
|
; -D MESH_DEBUG=1
|
|
build_src_filter = ${SenseCap_Solar.build_src_filter}
|
|
+<../examples/simple_repeater/*.cpp>
|
|
|
|
; CUSTOM (TeTeHacko): repeater + BLE UART console (wireless querying, no USB).
|
|
; The s140 SoftDevice is already linked by the SenseCap_Solar base, so the BLE stack is available.
|
|
[env:SenseCap_Solar_repeater_ble]
|
|
extends = SenseCap_Solar
|
|
board_build.ldscript = boards/nrf52840_s140_v7_extrafs.ld
|
|
board_upload.maximum_size = 708608
|
|
; custom version + build timestamp for `ver` (see tools/build_version.py)
|
|
extra_scripts = ${nrf52_base.extra_scripts}
|
|
pre:tools/build_version.py
|
|
build_flags =
|
|
${SenseCap_Solar.build_flags}
|
|
-D ADVERT_NAME='"SenseCap_Solar Repeater"'
|
|
-D ADVERT_LAT=0.0
|
|
-D ADVERT_LON=0.0
|
|
-D ADMIN_PASSWORD='"password"'
|
|
-D MAX_NEIGHBOURS=50
|
|
; Real BLE PIN lives ONLY in the git-ignored platformio.local.ini ([secrets] ble_pin).
|
|
; The committed default (123456) is a non-secret placeholder.
|
|
-D BLE_PIN_CODE=${secrets.ble_pin}
|
|
; INA226 defaults to 0x44 in EnvironmentSensorManager = collision with SHT41
|
|
; (false detection, garbage in telemetry). 0x40 is the real INA226 HW default.
|
|
-D TELEM_INA226_ADDRESS=0x40
|
|
; GPS detection (1 s window for NMEA after power-on) is a race and randomly
|
|
; fails. When it loses, the gps setting is not exposed and the persisted
|
|
; _prefs.gps_enabled cannot be applied at boot -> GPS (and RTC sync!) stays
|
|
; dead until the next lucky boot. The P1-Pro always has GPS -> skip detection.
|
|
; GPS on/off itself persists via the `gps on|off` CLI command (NodePrefs).
|
|
; Note: the L76K draws ~25-35 mA — plan for the extra power on a solar node.
|
|
-D ENV_SKIP_GPS_DETECT=1
|
|
; Passive mesh analyzer (TeTeHacko): expose heard repeaters/room servers and a
|
|
; frame firehose over the text console for a BLE bridge/map. RAM-only, ~15 KB.
|
|
; nodes [offset] -> heard repeater/room registry (identity, geo, SNR, path)
|
|
; rxlog [cursor] -> circular log of every frame heard (type, path, SNR/RSSI)
|
|
; Sized from channel physics, not last week's traffic (so we stop re-raising):
|
|
; RXLOG_SIZE 512 (~32 B/rec, 16 KB): ~2 min of a fully saturated SF8/62.5k
|
|
; channel (~2-4 frames/s) or ~35 min of typical traffic -- covers BLE
|
|
; outages; the fast big-page drain (~40+ rec/s) outruns the radio itself.
|
|
; MAX_HEARD_NODES 128 (~68 B/entry, 8.7 KB): the 48-slot registry filled in
|
|
; <2 h and churn evicted real neighbours (Kladno, ABC_10W_MKT) into the
|
|
; poorer `neighbors`-table fallback; 128 > distinct nodes heard per
|
|
; neighbour advert period even on inversion evenings.
|
|
-D MAX_HEARD_NODES=128
|
|
-D RXLOG_SIZE=512
|
|
; PKTFEED_SIZE 64 (~268 B/rec, 17 KB): observer feed ring -- like rxlog but
|
|
; with full raw frame bytes (`pktlog` cmd) for the meshcoretomqtt-compatible
|
|
; community analyzer feed. The bridge now polls in a connect->drain->disconnect
|
|
; duty cycle (BLE connections disturb LoRa TX, see MESH_TX_RETRIES), so drains
|
|
; are ~3-4 min apart: 64 records ≈ 10+ min of typical traffic buys margin for
|
|
; busy evenings; drop detection via the E-trailer catches any overflow.
|
|
-D PKTFEED_SIZE=64
|
|
; -D MESH_PACKET_LOGGING=1
|
|
build_src_filter = ${SenseCap_Solar.build_src_filter}
|
|
+<../examples/simple_repeater/*.cpp>
|
|
|
|
[env:SenseCap_Solar_room_server]
|
|
extends = SenseCap_Solar
|
|
build_flags =
|
|
${SenseCap_Solar.build_flags}
|
|
-D ADVERT_NAME='"SenseCap_Solar Room"'
|
|
-D ADVERT_LAT=0.0
|
|
-D ADVERT_LON=0.0
|
|
-D ADMIN_PASSWORD='"password"'
|
|
; -D MESH_PACKET_LOGGING=1
|
|
; -D MESH_DEBUG=1
|
|
build_src_filter = ${SenseCap_Solar.build_src_filter}
|
|
+<../examples/simple_room_server/*.cpp>
|
|
|
|
[env:SenseCap_Solar_companion_radio_ble]
|
|
extends = SenseCap_Solar
|
|
board_build.ldscript = boards/nrf52840_s140_v7_extrafs.ld
|
|
board_upload.maximum_size = 708608
|
|
build_flags =
|
|
${SenseCap_Solar.build_flags}
|
|
-D MAX_CONTACTS=350
|
|
-D MAX_GROUP_CHANNELS=40
|
|
-D BLE_PIN_CODE=${secrets.ble_pin}
|
|
-D OFFLINE_QUEUE_SIZE=256
|
|
; -D BLE_DEBUG_LOGGING=1
|
|
; -D MESH_PACKET_LOGGING=1
|
|
; -D MESH_DEBUG=1
|
|
build_src_filter = ${SenseCap_Solar.build_src_filter}
|
|
+<helpers/nrf52/SerialBLEInterface.cpp>
|
|
+<../examples/companion_radio/*.cpp>
|
|
lib_deps =
|
|
${SenseCap_Solar.lib_deps}
|
|
densaugeo/base64 @ ~1.4.0
|
|
|
|
[env:SenseCap_Solar_companion_radio_usb]
|
|
extends = SenseCap_Solar
|
|
board_build.ldscript = boards/nrf52840_s140_v7_extrafs.ld
|
|
board_upload.maximum_size = 708608
|
|
build_flags =
|
|
${SenseCap_Solar.build_flags}
|
|
-D MAX_CONTACTS=350
|
|
-D MAX_GROUP_CHANNELS=40
|
|
-D ENABLE_USB_INTERFACE
|
|
; -D MESH_PACKET_LOGGING=1
|
|
; -D MESH_DEBUG=1
|
|
build_src_filter = ${SenseCap_Solar.build_src_filter}
|
|
+<helpers/nrf52/SerialBLEInterface.cpp>
|
|
+<../examples/companion_radio/*.cpp>
|
|
lib_deps =
|
|
${SenseCap_Solar.lib_deps}
|
|
densaugeo/base64 @ ~1.4.0
|