Skip to content

software: add an RX as TX page - #557

Draft
MUSTARDTIGERFPV wants to merge 1 commit into
ExpressLRS:masterfrom
MUSTARDTIGERFPV:rx-as-tx
Draft

software: add an RX as TX page#557
MUSTARDTIGERFPV wants to merge 1 commit into
ExpressLRS:masterfrom
MUSTARDTIGERFPV:rx-as-tx

Conversation

@MUSTARDTIGERFPV

Copy link
Copy Markdown
Member

Closes #413.

RX-as-TX is offered in the Configurator but has no page on the site. The only mentions are one clause on the AirPort page ("RX modules (or those flashed using RX-as-TX)") and the SIYI FM30 section, which describes a different and older STM32 STLink method that is easy to mistake for this feature. The new page calls that difference out.

Adds software/rx-as-tx.md under Software > Features, plus the nav entry.

Verified against the build tooling

I took the constraints from the code rather than from the pull request description, and they line up.

src/python/binary_configurator.py:

if config['platform'].startswith('esp32') or config['platform'].startswith('esp8285') and args.rx_as_tx == TXType.internal:
    file = file.replace('_RX', '_TX')
else:
    print("Selected device cannot operate as 'RX-as-TX' of this type.")
    print("ESP8285 only supports full-duplex internal RX as TX.")
    exit(1)

Python precedence makes that esp32 OR (esp8285 AND internal), so ESP32 gets both types, ESP8285 gets internal only, and everything else including STM32 is rejected.

The Configurator applies the same rule independently, in TargetUserDefinesFactory.ts, offering ['internal', 'external'] for esp32 and ['internal'] for esp8285.

src/python/UnifiedConfiguration.py adds a constraint that is not in the pull request description at all:

if 'serial_rx' not in hardware or 'serial_tx' not in hardware:
    sys.stderr.write(f'Cannot select this target as RX-as-TX\n')
    exit(1)
if rx_as_tx == TXType.external and hardware['serial_rx']:
    hardware['serial_rx'] = hardware['serial_tx']

So the target layout must define both pins, and external is implemented by collapsing RX onto the TX pin, which is what makes it half duplex on a single wire. The page explains it in those terms.

RX_AS_TX appears in EXPERT_MODE_USER_DEFINES in DeviceOptionsForm/index.tsx, so the page says Expert Mode has to be on before the option appears.

Version: the introducing commit is "Allow flashing an RX as a TX (#2826)", and git tag --contains gives 3.5.0 as the first release. The page says 3.5.0 rather than implying this is a 4.x feature.

Warnings

The page carries three, for the things that damage hardware or break rules: reduced power and cooling versus a real module, regulatory domain responsibility, and the JR bay supply voltage, which is battery voltage and will destroy a receiver fed directly from it.

Deliberately not included

No tested-device list and no specific output power figures. Neither can be established from the source, and both would need bench testing to state honestly.

Closes ExpressLRS#413.

RX-as-TX is offered in the Configurator but has no page. The only
mentions on the site are one clause on the AirPort page and the SIYI
FM30 section, which describes a different, older STM32 STLink method
and is easy to mistake for this feature.

Facts come from the build tooling rather than from the pull request
description:

- binary_configurator.py accepts esp32 for either type, esp8285 only
  for internal, and exits for anything else, so STM32 is out.
- The Configurator repeats the same gating in TargetUserDefinesFactory,
  offering internal and external for esp32 and internal only for
  esp8285.
- UnifiedConfiguration.py requires the target layout to define both
  serial_rx and serial_tx, and implements external by assigning
  serial_rx to the serial_tx pin, which is what makes it half duplex on
  a single wire.
- RX_AS_TX is listed in EXPERT_MODE_USER_DEFINES, so the option is
  hidden until Expert Mode is enabled.
- The feature first shipped in 3.5.0.

The page carries warnings for the things that damage hardware or break
rules: reduced power and cooling compared to a real module, regulatory
domain, and the JR bay supply voltage, which is well above what a
receiver tolerates.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Document "RX as TX" feature

1 participant