Repository navigation
TX backpack: MAVLink over WebSocket for browser GCS (/mavlink-ws) - #253
Open
tecelskyyivan-alt wants to merge 1 commit into
Open
tecelskyyivan-alt wants to merge 1 commit into
tecelskyyivan-alt wants to merge 1 commit into
Conversation
…or browser GCS A phone browser can't do UDP; FMP on GitHub Pages opens /fmp-relay.html from the backpack as a window, which holds the WebSocket and relays bytes via postMessage. WS accepts only same-origin pages on an IP/.local host (or non-browser clients). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Implements #252.
Problem. A GCS running in a phone browser can't reach the TX backpack: browsers have no UDP, and iOS also has no Web Serial / Bluetooth / USB. Today that needs a PC relay (UDP 14550 ↔ WebSocket) or a native app.
Change (+126 lines, 3 files):
ws://<backpack>/mavlink-wson the existing async web server — the same MAVLink stream the backpack sends over UDP; uplink frames are buffered and forwarded fromloop().*.local) or clients without anOriginheader — a page on the internet can't drive the drone through the user's browser (tested against a foreign origin, direct GitHub Pages origin and a DNS-rebindingHost)./fmp-relay.html— a tiny page served by the backpack that bridgespostMessage↔ WebSocket, so an HTTPS web GCS can talk to the backpack on the LAN. Happy to drop or rename it if you prefer to keep only the WebSocket endpoint.Tested
ESP_TX_Backpack_via_WIFI(RAM 56.9 %, flash 45.0 %) andESP32C3_TX_Backpack_via_WIFI(flash 49.2 %) from this branch.Note: the minifier in
build_html.pyjoins lines, so inline JS in the relay page uses only/* */comments.🤖 Generated with Claude Code
https://claude.ai/code/session_01MaS8egFpf1KPbdxjkDQx6D