Commit Graph
16 Commits
Author SHA1 Message Date
agessaman 9235d761da kiss_modem: keep FEM replies ordered and deliverable; drop Wio FEM control
- Wio Tracker L1 1W no longer advertises TX gain control: its setter
  drives LORA_PWR_EN, the shared LDO for the SX1262 and the PA, so
  "gain off" would power down the radio.
- A SetFemState that arrives mid-TX is now applied after TxDone is
  queued, so its reply follows TxDone.
- SetFemState replies (immediate or deferred) are retained until they
  fit in the host output queue instead of being dropped, so a change
  that took effect is always acknowledged.
- GetFemState replies queue behind an outstanding SetFemState reply;
  a further SetFemState returns TxBusy until it clears.
2026-09-23 16:11:29 -07:00
agessaman 5527a26f9a kiss_modem: add AGC reset interval and FEM gain control (protocol v2)
Add SetHardware sub-commands so a host can probe and configure
per-board RF front-end settings:

- GetCapabilities (0x1B): uint32 feature bits (AGC, FEM RX, FEM TX)
- Set/GetAgcResetInterval (0x1C/0x1D): 0-1020 s, 4 s resolution,
  0 disables; default stays 30 s
- Set/GetFemState (0x1E/0x1F): apply/value masks for FEM RX (LNA)
  and TX (PA) gain; all-or-nothing, Unsupported (0x08) if any
  requested bit is not controllable on this board

The AGC scheduler moves from main.cpp into KissModem so it is
configurable and unit-tested. FEM changes that arrive mid-TX are
deferred until the packet ends, since board setters drive FEM pins
directly.

MainBoard gains virtual FEM hooks (canControl/set/is for LNA and PA
gain). Boards that already implemented these methods privately now
expose them as overrides: Heltec V4, V4 R8, T096, Tracker V2,
Station G3 and Wio Tracker L1 1W.

KISS_FIRMWARE_VERSION bumped to 2.
2026-09-23 15:43:01 -07:00
ViezeVingertjes fb2c61f862 fix: prevent ESP32 KISS modem stalls under USB backpressure
Switch ESP32-S3 KISS modem environments to HWCDC and move outbound KISS writes to a non-blocking queued frame path so loop() and TX completion keep progressing when the host reads slowly. Add native backpressure regression tests and correct the native_kiss_modem test filter so this suite runs directly with pio test.
2026-07-18 22:43:55 +02:00
tuzzmaniandevil ffa76016ff Address two comments from PR 2026-05-08 11:14:22 +12:00
tuzzmaniandevil 314d777b42 Enhance KissModem frame processing and timeout handling 2026-05-07 00:03:09 +00:00
ViezeVingertjes f6ebbd978e Remove redundant locals in handleSetRadio 2026-02-07 14:32:11 +01:00
ViezeVingertjes 5157daf1c1 Remove individual HW_RESP_* defines, use HW_RESP() macro directly 2026-02-07 14:24:34 +01:00
ViezeVingertjes 00b44c4114 Remove redundant send/complete/finished callbacks, use Radio interface directly 2026-02-07 14:22:21 +01:00
ViezeVingertjes 5ccd99e25f Add toggleable per-packet signal reporting 2026-02-07 10:21:36 +01:00
agessaman f445b5acdc fix(kiss_modem): improve RX delivery and noise floor sampling 2026-02-07 08:51:52 +01:00
ViezeVingertjes 02ddc05c30 Reorganise KISS protocol to close gaps. 2026-02-07 08:51:52 +01:00
ViezeVingertjes 5dcc377b77 Rewrite KISS modem to be fully spec-compliant 2026-02-07 08:51:52 +01:00
ViezeVingertjes f0ba14ff75 Remove sync word handling from KissModem. 2026-02-02 18:05:26 +01:00
ViezeVingertjes 240b5ea1e3 Refactor KissModem to integrate radio and sensor management directly, removing callback dependencies. 2026-01-31 15:15:19 +01:00
ViezeVingertjes 1bcb52bab3 Add new commands and responses for RSSI, channel status, airtime, noise floor, statistics, battery, and sensors. 2026-01-31 15:05:25 +01:00
ViezeVingertjes c786cfe613 Add KISS Modem firmware 2026-01-31 10:22:32 +01:00