EdgeTX / edgetx

EdgeTX is the cutting edge open source firmware for your R/C radio
https://edgetx.org
GNU General Public License v2.0
1.56k stars 332 forks source link

External R9M ACCESS module does not transmit channel information in f.port mode (telemetry works) #1585

Closed Zaquron closed 1 year ago

Zaquron commented 2 years ago

Describe the bug Coming from OTX 2.3.14, i installed EdgeTX 2.6 with externalaccessmod and RC output disappeared from the receiver. When the receiver is connected, the channel data sometimes refreshes once and stays there until turned off. Moving the sticks does not change the channel outputs. Telemetry always works fine.

To Reproduce -install EdgeTX 2.6.0

Expected behavior RC channels should work through f.port

Screenshots

General information

Checked 3 times now, the whole setup works fine on OpenTX. tested with - flex mode (868MHz) with R9MX receiver

*edited for clarity

brainbubblersbest commented 2 years ago

F.port is only a thing that happens between hf module and receiver. Hf module communication with Radio is the same as with sbus s.port configuration. Are you shure that there is nothing wrong between receiver and flightcontroller? Which FC Do you use and how have you connect the receiver with it.

Zaquron commented 2 years ago

F.port is only a thing that happens between hf module and receiver. Hf module communication with Radio is the same as with sbus s.port configuration. Are you shure that there is nothing wrong between receiver and flightcontroller? Which FC Do you use and how have you connect the receiver with it.

The FC is a Mateksys F411 wing. It's connected to the R9MX receiver through a serial TX pin. I went back to OTX and everything works. There was no change in hardware or receiver side firmware in any way, that's why i think this is an EdgeTX bug.

brainbubblersbest commented 2 years ago

I just like to request that you double checked This. 😉 Can you Check your Externalaccessmod wiring? This is also a clear indication for Malfunctioning Inverter. (can be possible) TX to Module Bay Pin 1. Pin 2 is for Telemetry.

You dont have a Scopemeter layin around somewhere? Or an old Accst Module and Receiver? 😅

Zaquron commented 2 years ago

I'll recheck wiring tomorrow, but pretty sure it wouldn't work on OTX if it was a hardware issue. I happen to have an oscilloscope, but no serial analizer. What should i check? I could flash the module with ACCST but i don't have a compatible receiver so i can't test that.

brainbubblersbest commented 2 years ago

You need no Serial analyzer. Oscilloscope is enough. Check rx tx Pins in the Bay. (With r9m connected and running.) Signal should Look clean and sharp. Maybe there isnt even a Signal on tx. (pin1)

Every measurement thats done is good for bugtracking 😉

Zaquron commented 2 years ago

I did a few measurements. If by pin1 you mean the top pin, then there is a signal on that one. (running OTX or EdgeTX) It does not look clean and sharp, but looks just like the signal i measured under OTX IMG_20220220_104915 .

scooper1 commented 2 years ago

That looks horrible. The levels are not consistant. Try a higher sample if available on scope

Zaquron commented 2 years ago

pin5 (the bottom one right under GND) looks like this: IMG_20220220_104750

Zaquron commented 2 years ago

well, it's a very basic and cheap scope... Why does it work on OpenTX though?

brainbubblersbest commented 2 years ago

The s.port Signal Looks good. The Signal on pin1 does not. Idk why it works with opentx. Maybe @rotorman can say something about that. (different processing or else) I wouldnt Trust that it will work reliable with opentx for long time. You can change module type to ppm to Check if you can Pick up a good Signal here. And you can compare the Signal on pin2 with pin 1 to figure out if it's a speed limit issue of your scope

Another idea would be to solder in an external inverter like on x10/x12. These are tested on 400k Baudrates.

rotorman commented 2 years ago

@Zaquron can you show some pics of your hw-mod you did? The waveform in https://github.com/EdgeTX/edgetx/issues/1585#issuecomment-1046208365 looks pretty distorted to me.

Zaquron commented 2 years ago

hwmod Connections look ok to me, but there is definitely a hardware issue here. When i connect the probe to pin1, the module loses telemetry even on OpenTX. Now i have no idea how to fix this. :(
Changing mainboard is beyond my budget.

Zaquron commented 2 years ago

BTW just came back from the field where i had 2 flights on OpenTX. Not a single glitch,

rotorman commented 2 years ago

On the USART3 header to the left of main STM32F4, I cannot clearly see from the image if the TX and RX wires connect or not - also flux should be washed off with PCB cleaner, as it is not only corrosive, but also lightly conductive.

Nevertheless, if with the same radio OpenTX firmware works OK, then there must be a software issue somewhere. I do not have R9M myself to test though.

Can you measure the top pin (PPM/SBUS of JR-bay) once more under OpenTX and under EdgeTX to see if you can spot a difference in the waveform?

Zaquron commented 2 years ago

Resoldered and cleaned off flux: hwmodcleanedup

Waveform on EdgeTX edgetx

Waveform on OpenTX opentx

rotorman commented 2 years ago

Your solder job looks good, the waveforms look the same on OpenTX and EdgeTX, although both have very rounded corners. Hmm... would you have a logic analyzer, like Saleae, to check if the data stream from the radio is also similar?

Zaquron commented 2 years ago

Sorry, i don't have a logic analyzer.

Zaquron commented 2 years ago

Did anyone ever measure this with an oscilloscope? Maybe it's the same mess in every transmitter.

rotorman commented 2 years ago

I had a look at TX16S schematics and accessmod and I think it might work better without the following two highlighted components - remove only if you are adventurous enough:

grafik

grafik

Zaquron commented 2 years ago

I have a damaged mainboard (battery charge control circuit went up in smoke) so i might give this a try. Does this affect anything else?

brainbubblersbest commented 2 years ago

Did anyone ever measure this with an oscilloscope? Maybe it's the same mess in every transmitter.

I only measured the waveform with th external Inverters on x12s. And ive done that with a fluke/philips pm97

rotorman commented 2 years ago

Does this affect anything else?

Removing the two components listed affects only the external RF-module.

Zaquron commented 2 years ago

I did a little experiment. Changed the main PCB to the old one and did the suggested modification. Signal still looks like this:

oldPCB

IMHO this is a software problem. Can someone please take a look at the code?

ViorelX commented 2 years ago

I have the same problem: T18 radio with R9M, which works fine in OpenTX, but it doesn't work in EdgeTX (only telemetry is transmitted.)

Zaquron commented 2 years ago

Is there any chance someone with the skills will take a look at this? Please?

brainbubblersbest commented 2 years ago

I would Do this. But I dont have access to a RM TX16S.

ViorelX commented 2 years ago

The problem might be not specific to RM TX16s. I have Radioking T18.

brainbubblersbest commented 2 years ago

Yes. First Post was rmtx16s. I only have a X12s with additional Inverters. And for me everything works.

raphaelcoeffic commented 2 years ago

@Zaquron is that only with F.PORT output, or in general with this module? @brainbubblersbest can you please confirm: your R9M ACCESS works properly on the X12S with external access mod & edgetx?

brainbubblersbest commented 2 years ago

I will Look into that this evening.

Raphael Coeffic @.***> schrieb am Di., 22. März 2022, 23:47:

@Zaquron https://github.com/Zaquron is that only with F.PORT output, or in general with this module? @brainbubblersbest https://github.com/brainbubblersbest can you please confirm: your R9M ACCESS works properly on the X12S with external access mod & edgetx?

— Reply to this email directly, view it on GitHub https://github.com/EdgeTX/edgetx/issues/1585#issuecomment-1075726017, or unsubscribe https://github.com/notifications/unsubscribe-auth/ALPVHWMWXVVAJT6MESPSMYTVBJEYLANCNFSM5OHQYAKA . You are receiving this because you were mentioned.Message ID: @.***>

Zaquron commented 2 years ago

@Zaquron is that only with F.PORT output, or in general with this module?

I'll check as soon as i can find some time to experiment

brainbubblersbest commented 2 years ago

IMG_20220324_064928 IMG_20220324_070004 The one with Radio is communication between Radio-module. The other one is communication between FC-receiver, where yellow is sbus and blue is s.port. I get vbat from fc and rxbatt from receiver.

In inav configurator i get only fixed channels. No Matter what i try to set in the cli. Seems to be fixed channels from failsafe. Even if I set it to no pulses.

I have old sbus s.port config over two separate uarts from the fc.

brainbubblersbest commented 2 years ago

16481020727077405467391590749099 Input and outputs are defined in edgetx. Values are changing in channel Monitor on Radio.

brainbubblersbest commented 2 years ago

I try to figure out the last working build after come home from work. Dont know the last compiled version working with r9m in access. I always need to self compile it.

raphaelcoeffic commented 2 years ago

@brainbubblersbest ok, so same for you: connection seems alright (telemetry is coming, etc), but channels values are "fixed" and do not move.

brainbubblersbest commented 2 years ago

Yes. And Signal looking pristine. I can check with logic analyzer tho.

brainbubblersbest commented 2 years ago

Checked with dc setting again. Looks good.

IMG_20220324_074127 I even can See a change in a specific wave when i change the throttle channel. (Radio<->Module)

brainbubblersbest commented 2 years ago

@raphaelcoeffic Do you have a good scope Signal from access uart communication as it should be? It came to my mind that this Digital Signal on TX Contact is acting like ppm or cppm on that Single wave Form.

That would be weird?

Can this be True? 🤔

ViorelX commented 2 years ago

Today I checked if the channel data is transmitted in S.Bus & S.Port mode. No, it doesn't work in EdgeTX, only in OpenTX.

raphaelcoeffic commented 2 years ago

Thx! I will have a look then. Something must be fishy. I don‘t have any access capable external module, nor do I have the external access mod, but let‘s see if I can uncover something.

brainbubblersbest commented 2 years ago

Found the protocols on opentx github. Here is some short Video from the Signal, when moving the right Stick. (mode2) Dropbox scope output

It's not ppm 🙈

brainbubblersbest commented 2 years ago

@raphaelcoeffic this seems related: https://github.com/EdgeTX/edgetx/issues/260#issuecomment-987870988

brainbubblersbest commented 2 years ago

aaand: can copy the exact behaviour as descripted. F.port and sbus/s.port works. Channels in the FC. Full Telemetry in the Radio

But only under setting "fcc" 915/868/eu" wont work.

I´m using flex Firmware, so i should be able to choose what i want.

raphaelcoeffic commented 2 years ago

@brainbubblersbest ok, so let me summarise:

brainbubblersbest commented 2 years ago

Yes checked that again. All True. I can try to record 915/868/eu/fcc with logic analyzer. If that is somehow helpfull.

pfeerick commented 2 years ago

@brainbubblersbest I finally ordered a FrSky R9M 2019 /w R9MX receiver + a R9SX receiver so I can work on the FLEX UI stuff, so may also be able to help with this... (and/or will be asking you how to get started with it! :grin:) Will probably be a couple weeks before it arrives though.

raphaelcoeffic commented 2 years ago

@brainbubblersbest I finally ordered a FrSky R9M 2019 /w R9MX receiver + a R9SX receiver so I can work on the FLEX UI stuff, so may also be able to help with this... (and/or will be asking you how to get started with it! 😁) Will probably be a couple weeks before it arrives though.

You’ll need external access mod as well ;-)

Zaquron commented 2 years ago

Any news on this? I'm itching to use EdgeTX but can't until it's fixed.

brainbubblersbest commented 2 years ago

@pfeerick can you take a close Look into this please? I know from a few users go back to opentx because of the non full working r9access function in edgetx. (inav /fixed wing /frsky group.

Please Tell me if I can help you somehow.

MomoRC-tech commented 2 years ago

Working fine in my case with: a) TX16s, R9M 2019 (ACCESS), R9MX, MAMBA APP F722, INAV 3.0.1. b) as a), but with Matek stack in flying wing edgetx 2.7.1 cmake -Wno-dev -DPCB=X10 -DPCBREV=TX16S -DDEFAULT_MODE=2 -DGVARS=YES -DPPM_UNIT=US -DHELI=NO -DLUA=YES -DHARDWARE_EXTERNAL_ACCESS_MOD:BOOL=ON -DCMAKE_BUILD_TYPE=Release ../