Commit Graph
326 Commits
Author SHA1 Message Date
Raphael CoefficandRaphael Coeffic 1056d13dad S.Port: no broken packets when the radio pushes too fast, no stalls after a full buffer (#1224)
* S.Port: drop a radio packet when the downlink buffer is full

SportQueue() wrote the stuffed packet without checking for room: a radio
pushing faster than the RF link drains (8 bytes per frame) wrapped the
64-byte SportData ring over the bytes not sent yet, and the receivers got
broken S.Port frames. Now the whole new packet is dropped when it doesn't
fit (stuffed length 9 + 1 per 7D/7E byte). The buffer low flag is set as
before, and also on a drop.

* S.Port: report the downlink buffer state once, also when it has room

The buffer low flag was cleared silently, so the radio only learnt at
the next periodic status (up to 500 ms) and held its packets with the
buffer empty: 442 B/s instead of ~1150 B/s with the flag honoured (4-in-1
and MPM v2 benches). Send the status as soon as the flag clears. While
the flag is set, the status is no longer forced again on every packet:
only when the flag gets set, the periodic status repeats it.

---------

Co-authored-by: Raphael Coeffic <1050031+raphaelcoeffic@users.noreply.github.com>
2026-12-04 17:20:35 +01:00
fc6814b705 FrSkyA: FrSky ACCESS on the CC2500 (#1214)
* FrSky X: S.Port frames to the receiver stored at payload[i-start-2]

FrSkyX_seq_sport() (SPORT_SEND) stored the outgoing bytes at
payload[i-start+2], i.e. payload[4] to payload[11] for the 8 bytes of
an LBT packet: up to 4 bytes past each frame's 8-byte payload (into the
next frame's count and payload, past the array for frame 3). The
retransmits sent payload[i] and payload[i-start+2], bytes from beyond
the frame. All three now use payload[i-start-2] (0 to 7).

* FrSkyA: FrSky ACCESS on the CC2500

New protocol 112, subtypes 16ch, 8ch (FCC) and EU16ch, EU8ch (only the
region flag differs: ACCESS uses the same channels, hops and timing in
both). Reversed from the ISRM and RX6R firmwares and captures of an X9
Lite with an RX6R; same CC2500 PHY as Mike's UNI ACCESS.

- register (channel 0) and bind (channel 239) in the same bind
- 16 or 8 channels every 7 ms, D16 channel packing, extended limits
- failsafe: one channel per frame in its slot, as the ISRM
- telemetry: RSSI / RxBatt and the S.Port stream as D16, S.Port packets
  from the radio sent to the receiver (SportQueue(), split out of the
  serial input for FrSkyX/X2/R9)
- receiver settings and hardware info (PXX2 messages 5 and 6) between
  the receiver and a Lua script, MULTI telemetry type 18 ("Pipe") and
  serial frames of 2 to 7 extra bytes
- not on the atmega328p nor in the 64KB CC2500 release (size)

Tested with an RX6R (ACCESS 2.1.8) and an Archer Plus SR10+ (1.0.10,
3.0.3): bind, channels, failsafe (S.Bus output), telemetry, receiver
settings and the SR10+ stabilizer settings over S.Port.

Needs FrSkyX_seq_sport() fixed (#1203): its resends overflowed and
froze the hopping at the first S.Port packet.

* Lua: FrSky ACCESS RX, receiver options for FrSkyA

The receiver options page of an ACCESS module for a receiver bound
with FrSkyA: name and versions, fast PWM, telemetry and 25mW,
S.Port/F.Port/F.Port2, S.Bus 24, PWM on CH5/CH6, the channel or port
mode of each output. Rows follow the capabilities the receiver
reports. Uses the Multi Lua pipe (multiBuffer "Pipe").

* FrSkyA Lua: receiver IDs 81 to 85

Names for the newer ACCESS receivers (SR6BL15A, SR6Lite, R6Lite,
RS-Lite, R2SIM), so an R6Lite shows by name instead of "ID 83".

---------

Co-authored-by: Raphael Coeffic <1050031+raphaelcoeffic@users.noreply.github.com>
Co-authored-by: pascallanger <pascal_langer@yahoo.fr>
2026-11-21 16:07:16 +01:00
Raphael CoefficandRaphael Coeffic 2a13543cdc Futaba: T-FHSS Surface, SR and Air sub protocols (#1213)
* Futaba: T-FHSS Surface, SR and Air sub protocols

New sub protocols of Futaba (21) next to SFHSS, on the CC2500:

- TFHSS: T-FHSS Surface (R334SBS...). 384 kbps MSK, 3 ms frames,
  CH1-4 every frame and CH5-8 in turn, bind packets on channel 1,
  failsafe, telemetry.
- TFH-SR: T-FHSS SR, 1.2 ms frames, no telemetry.
- TF-Air: T-FHSS Air (R3008SB...). 128 kbps 2-FSK, 15 ms frames, 16
  channels, link with the receiver's ID, telemetry. No failsafe frames
  (the receiver's own).

From the R334SBS receiver and T18SZ transmitter firmware, checked
against captures of a 4PM Plus (Surface, SR) and a T6K (Air) shared on
issue #507.

Telemetry (FUTABA_FW_TELEMETRY): the link frame (A1 = receiver voltage,
RSSI = its link quality) and a new MULTI_TELEMETRY_FUTABA (0x13) frame
with the S.BUS2 sensor slots as the receiver sends them, for the radio
to decode (Multiprotocol.h).

Tested against a CC2652/CC2755 receiver of the packets, not on real
Futaba receivers yet. Size: +3.0 KB on the STM32 builds, Futaba alone
on the ATmega328p 14.9 KB.

* Futaba: T-FHSS on STM32 only

T-FHSS adds 3.9 KB on the ATmega328p, and the CC2500 release build
(all its CC2500 protocols) no longer fits. FUTABA_TFHSS (Validate.h)
enables the T-FHSS sub protocols on STM32 boards only; on the ATmega
Futaba is S-FHSS alone, as before (same build size as master).

* Futaba: no T-FHSS on the 64KB STM32

The CC2500 64KB release build was 1 KB over with T-FHSS (+3.1 KB).
FUTABA_TFHSS now needs a 128KB STM32 (not MCU_STM32F103C8, as the
surface protocols in Validate.h). All release recipes build: 64KB as
master (53200 bytes), 4-in-1 117940, T18 118856.

* Futaba: T-FHSS bind hops the list and waits for the reply

The R334SBS scans the 16-channel list in its link mode, answers a bind
packet on that channel (type 24 / 25, keyed as its telemetry) and only
stores the bind after packets with byte 1 bit 7. The 4PM Plus sets bit 7
once it has heard the reply and binds 9.1 s without one. So the bind
now hops the list at 3 ms per packet (channel 1 every 48 ms, as
captured), listens on the same channel, then sends 240 packets with
bit 7; 9.6 s at most.

* Futaba: T-FHSS binds at the normal power

The bind (Surface, SR) and the Air link now use the radio's power
setting (low / high, range), not CC2500_BIND_POWER. The R334SBS takes a
bind packet only above about -79 dBm (its RSSI check); at bind power
the packets were 41 dB below the servo frames. The 4PM Plus binds 33 dB
down from a higher level, the T6K links at full power. Checked on the
bench with a 4-in-1 answering as the receiver (Surface and Air).

* Futaba: T-FHSS Air picks slot channels as the T18SZ

Slots 0..5 and 8 carry their own channel or the alternate (ch11..16,
ch10), chosen as the T18SZ does: a channel moved = more than 3 us from
the value last sent, age = frames since sent. Own moved: the alternate
if it moved too and is 2 frames old, or is 64 old. Own still: the
alternate if it moved (unless own is 64 old), else the older one, own
on a tie. Was: the halves in turn, so moving sticks went out every
other frame.

* Futaba: T-FHSS bind reply on the next list channel

The R334SBS hops before it replies to a bind packet, as it does for its
telemetry: the module now listens on the next list channel after each
bind packet, not on the same one. A 4PM Plus bind followed over the
list: no reply on the bind packet's channel, and byte 7 of the bind
packet is the channel it is sent on (the receiver echoes it), not 01.
Bench (4-in-1 answering as the receiver): normal and SR link.

* Futaba: T-FHSS Surface keys with the receiver's ID

The last 4 key bytes of T-FHSS Surface are the receiver's own ID (its
serial number), not a number of the TX: the receiver keeps only the TX
ID from the bind. The module sent its own, so the R334SBS bound but
decoded no servo packet. The ID now comes from the receiver's bind
reply and is stored per RX number (TFHSS_EEPROM_OFFSET 1527, 4 bytes
per model, end 1783). Bench (4-in-1 answering as the receiver with its
own ID): bind, servo packets OK, again after a restart without bind.

* Futaba: T-FHSS Surface reads the reply before the next packet

The reply comes 1.9 ms after the TX packet's start, the read was 2.5 ms
after the callback: on the MPM v2 replies were taken up to 1.5 ms only.
Now the next frame's packet is built, the reply read, then the packet
sent.

* Futaba: S.BUS2 sensors Lua tool

S.BUS2 sensors don't tell their type on the bus: the radio shows each
slot with data (telemetry type 19) as a raw sensor. The tool turns a
slot into a typed sensor the radio decodes (SBS-01T/TE, RPM, voltage,
current), with an ESCape32 preset. Uses model.setSensor() and
model.deleteSensor() when the radio has them (EdgeTX/edgetx#8105),
else setTelemetryValue() with "Discover new sensors" on.

---------

Co-authored-by: Raphael Coeffic <1050031+raphaelcoeffic@users.noreply.github.com>
2026-11-21 16:04:09 +01:00
MRC3742 0f8aceb79f Few updates
Thanks @MRC3742
2026-08-13 20:20:53 +02:00
pascallanger 463978939b Ares: new protocol
ARES Gamma 370, P-51D Mustang 350, RTF models with 6HPA-Tx and AZS12006-Rx (6 channel).
2026-08-04 00:28:44 +02:00
Eduard aaaa5f141d RadioLink / DumboRC command packages for P Series (#1164)
* [Codex assisted] RadioLink / DumboRC command packages bridge

Pass "special" packages to and from the module
Allows to replicate "Set Failsafe", "Set Gyro Settings" and "Set Gyro Endpoints" from DDF-350

* RadioLink / DumboRC command packages TX / RX

* RadioLink / DumboRC Helper script channel names

Has max 10 channels
Has no failsafe
Older X series have gyro sense fixed to CH8, also can be used as regular channel

* [Codex] DumboRC P Series settings script

Add script that mimics interaction between DumboRC DDF-350 transmitter and P Series receivers

* [Codex assisted] Split P series into separate subprotocol

Split command exchange into separate subprotocol
Update protocol documentation

* [Codex] Improve LUA script

Clean up, better event handling
2026-07-29 08:18:58 +02:00
pascallanger c193d0b9dd Update Multiprotocol.ino 2023-06-04 12:12:22 +02:00
pascallanger 0a0463652b E129/C186 protocol
C186/E120 models
2022-06-27 16:59:48 +02:00
Pascal Langer bf09855014 Another attempt 2021-09-07 16:59:06 +02:00
Pascal Langer 940f241b9d Fix compilation issues 2021-09-07 14:29:35 +02:00
Pascal Langer 5c00ce6b88 New 0 protocol: enable to list all protocols and sub protocols 2021-09-07 14:08:24 +02:00
Pascal Langer 016b282246 Multi Status: send frame as soon as a new protocol is selected 2021-09-05 22:15:56 +02:00
Pascal Langer 94f73bd54f MT99xx: Added voltage telemetry for the Dragon sub protocol 2021-03-27 11:51:53 +01:00
Pascal Langer 84780a9d90 Multi Config 2021-03-19 17:06:58 +01:00
Pascal Langer 4a626eaf14 Change XN297 emulation layer
Loads of protocols have been touched by this change. Some testing has been done but please test on all your models.
The XN297 emulation selects in this order:
 - the CC2500 if it is available and bitrate=250K. Configure the option field automatically for RF tune.
 - the NRF for all bitrates if it is available
 - if NRF is not available and bitrate=1M then an invalid protocol is sent automatically to the radio.
CC2500 @250K can now receive normal and enhanced payloads.
OMP protocol supports telemetry on CC2500 and is also for NRF only modules including telemetry.
Separation of E016H (new protocol) from E01X due to different structure.
MJXQ, MT99XX, Q303 and XK: some sub protocols available on CC2500 only.
2021-03-17 17:05:42 +01:00
Pascal Langer 905ee4b1ed Fix module boot issue? 2021-03-14 11:15:24 +01:00
Pascal Langer dbc33951a4 Fix for module boot issue? 2021-03-13 18:18:07 +01:00
Pascal Langer f8cc913898 Update Multiprotocol.ino 2021-03-06 12:00:05 +01:00
Pascal Langer a5428bc180 Removed SBUS trainer option 2021-03-06 11:33:32 +01:00
Pascal Langer 600049898a SBUS/CPPM: fixed switching from CPPM to SBUS 2021-03-04 21:28:06 +01:00
Pascal Langer 0e1db8f06b SBUS/CPPM: fixed switching from SBUS to CPPM
There is still an issue from CPPM to SBUS...
2021-03-04 19:02:45 +01:00
Pascal Langer ec83f1e5a3 Disable SBUS serial when switching to CPPM 2021-03-04 15:23:23 +01:00
Pascal Langer 4dacac29c6 SBUS/CPPM: restore normal telemetry on student link lost
Once the setup is done check the "Disable telemetry" box to make sure that there is no interference between the internal module and Multi telemetry.
2021-03-04 09:52:54 +01:00
Pascal Langer bb70116df0 SBUS and CPPM output 2021-03-03 10:07:19 +01:00
Pascal Langer d36af55b84 DEVO: full telemetry 2021-03-01 13:47:44 +01:00
Pascal Langer 0844ec2efd Add more protocols which can run with the CC2500
Use CC2500 only when emulating NRF250K/XN297_250K
2021-02-16 19:06:23 +01:00
Pascal Langer 93bb117961 RF switch fix... 2021-02-12 16:29:36 +01:00
Pascal Langer dc18e8e5b2 MT99XX: new subproto Dragon 2021-02-10 09:59:30 +01:00
Pascal Langer 3b8b2ef376 Protocol init function modified 2021-02-09 18:23:33 +01:00
Pascal Langer d496f62719 Removed depreciated MULTI_STATUS 2021-02-08 09:36:47 +01:00
Pascal Langer 0cf58c2990 MLink: added voltage, current, rpm, temp sensors and lqi 2021-02-07 18:51:36 +01:00
Pascal Langer a917227ddc Bayang: generic frsky hub function 2021-02-04 12:05:57 +01:00
Pascal Langer f11da0c1de DSM: fix low power 2021-01-28 09:09:43 +01:00
Pascal Langer 23141b6087 E016Hv2 and ESKY150V2 don't need the NRF code anymore 2021-01-21 11:46:54 +01:00
Pascal Langer ecfc5b0313 End bind as requested by the radio on more protocols 2021-01-19 12:13:24 +01:00
Pascal Langer 5aae065dc0 New protocol: E129 2021-01-16 15:45:19 +01:00
Pascal Langer 30e3e84066 LOLI: RX config 2021-01-11 16:27:59 +01:00
Pascal Langer 49f004e53f E010r5: added flip, led and calib channels 2021-01-11 12:12:26 +01:00
Pascal Langer 062fc05eac Fix FrSky RX protocol not ending bind when requested 2021-01-11 09:42:16 +01:00
Pascal Langer 6d080d5d5f New LOLI protocol 2021-01-09 18:39:31 +01:00
Pascal Langer 0955340a93 New protocol: E010r5 2021-01-08 21:16:07 +01:00
Pascal Langer d19b5187c5 AFHDS2A RX: stop bind when requested 2020-12-23 10:54:39 +01:00
Pascal Langer 4ce3a5d298 Renamed protocol E016H to E016HV2 2020-12-18 00:09:13 +01:00
Pascal Langer 321e4aee34 E016H v2: new protocol WIP only 1 ID 2020-12-17 18:05:04 +01:00
Pascal Langer 1bb059c2a2 WFLY: renamed WFLYRF to WFLY2 2020-12-13 23:15:43 +01:00
Pascal Langer b01462e36b WFLYRF: fixed normal mode, added telemetry, bind is not working yet 2020-12-11 10:40:00 +01:00
Pascal Langer 2b0f663482 WFLY RF: WIP protocol 2020-12-10 16:51:55 +01:00
Pascal Langer 6874e3a6a7 Template for WFLY RF 2020-12-05 19:12:11 +01:00
Pascal Langer 96263ed8a6 Prep for M-LINK 2020-12-04 09:00:17 +01:00
Ben Lye 7bb1cb9ae3 Add STM32 EEPROM initialization at startup (#475) 2020-11-30 18:11:35 +01:00