Skip to content

Conversation

@pkendall64
Copy link
Collaborator

  1. Refactors the BF TCPSocket implementation to a CRSFConnector, this also makes the TCP connection much more reliable in my testing.
  2. Refactor common RX/TX code for telemetry from into the CRSFParser; now completely removing the old telemetry.cpp/h files.
  3. Extracts a bunch of code from tx_main.cpp loop() to the HandleUARTIn() function and introduces a TXUSBConnector for mirroring incoming broadcast CRSF messages to the USB. See image below of the CRSF-Tester
  4. Add method to the CRSFRouter to allow the delivery of messages to a connector with a known device attached.
    This removes the need to know about the specific connectors themselves.

Using the CRSF-Tester, you can connect a USB cable to the TX module, like the Ranger, Nomad etc, while it's connected to a radio. Select "USB Device" and connect.
Screenshot 2025-10-31 at 9 11 52 AM
After that you can see the telemetry information on the tester app from the FC. You can also query the parameters and make changes from both the TX module and the RX.
Screenshot 2025-10-19 at 2 20 22 PM

@wimalopaan
Copy link

Looks really great!!!

Why restrict the device ID to FC (0xc8) and some others. Since ELRS V4 can route extended messages to all possible device IDs, one should also be able to connect to those via CRSF-Tester.

@wimalopaan
Copy link

Would it also be possible to use EdgeTx USB-passthru?

@pkendall64
Copy link
Collaborator Author

Looks really great!!!

Why restrict the device ID to FC (0xc8) and some others. Since ELRS V4 can route extended messages to all possible device IDs, one should also be able to connect to those via CRSF-Tester.

Because I couldn't be bothered with a text/combo box for my initial go at testing. This will likely evolve.

Would it also be possible to use EdgeTx USB-passthru?

No, because theres only one UART connected from the internal module to the radio.

Copy link
Member

@CapnBry CapnBry left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I missed a couple apparently, and sorry for complaining about the mavlink switch-- turns out that issue was in master as well when using the USB port.

Copy link
Member

@CapnBry CapnBry left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tested the TcpMspConnector with Betaflight 4.5.2 and the desktop configurator, and Rotorflight 2.2.1 configurator. Seems to work as well as it did before, which is mostly unusable. RF is the most stable but often disconnects and is slow to load tabs. BF will often disconnect but then their whole side is hung-- you can't even connect over USB any more.

Telemetry is still being routed where it needs to go, pings go all over, device_info comes back. So it seems routing is working as well as before. USB doesn't flip into mavlink mode when sending it CRSF data. CRSF-Tester over USB can ping and load the lua parameters, but not change one, nor can I send channels over USB, but that's not what this PR is about.

A lot of work here, thanks for improving all this!

# Conflicts:
#	src/src/tx_main.cpp
Copy link
Contributor

@mha1 mha1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Device pings works as expected, detects RF FC (4.5.1/2.21)
TCP connection to RF FC (4.5.1/2.21) works but as usual slow and disconnects sometimes
Telemetry including external telemetry via HoTT works
CRSF Tester connected to TX via USB works (Windows: connected USB after module is powered and RX connected)

@CapnBry CapnBry merged commit c5b56ab into ExpressLRS:master Nov 12, 2025
25 checks passed
@pkendall64 pkendall64 deleted the next/tx-usb-crsf branch December 6, 2025 19:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement 🪄 New feature or request V4.0 🍔

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants