Commit Graph

1052 Commits

Author SHA1 Message Date
ripplebiz bb6cf8396d Merge pull request #2634 from NickDunklee/bme680-fixes-consolidation
feat: Integrate BME680 Bosch BSEC support for RAK4631
2026-06-01 13:35:32 +10:00
Nick Dunklee 59cee5c8a0 feat: Integrate BME680 Bosch BSEC support for RAK4631
This is a consolidation of my changes for BME680 on RAK4631 nodes.
I will close my other PRs related to this and link back to this one.

*Background on change:*

This change replaces the Adafruit BME680 driver on RAK4631 with the
Bosch BSEC library. Other boards continue to use the existing
Adafruit path via ENV_INCLUDE_BME680.

This makes the IAQ portion of the sensor functional, and more accurate.
It also contains the math and/or CayenneLPP fixes from my other PRs.
The Bosch code also appears to handle calibrating sensor aging as well,
whereas the Adafruit code is just looking at blind values that can drift
with time. Pretty cool to see this shooting out useful data!

RAK4631 platform.io is set to override to ENV_INCLUDE_BME680_BSEC while
leaving the Adafruit code for other node types. (If this becomes applicable
for other node types in future, awesome! I just don't have hardware
to test against.)

Using the BSEC library introduces IAQ sensor calibration, and saves
the calibration state periodically so it does not have to calibrate
again later.

At startup the IAQ sensor takes 30 minutes to heat and to hit a baseline,
then starts calibrating. Once calibrated, it will save those settings
and will only write settings again if calibration falls back and restores
back to state 3.

This fix also has the gas resistance math fix that was in
[pull 2146](https://github.com/meshcore-dev/MeshCore/pull/2146) so
the adafruit path also can at least show accurate values instead
of looping negative.

Also includes the fix from [pull 2149](https://github.com/meshcore-dev/MeshCore/pull/2149) so the pressure output isn't truncated to 1hPa steps.

*Fixes/Changes:*
- Add bsec_config_iaq[] with the 3.3V/3s-LP/28d calibration profile
- BSEC init applies setConfig() for voltage-correct heater targeting
- IAQ, heat-compensated temperature/humidity, pressure, and altitude
  reported over CayenneLPP
- IAQ accuracy reported as analog input over CayenneLPP (0,1,2,3)
- Calibration state persisted to /bsec_state.bin on nRF52 internal
  flash; written only when iaqAccuracy improves to >= 2, should
  keep write frequency well within flash endurance over device lifetime
- Fix non-BSEC query_bme680: float pressure division, addGenericSensor
  for gas resistance (was addAnalogInput, overflows at > 327 Ohm)
- loop() correctly gated for both GPS and BSEC-only builds
- Add fix_bsec_lib.py extra_script to resolve nRF52840 hard-float ABI
  mismatch in Bosch's PlatformIO packaging, silly Bosch

One general note outside of this code change: I noticed while BME680
_functions_ in companion nodes, since companion nodes run Bluetooth,
BLE preempts the CPU, and can do so mid-I2C-transaction.

This can cause the BME680 to see an anomaly and drop calibration and
start a recalibrate. This is behavior that will exist (and has existed)
regardless of using the Adafruit or Bosch paths.

This particular companion behavior does not seem to occur in sensor
or repeater nodes since their BLE is off. Probably affects other
I2C devices as well.

*Tests:*

- RAK19003
- RAK19007
- RAK19001
- repeater, sensor, companion
2026-05-27 15:33:48 -06:00
ripplebiz 7227871d6a Merge pull request #2620 from jirogit/feat/kiss-modem-xiao-s3-v2
feat(xiao_s3): add kiss modem env
2026-05-25 12:00:46 +10:00
me 2df944d48d feat(xiao_s3): add kiss modem env 2026-05-24 14:03:28 -07:00
fdlamotte 73c7718b9e Merge pull request #2235 from jirogit/fix/lr1110-rxgain-cli-guard
fix: enable radio.rxgain CLI command for LR1110 (T1000-E)
2026-05-24 11:56:23 +02:00
Liam Cottle a35b1bbbfd Merge pull request #2590 from jocasmark/fix/typos
Fix typos in comments and docs
2026-05-22 19:38:19 +12:00
taco efaf95d685 fix debug params for t-echo card 2026-05-21 19:58:10 +10:00
taco 7c8d84ffb5 remove deprecated functions, fix typo and style 2026-05-21 19:58:10 +10:00
taco 9f683975c1 add torch 2026-05-21 19:58:10 +10:00
taco 8540c98947 add tinyui for lilygo t-echo card 2026-05-21 19:58:10 +10:00
taco 1e740d30f2 initial t-echo card support 2026-05-21 19:58:10 +10:00
Mark Jocas 63fe3d42a2 Corrects typos and grammatical errors
Improves readability across documentation and inline comments by fixing common spelling mistakes and duplicate words.
2026-05-20 08:33:48 +02:00
csrutil 0cf4d422a8 Add Heltec T096 sensor environment 2026-05-17 16:17:05 +08:00
Willem Oldemans e1616ff29d Remove static BLE_PIN_CODE definition from Heltec E290_usb configuration 2026-05-15 13:09:59 +02:00
Willem Oldemans 973321d9b1 Disable BLE_PIN_CODE for E290 companion USB environment
Remove the hardcoded BLE_PIN_CODE build flag from the Heltec_E290_companion_ble
environment. The presence of BLE_PIN_CODE prevents the unit from operating as a
USB companion. Commenting it out allows dynamic PIN generation and enables USB
companion functionality.
2026-05-15 12:57:36 +02:00
ripplebiz 0db7715430 Merge pull request #2497 from oltaco/reduce-esp32-dram
Reduce dram0_0 usage on older ESP32 boards
2026-05-15 14:04:42 +10:00
ripplebiz f4be34a997 Merge pull request #2515 from Cisien/station-g3-esp32
Add support for Station G3 and its software configurable LNA/PA1
2026-05-15 13:58:42 +10:00
Rastislav Vysoky 68363d9e4d revert: "feat: Enable GPS on RAK 1W kit" (#2401)
reverted changes to RAK_BOARD and PIN_GPS_EN. setting `RAK_BOARD` would cause radio to stop working and end with RadioLib error -707
2026-05-12 15:56:28 +02:00
liamcottle b0b87fd709 fix gps pins for lilygo t impulse plus 2026-05-12 10:36:19 +12:00
Liam Cottle c4523f71a9 Merge pull request #2522 from liamcottle/board/lilygo-t-impulse-plus
Add support for LilyGo T-Impulse-Plus
2026-05-12 01:39:44 +12:00
liamcottle 2fdbfbdbf6 turn off 3.3v rail when powering off 2026-05-12 01:06:22 +12:00
liamcottle a49ee6ebe9 fix battery voltage reading 2026-05-11 22:17:53 +12:00
liamcottle 242c45f4a3 initial support for lilygo t impulse plus 2026-05-11 22:05:06 +12:00
Quency-D 6d3b71eed9 add heltec-mesh-node-t1 2026-05-11 15:11:07 +08:00
Huw Duddy 3eacc49489 Merge pull request #2503 from jirogit/fix/techo-lite-non-shell-usb
feat(techo-lite): add USB companion radio target for non-shell variant
2026-05-10 22:40:12 +10:00
Chris 75fb07fc2c Add support for Station G3 and its software configurable LNA and PA1 2026-05-09 13:53:20 -07:00
entr0p1 77bd994a61 T-Echo Lite LoRa radio fixes
- Set TCXO voltage to 1.8 (not defined previously, falls back to default)
- Set correct variable name for SX1262 RX/TX pins
- Fix SX1262 RX pin number
2026-05-09 14:26:55 +10:00
jirogit 5a6fd4c16a feat(techo-lite): add USB companion radio target for non-shell variant 2026-05-08 00:38:04 -07:00
taco b612ba49f2 reduce dram0_0 usage by lowering OFFLINE_QUEUE_SIZE
some older ESP32 boards were pushing the limits of the dram segment causing the linker to fail, especially for ble and wifi firmwares.

lowering OFFLINE_QUEUE_SIZE reduces dram usage
2026-05-08 00:40:33 +10:00
jirogit f224a325e6 fix: enable radio.rxgain CLI command for LR1110 (T1000-E)
USE_LR1110 was missing from the preprocessor guard in CommonCLI.cpp,
causing both get and set to fail silently on T1000-E:

- get radio.rxgain returned the full radio config string (fell through
  to the memcmp("radio", 5) branch)
- set radio.rxgain returned "unknown config" (no branch matched)

Fix: add -D USE_LR1110 to variants/t1000-e/platformio.ini and include
USE_LR1110 in the #if guard on both get and set branches.

CustomLR1110Wrapper already implements setRxBoostedGainMode() and
getRxBoostedGainMode() via the RadioLibWrapper virtual interface,
so no radio-layer changes are required.

Tested on T1000-E: get/set/persist all confirmed working.
2026-05-01 00:31:31 -07:00
Scott Powell 0a8a0a4904 * Refactor: removed duplicated radio_rng_seed(), radio_set_params(), radio_set_tx_power() 2026-05-01 14:47:07 +10:00
Rastislav Vysoky d7e3a9ddba Merge branch 'dev' into minewsemi-refactor 2026-04-30 14:48:49 +02:00
Liam Cottle ffbf73dc5c Merge pull request #2432 from recrof/kiss-radio-everywhere
kiss radio: added stm32 support + envs in platformio.ini
2026-05-01 00:36:46 +12:00
Liam Cottle 5c651b35a0 Merge pull request #1954 from OverkillFPV/lora-longer-preamble
Lora longer preamble
2026-04-30 22:12:04 +12:00
Liam Cottle daa50e9469 Merge pull request #2426 from recrof/nano-g2-rework
make g2 more in line with other variants
2026-04-30 16:57:58 +12:00
Liam Cottle 2522492cd7 Merge pull request #2436 from chrisdavis2110/rak3401-comp-ana-button
feat: Add support for PIN_USER_BTN_ANA on rak3401 companion usb and companion ble envs
2026-04-30 16:57:00 +12:00
Quency-D 696aae6ed1 Heltec boards have LNA disabled by default. 2026-04-29 16:20:21 +08:00
chrisdavis2110 5fbd473298 added PIN_GPS_EN=-1 to rak3401 companion usb 2026-04-28 21:59:10 -07:00
chrisdavis2110 0265851621 added PIN_USER_BTN_ANA for rak3401 companion usb and companion ble 2026-04-28 21:26:56 -07:00
Rastislav Vysoky 5beef490a0 add kiss radio env to most of the variants 2026-04-28 15:09:25 +02:00
Rastislav Vysoky 66009069cd standardize the minewsemi variant 2026-04-28 13:53:35 +02:00
Liam Cottle d8f3d59d82 Merge pull request #2427 from recrof/tabs-to-spaces
replace all intendation tabs to spaces in pio ini files
2026-04-28 22:39:31 +12:00
Rastislav Vysoky b963681830 replace all intendation tabs to spaces in pio ini files 2026-04-28 12:37:30 +02:00
Rastislav Vysoky 12d9cc3752 make g2 more in line with other variants 2026-04-28 12:24:45 +02:00
ripplebiz 0396cf6771 Merge pull request #2383 from IoTThinks/MCdev-Added-XiaoS3-202604
Added Xiao S3 variant
2026-04-28 14:23:42 +10:00
Liam Cottle 70212fb5cc Merge pull request #2401 from zevaryx/rak-3401-gps
feat: Enable GPS on RAK 1W kit
2026-04-28 13:57:55 +12:00
me b91f127e4e fix: correct device model name for Heltec Wireless Paper 2026-04-26 00:23:09 -07:00
Huw Duddy 40d7fcfc26 Merge pull request #2157 from aXistem-dev/fix/sensecap-solar-tx-led-12
fix(sensecap_solar): correct TX LED after remap & power-button pin changes
2026-04-25 18:03:53 +10:00
Confi 835b0e9114 fix(sensecap_solar): init LED_WHITE LOW to prevent always-on at boot 2026-04-25 09:47:44 +02:00
zevaryx 7f38e3f145 feat: Enable GPS on RAK 1W kit 2026-04-24 20:24:50 -06:00