Skip to content

Broadcast VRx-initiated channel changes over ESP-NOW - #242

Open
bob9 wants to merge 1 commit into
ExpressLRS:masterfrom
bob9:goggle-channel-broadcast
Open

Broadcast VRx-initiated channel changes over ESP-NOW#242
bob9 wants to merge 1 commit into
ExpressLRS:masterfrom
bob9:goggle-channel-broadcast

Conversation

@bob9

@bob9 bob9 commented Aug 16, 2026

Copy link
Copy Markdown

Summary

When the goggles send MSP_ELRS_BACKPACK_SET_CHANNEL_INDEX (0x0301) up the UART (e.g. HDZero goggles "Send VTX" / a channel change made on the goggles), the VRX backpack currently drops it — the UART dispatch in MSPModuleBase::Loop only handles SET_MODE, GET_VERSION, GET_STATUS and SET_PTR.

This PR forwards it over ESP-NOW as MSP_SET_VTX_CONFIG (89), the opcode peers already act on over the air:

  • VRX backpacks in the bind group retune their goggles (existing MSP_SET_VTX_CONFIG handling in Vrx_main.cpp).
  • TX backpacks already pass MSP_SET_VTX_CONFIG from a peer straight to the handset (ProcessMSPPacketFromPeer in Tx_main.cpp, added in Enable MSP_SET_VTX_CONFIG ESP-NOW input message #95), so VTX admin can follow the goggle channel and retune the quad's VTX.

No TX-side changes are required.

Details

  • Only acts on MSP_PACKET_COMMAND packets with a valid 48-entry table index (payload[0] < 48).
  • 0x0301 is a UART-only opcode and is dropped as unknown by ESP-NOW receivers, hence the re-packaging as MSP_SET_VTX_CONFIG rather than forwarding the packet as-is.
  • No echo/loop risk: the goggles send no response to 0x0301, a sender does not receive its own ESP-NOW transmission, the TX backpack's peer handler forwards to Serial only (does not rebroadcast), and VRX receivers dedup an unchanged channel index.

Testing

Tested with HDZero Goggles 2 (VRX backpack) + RadioMaster Boxer (TX backpack): changing channel on the goggles updates the other bound goggles and the handset's VTX admin channel.

When the goggles send MSP_ELRS_BACKPACK_SET_CHANNEL_INDEX (0x0301) up the
UART (HDZero "Send VTX" / channel follow), the VRX backpack previously
dropped it - the UART dispatch only handled SET_MODE, GET_VERSION,
GET_STATUS and SET_PTR.

Forward it via ESP-NOW as MSP_SET_VTX_CONFIG (89), the opcode peers act
on over the air: VRX backpacks in the bind group retune their goggles,
and TX backpacks already pass it to the handset (ProcessMSPPacketFromPeer),
enabling VTX admin to follow the goggle channel.

Guarded to command packets with a valid 48-entry table index. No echo
risk: the goggles send no response to 0x0301, the sender does not receive
its own ESP-NOW broadcast, and receivers dedup an unchanged channel.
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.

1 participant