[SOLVED] - MultiModule Trainer Problem on X9D Plus

erskyTx runs on many radios and upgrade boards
ersky9x was a port of er9x for use on the sky9x board.
Post Reply
MRC3742
Posts: 7
Joined: Sat Mar 13, 2021 5:01 am
Country: -

[SOLVED] - MultiModule Trainer Problem on X9D Plus

Post by MRC3742 »

I am trying to use the X9D Plus with MultiModule wireless trainer option via CPPM hardware mod on heartbeat pin 2 of Module Bay.
https://github.com/pascallanger/DIY-Mul ... _HW_Mod.md

I can get it to work, but only if the Internal Module is originally turned off at TX startup.
After the external MPM initializes (with both green and red LED's lit) you can turn on the Internal Module and it will work.
Shutting the TX off and restarting causes the MPM red LED to flash rapidly ( 1second )then a slower flash (1 second ) then goes out.
Next the green LED lights but the red LED stays off.
Turning off the external module or changing options (PPM, XJT, DSM, MULTI, etc) causes just the green LED (after the red flashes) to remain lit.
I have tried various settings including disabling telemetry but It seems the only way is to shut off the internal, restart TX, turn back on internal.
Am I missing some setting causing this problem or is the internal module somehow preventing the MPM to start properly?

I have tried various versions of erskyTx (R233-b2, R223-a8, R223-a2, R222-d7) with the same results.
I am using MPM version 1.3.2.58 on DSM Rx, CPPM
I have tried two different external MPM's with same results ( IRX4+ and Jumper-v2 )

Thanks - Rich

:!: EDIT: This problem has been solved with modifications to the MPM code (versions 1.3.2.61 and higher)
Last edited by MRC3742 on Sun Mar 14, 2021 6:23 pm, edited 1 time in total.

User avatar
MikeB
9x Developer
Posts: 17990
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: MultiModule Trainer Problem on X9D Plus

Post by MikeB »

I saw something like that happen in early testing, but I didn't associate it with starting with the internal module on. I'll do some testing later today.

Mike
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
planger
Posts: 90
Joined: Mon May 04, 2015 10:50 am
Country: France

Re: MultiModule Trainer Problem on X9D Plus

Post by planger »

Is it only happening with a RX protocol in CPPM mode?
Is the trainer radio powered on?
I've tried multiple times on a TX16S running OpenTX with DSM/FrSky/AFHDS2A RX with CPPM selected but no trainer radio transmitting and I can't reproduce this behavior...
User avatar
MikeB
9x Developer
Posts: 17990
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: MultiModule Trainer Problem on X9D Plus

Post by MikeB »

I just tried with Flysky selected (not receive) and the MPM fails with the red LED off if the internal module is enabled. Repeated the test with a standard module (no hardware CPPM mod) and the red LED ends up off if the internal module is enabled. Same thing with another module that has 1.3.1.77 on it, if the internal module is enabled the red LED flashes fast a few times, then slower a few times, then goes off.

Mike
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
MRC3742
Posts: 7
Joined: Sat Mar 13, 2021 5:01 am
Country: -

Re: MultiModule Trainer Problem on X9D Plus

Post by MRC3742 »

I just reloaded OpenTX 2.3.11 and the same thing happens if both internal and external are selected at startup.
The red LED goes through the startup sequence but is out after the green LED lights.

With only the MPM selected at startup the same LED sequence occurs except after the green LED lights the red flashes twice quickly and then turns solid red. It seems that the Sport pin being active from the internal XJT is causing the MPM not to initialize properly?

OpenTx does not have "Master/CPPM Module" currently available yet with the external module selected so I am unable to test the trainer function using the #2 heartbeat pin.

Not sure if its relevant but my internal XJT is on firmware version 2.1.0

Rich

planger
Posts: 90
Joined: Mon May 04, 2015 10:50 am
Country: France

Re: MultiModule Trainer Problem on X9D Plus

Post by planger »

Hummm, so the internal module playing with the SPort pin... It's why I can't reproduce the issue since the TX16S does not have this kind of shared telem pin problem...
MRC3742
Posts: 7
Joined: Sat Mar 13, 2021 5:01 am
Country: -

Re: MultiModule Trainer Problem on X9D Plus

Post by MRC3742 »

I just flashed the internal XJT to version 1 D16 ACCST (170317) with the same not working results.

Rich
planger
Posts: 90
Joined: Mon May 04, 2015 10:50 am
Country: France

Re: MultiModule Trainer Problem on X9D Plus

Post by planger »

If you can compile the Multi code by yourself, can you try to disable telemetry in the _config.h file: //#define TELEMETRY
planger
Posts: 90
Joined: Mon May 04, 2015 10:50 am
Country: France

Re: MultiModule Trainer Problem on X9D Plus

Post by planger »

I'm thinking the RX interrupt of usart3 is triggered before I disable it so it loops there for ever...
planger
Posts: 90
Joined: Mon May 04, 2015 10:50 am
Country: France

Re: MultiModule Trainer Problem on X9D Plus

Post by planger »

Could you try v1.3.2.60 from here: https://downloads.multi-module.org/latest-test/
(I don't have a FrSky radio to test myself...)
MRC3742
Posts: 7
Joined: Sat Mar 13, 2021 5:01 am
Country: -

Re: MultiModule Trainer Problem on X9D Plus

Post by MRC3742 »

Just tried 1.3.2.60 with same results on OpenTx and erskyTx (with or without //#define TELEMETRY)

Compiling with //#define TELEMETRY also causes a no start with both modules as before but with just the external MPM selected now the red LED flashes slowly after the green LED lights.
Compiling with #define TELEMETRY both LED's flash the same as previous build

Rich
User avatar
MikeB
9x Developer
Posts: 17990
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: MultiModule Trainer Problem on X9D Plus

Post by MikeB »

Check the post I just made here: https://www.rcgroups.com/forums/showpos ... ount=21697.
This seems to work.

Mike
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
MRC3742
Posts: 7
Joined: Sat Mar 13, 2021 5:01 am
Country: -

Re: MultiModule Trainer Problem on X9D Plus

Post by MRC3742 »

I've patched your code listed to the Telemetry.ino file
Compiled with the #define TELEMETRY enabled and the MPM will now initialize and work with both modules on and then a TX restart.
The trainer function now works correctly with one little problem I've noticed.

If the disable telemetry is checked on the External MPM all works. (Maybe this is the correct setting)
If disable telemetry is unchecked then it shows the MPM version as expected but every second or so the "Protocol" and "type" fields show random characters then back and forth to the protocol selected. This stops once the student radio is turned on and transmitting to the MPM. Then all fields show the correct names.
Not sure if this is a problem or something that is expected if the MPM telemetry is turned on?

Thank You for all of your help (and Pascal) on this problem - Rich
User avatar
MikeB
9x Developer
Posts: 17990
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: MultiModule Trainer Problem on X9D Plus

Post by MikeB »

That is expected unless telemetry is turned off. The internal module is using the SPort signal for telemetry, so anything from the MPM, such as the protocol name, is likely to get corrupted. The MPM also corrupts the internal module telemetry.
This is why we need CPPM in the first place.

Mike
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
planger
Posts: 90
Joined: Mon May 04, 2015 10:50 am
Country: France

Re: MultiModule Trainer Problem on X9D Plus

Post by planger »

Thanks guys for the feedback.
Can you test the latest code .61 on GitHub?
I think the best is to never enable the RX neither the interrupt in the first place which is what I've done now.
Completly untested as I have to run to pickup the kids.
Pascal
MRC3742
Posts: 7
Joined: Sat Mar 13, 2021 5:01 am
Country: -

Re: MultiModule Trainer Problem on X9D Plus

Post by MRC3742 »

Tested on X9D+ running erskyTx R233-B2, XJT v2.1.0, External IRX4+ MPM v1.3.2.61 using DSM Rx, CPPM

Both modules start on TX restart and Trainer function is working using CPPM.
Telemetry needs to be disabled on external MPM options in order to prevent both modules communicating on the same pin.

Pascal could telemetry be disabled in the code if the CPPM subprotocol is selected?
Not really necessary but could simplify setup and prevent future setup issues.

Thanks Again - Rich
planger
Posts: 90
Joined: Mon May 04, 2015 10:50 am
Country: France

Re: MultiModule Trainer Problem on X9D Plus

Post by planger »

Hi Rich,
Great that this solution finally works.
OpenTX relies completely on the multi telemetry to display protocols. If I disable it, it will break the selection...
I'll update the doc since I don't think I've indicated that you have to check the disable telemetry box when you are done with the setup.
Thanks, Pascal
planger
Posts: 90
Joined: Mon May 04, 2015 10:50 am
Country: France

Re: MultiModule Trainer Problem on X9D Plus

Post by planger »

FYI, I've released 1.3.2.61 and updated the doc.
Last edited by planger on Sun Mar 14, 2021 6:20 pm, edited 1 time in total.
MRC3742
Posts: 7
Joined: Sat Mar 13, 2021 5:01 am
Country: -

Re: MultiModule Trainer Problem on X9D Plus

Post by MRC3742 »

The doc updates should be sufficient. (If anybody reads them?) :lol:
I'll mark this problem as "SOLVED"

Thanks to Pascal and Mike for solving this problem - Rich

Post Reply

Return to “erskyTx (was ersky9x)”