Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support ELRS on T8SG V2 Plus #1038

Open
albfan opened this issue Apr 16, 2023 · 10 comments
Open

Support ELRS on T8SG V2 Plus #1038

albfan opened this issue Apr 16, 2023 · 10 comments

Comments

@albfan
Copy link

albfan commented Apr 16, 2023

From this closed PR #1009, looks like at least from 4Jan 2022, ELRS (Express LRS) is supported out of the box.

Since last firmware availiable from T8SG V2 Plus are from 2021:

https://www.deviationtx.com/downloads-new/category/2830-2021-06-11

wonder if this feature is really supported but there's no firmware available.

So I build from sources the firmware using docker:

https://www.deviationtx.com/wiki/development/docker

NOTE1: I tried using podman but start do not do anything
NOTE2: I need to give correct permissions to volumen using :z

docker pull deviationtx/deviation-docker
mkdir devo_builds
docker create -it -v $PWD/devo_builds:/release:z --name deviation_build deviationtx/deviation-docker
docker start -it deviation_build

After succesfully build ( I disable default and emu_default, just enable t8sg_v2_plus)

I upload firmware on device.

As far as I know, ELRS needs to use CRSF (right) but nothing happens on modules.

I use R9M and R9MX (flashed with ELRS 3.2.0, with passhphrase, so not bind is needed):

image

but nothing happens on transmitter and receiver (transmitter blinks red and green) while receiver blinks red.

To confirm if I did something wrong, I flash a flysky fs-i6x with a modified opentx:

https://github.com/OpenI6X/opentx/releases/tag/openi6x-1.9.0

and after configure external module to CRSF, transmitter stays in green and receiver stays in green and red led.

Connecting to betaflight I can see receiver tab correctly update axis info:

image

So asking for help:

  • Is CRSF the protocol to use (I read something about PXX, but probably for non ELRS versions)
  • Should I build with some special flags to support ELRS?
  • As I read OOTB support for ELRS 2.0, should I downgrade R9M from 3.2.0 to 2.x?
  • I see only an option on t8sg CRSF options (a model1) should I add something else on usb disk of t8sg to support ELRS (like a lua script or similar). In this video https://www.youtube.com/watch?v=JSO6F_EDtoY the external module shows correctly an option for module attached (Happy model)
  • Any procedure to upload valid firmwares for t8sg (nightly feels really risky) Here my latest one:
    deviation-t8sg_v2_plus-v5.0.0-408f8c0.zip
@hexfet
Copy link
Contributor

hexfet commented Apr 23, 2023

I replied to your post on the DeviationTX forum before looking here. 408f8c0 is the latest and does support CRSF and ELRS in particular.
A hardware mod is needed on the t8sg - details in the user manual protocols chapter.

However I think there may be an issue with the R9M. Deviation outputs a non-inverted signal on the pin used for CRSF. Since the R9M is from Frsky it probably expects an inverted signal. Can you check what the s.port pin looks like with the fs-i6x?

@albfan
Copy link
Author

albfan commented Apr 24, 2023

I tried your nightly build and looks the same as my local build. As commit is the same I just can tell by this menu on CSRF:

crsf-protocol.jpg.jpg

Anyway I install from your nightly https://www.deviationtx.com/downloads-new/category/2881-hexfet-nightly-build?download=47857:deviation-t8sg-v2-plus-v5-0-0-408f8c0-zip

But other videos I see around show the correct external module connected (with name not this model 1).

The hardware mod I think is related with connect t8sg pin1 with s.port. I did it temporarily this way:

r9m-t8sg-conn.jpg.jpg

but R9M keeps blinking red and green.

On frsky fs-i6x it stays green, and receiver stays green and red at same time.

Some details about the ports on R9M transmitter internals (I think GND, 5V and s.port are the same)

R9m-internal-port.jpg

r9m-external-por.jpg

As said, I can build and make test (hardware and software) somehow I'm missing something but not sure what

@hexfet
Copy link
Contributor

hexfet commented Apr 24, 2023

I think it must be that the R9M expects an inverted signal. The t8sg can only output a non-inverted signal. On ESP32-based tx modules the ELRS configurator provides a checkbox for selecting inverted or non-inverted input. That option is not available for the R9M.

@albfan
Copy link
Author

albfan commented Apr 24, 2023

Wonder if I can put a hardware inverter

https://www.team-blacksheep.com/products/prod:qx7mod

It says 3.3V. is there any similar inverter with 5V?

Could the flag UART_INVERTED in express les solve that by software?

https://www.deviationtx.com/forum/protocol-development/8868-expresslrs#77217

@albfan
Copy link
Author

albfan commented Apr 25, 2023

I tried a homemade inverter (with bc337 no transistor but doesn't work)

I found this hardware mod for r9m

https://www.rcgroups.com/forums/showpost.php?p=46673237&postcount=194

r9m-mod-uninvert-signal.jpg

Can confirm It works.

@hexfet Is It expected some progress on CRSF menu? Now it only shows 3 empty rows and a 4th row with "model1"

@albfan
Copy link
Author

albfan commented Apr 25, 2023

Just in case, a screenshot of t8sg s.port mod

t8sg-s.port-external-mod.jpg

@hexfet
Copy link
Contributor

hexfet commented Apr 27, 2023

The s.port mod looks fine. I don't know about the R9M mod. What do you mean by "it works"?

If no ELRS items appear (just the model name) then it means that Deviation is not receiving data from the module. If you select the "model1" line you can change the baud rate to see if that makes any difference. Do you have a logic analyzer or oscilloscope to look at the signal directly?

@albfan
Copy link
Author

albfan commented Apr 28, 2023

What do you mean by "it works"?

Looks the R9M mod left the signal uninverted, so t8sg correctly send axis and switches

If no ELRS items appear (just the model name) then it means that Deviation is not receiving data from the module

Yes I have a logic analyzer, (saleae with pulseview) any specific samplerate and decoder to capture? if there's any guide or tutorial on forum didn't find it

@hexfet
Copy link
Contributor

hexfet commented Apr 29, 2023

So the control link works, but not the menu? Are you receiving telemetry data on the telemetry test page?

I usually capture at 20MHz and use the serial decoder. No tutorial but just need the one signal line (s.port pin) and ground. Start the capture, turn on the t8sg, navigate to the protocol options. That should be enough.

@albfan
Copy link
Author

albfan commented Apr 30, 2023

No I don't even see telemetry.

Thanks for the tips, will create the capture and upload

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

No branches or pull requests

2 participants