er9x and multi-protocol telemetry mod

er9x is the best known firmware. It has a superb range of features and is well supported by the community. Well worth trying out.
Timeless
Posts: 19
Joined: Sun Aug 09, 2020 9:29 pm
Country: -

Re: er9x and multi-protocol telemetry mod

Post by Timeless »

I also noticed someone seems to have found alternative soldering pads for the resistors that makes an even cleaner job.
2017-10-14_23.31.55.jpg
@Mike, it seems we posted at almost the same time :P

nvd07
Posts: 63
Joined: Sat Aug 15, 2020 8:45 am
Country: France

Re: er9x and multi-protocol telemetry mod

Post by nvd07 »

I think you nailed the issue...

I seemed to remember from this afternoon that the STM32 did idle at 'high voltage', but I checked again tonight to be sure.

First without changing anything to the MPM firmware - so still flashed with INV - it idles at high voltage:
OriginallyFlashed_with_inv.png
Next, from what I understand of the issue with the 7400/7486 chip, I wanted to reflash the MPM with NOINV ( i.e. same as Timeless )... it still idles at high voltage !
Re-flashed_with_NOinv.png
I guess this is where we see that this Ytech MPM does not accept the inverting/noninverting flip done by the MPM firmwares...

I tried to open the cover of the MPM to look at the 7400/7486 chip markings but the cover does not open easily once the 2 screws are removed. I don't want to break anything so I backed off.

In the end does it mean I could still use this Ytech 4in1 MPM module with er9x , but only with the NOINV firmware flashed into the MPM, and also removing my inverting board/ rewiring my 9X Tx the same as Timeless' ? This is something I could do.
Timeless
Posts: 19
Joined: Sun Aug 09, 2020 9:29 pm
Country: -

Re: er9x and multi-protocol telemetry mod

Post by Timeless »

nvd07 wrote: Mon Aug 17, 2020 8:20 pm but the cover does not open easily once the 2 screws are removed. I don't want to break anything so I backed off.
With the iRangeX module there are retaining clips on one side, but they are easly dislodged at the right angle.
take a look at this video (at timestamp 0:59)
snapshot.JPG
Maybe yours is identical?
nvd07 wrote: Mon Aug 17, 2020 8:20 pm In the end does it mean I could still use this Ytech 4in1 MPM module with er9x , but only with the NOINV firmware flashed into the MPM, and also removing my inverting board/ rewiring my 9X Tx the same as Timeless' ? This is something I could do.
Correct me if I'm wrong, but the MPM does support the same FrSky telemetry right?
So eliminating the need for the dedicated FrSky transmitter, or does it provide better range?
nvd07
Posts: 63
Joined: Sat Aug 15, 2020 8:45 am
Country: France

Re: er9x and multi-protocol telemetry mod

Post by nvd07 »

Timeless wrote: Mon Aug 17, 2020 8:40 pm With the iRangeX module there are retaining clips on one side, but they are easly dislodged at the right angle.
take a look at this video (at timestamp 0:59)
snapshot.JPG
Maybe yours is identical?
Thank you for the video. Yes, so I managed to open the cover without breaking the plastic tabs.
IMG_20200818_193619.jpg
I could not find a 7400 / 7486 chip on my Ytech module but I have to confess I am unable to find it, when looking at the MPM schematics, I am lost ... Then one more attempt, from the STM32 DIY schematic https://github.com/pascallanger/DIY-Mul ... _Schematic I tried to look for a U301 which is a Dual Programmable Inverter and sounded it could have a similar function to a 7400/7486 to the mechanical engineer that I am, but I could not find it either on the Ytech board. So Ytech has yet a different routing, schematic and BOM. Maybe from this picture Mike will know which component is to blame if there is anything to blame at all...
Timeless wrote: Mon Aug 17, 2020 8:40 pm Correct me if I'm wrong, but the MPM does support the same FrSky telemetry right?
Yes if I manage to get the MPM to talk back to my TGY9X the way yours is doing, then the MPM module could replace my FrSky XJT module
Timeless wrote: Mon Aug 17, 2020 8:40 pm So eliminating the need for the dedicated FrSky transmitter, or does it provide better range?
Well, the reputation for good range is what attracted me first to FrSky when looking for a 2.4GHz module and receivers to replace my old Multiplex 41MHz module and receivers and still get decent range ( I fly old school RC models like sailplanes, slope gliding, they're large and far away sometimes ).
Then I got curious about openTx and the TGY 9X, I had to get them. Next, er9x.
Then a HK heli & Tx.
Then Spektrum AS3X receivers for my planes, so the multi-protocol module started to make sense.

In theory I suppose that if Ytech did everything right in their MPM, then the MPM range when talking to FrSky receivers could be as good as the FrSky XJT module range -- which in the end would allow me to ditch the XJT. But I have not made the XJT vs MPM comparison yet.
nvd07
Posts: 63
Joined: Sat Aug 15, 2020 8:45 am
Country: France

Re: er9x and multi-protocol telemetry mod

Post by nvd07 »

I have been working on this today, the goal was to try to replicate Timeless' success.
So i modified my wiring between the module bay and the M64.
I made a kind of a 'remote jumper', which is a small 3-socket servo connector I can access in the battery bay , and allows me to connect the Rx pin of the M64 , either to the inverting output of my NPN board, or upstream of it, to the pin of the module bay, so uninverted but through a 100 ohm resistor as Timeless is doing. So I will be able to change from inverting to uninverted , but without having to remove the screws and back of the case of the Tx.

First attempt, uninverted for the first time, and with the last firmware flashed yesterday in the MPM, so NOinv FW. Quick check with the scope: ok , basically the two probes are picking up the signal either sides of the 100 ohm resistor, no big surprises.
IMG_20200818_181058_no_more_inversions_just_a_100ohm_resistor.jpg

Next, a look at the debug screen when connected to FrsKy receiver : I did notice the packet counter increased slower than yesterday (when I was trying to get the Ytech MPM to invert, then inverting it back with my NPN). However nearly 100% of the packet are incorrect. No Tssi/Rssi. No module version in the lower right of the Protocol menu. :(

Last thing, I bound the MPM module to a FlySky AFHDS2A receiver, I did not have great hopes it would fix anything (especially as the MPM module version is not showing in the Protocol menu) but I wanted to try the same as Timeless as much as possible.
IMG_20200818_202942_no_more_inversions_just_a_100ohm.jpg
IMG_20200818_202929_no_more_inversions_just_a_100ohm.jpg
IMG_20200818_202959_no_more_inversions_just_a_100ohm.jpg
I played a bit with the 'option' , was able to try -126 but not -127, then 127 as above, but none of them changed anything.

How do they say ? ' Boy, this is one tough cookie ... ' ?


Unless I made a mistake, the only hardware or firmware difference between Timeless' and mine, is the brand of the MPM module... Maybe I should start to google the Ytech MPM module to see what the other users are saying.

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

Re: er9x and multi-protocol telemetry mod

Post by MikeB »

OK, I can see a couple of 5-pin devices labelled C86, which I think are the required XOR gates.
I think I have found the problem. Recently, the data being sent to the module has been extended to allow for more than 63 protocols (and more than 15 RxNums). The byte with this data in also has a bit that defines whether to invert the telemetry data or not, and er9x is always sending it as "No Inv".
If you can build the multi firmware, you may disable this by commenting the line:
#define INVERT_TELEMETRY_TX
in _config.h.
I could build a version of er9x for you to try where this forces "Inv" instead, are you flashing er9x-frksy.hex?
I'm thinking about how to handle this in general since in er9x, unlike the ARM processor based radios, this bit needs to be user selectable. I also need to handle the extended range of RxNums in er9x.

I'm still unhappy with the "No Inv" hardware connection regarding the voltage levels at the AVR Rx pin, the STM module connection doesn't drive it very well due to using diodes to make it a bi-directional signal, and only outputting 3.3V.

Mike
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
nvd07
Posts: 63
Joined: Sat Aug 15, 2020 8:45 am
Country: France

Re: er9x and multi-protocol telemetry mod

Post by nvd07 »

MikeB wrote: Tue Aug 18, 2020 7:23 pm OK, I can see a couple of 5-pin devices labelled C86, which I think are the required XOR gates.
Ok so I was too suspicious on Ytech !
MikeB wrote: Tue Aug 18, 2020 7:23 pm I think I have found the problem. Recently, the data being sent to the module has been extended to allow for more than 63 protocols (and more than 15 RxNums). The byte with this data in also has a bit that defines whether to invert the telemetry data or not, and er9x is always sending it as "No Inv".
So I take it this would explain why my MPM did not flip the signal when I flashed different FW (NOINV and INV) as shown in my ArduinoScope screenshots. But then noboby else would have any success in using this 'INV' FW option - I mean, other people would be complaining or will be complaining soon...
MikeB wrote: Tue Aug 18, 2020 7:23 pm If you can build the multi firmware, you may disable this by commenting the line:
#define INVERT_TELEMETRY_TX
in _config.h.
Never done it, but I looked at :
https://github.com/pascallanger/DIY-Mul ... g-firmware

And, as I have arduino IDE, I could have a shot at it, and learn some things doing it too!

MikeB wrote: Tue Aug 18, 2020 7:23 pm I could build a version of er9x for you to try where this forces "Inv" instead, are you flashing er9x-frksy.hex?
Thanks for the offer (and amazing support in general!) - I do not mean to create additonnal burden to you. I could go the MPM compiling route.
And I am still puzzled by the fact that Timeless' setup works fine whereas mine does not. Why would I need custom FW for the Tx or for the MPM whereas Timeless does not need custom FW. (Sorry if I am slow to understand this ).

Here is the last I flashed
success.png
MikeB wrote: Tue Aug 18, 2020 7:23 pm I'm thinking about how to handle this in general since in er9x, unlike the ARM processor based radios, this bit needs to be user selectable. I also need to handle the extended range of RxNums in er9x.
MikeB wrote: Tue Aug 18, 2020 7:23 pm I'm still unhappy with the "No Inv" hardware connection regarding the voltage levels at the AVR Rx pin, the STM module connection doesn't drive it very well due to using diodes to make it a bi-directional signal, and only outputting 3.3V.

Mike
So, for the long term goal, you would recommend I would aim to use the NPN inverting - where I get large swings of voltage - rather than the NonInverting path I added to my hardware ?

I am also thinking about the next stage where everything will be working great and I will start hacking into my recently acquired 2nd Tx which has the m128 chip...
Timeless
Posts: 19
Joined: Sun Aug 09, 2020 9:29 pm
Country: -

Re: er9x and multi-protocol telemetry mod

Post by Timeless »

Timeless wrote: Mon Aug 17, 2020 7:10 pm So long story short:
1. TSSI values seems incorrect.
2. Is there any logical documentation about the option value?
3. Is the debug firmware considered stable, or is it better to flash the latest normal build?
4. Is there a way to embed the telemetry (DEBUG) screen in the normal statistics?
5. display and asterisk when telemetry is received just like OpenTX does?
6. Is a slowly increasing error counter to be expected, or is this a no-go?
Sorry to repeat my findings, but my post on page[1] seems to be overlooked.
Mike do you have time to take a look at my findings? Thanks :)

Question 5 seems to be related to the voltage levels I guess, but this might be solved with a pull-up to 5v?
User avatar
MikeB
9x Developer
Posts: 17990
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: er9x and multi-protocol telemetry mod

Post by MikeB »

1. That is the value being sent by the multi-module, for the selected protocol, that is what it is!
2. Best I know is here: https://github.com/pascallanger/DIY-Mul ... Details.md.
3. Best to use standard firmware, I hacked some thing out to make space for the debug!
4. Probably not for the '64, and maybe not for the '128 as it needs a significant chunk of RAM for all the data. I may be able to add something.
5. I don't know what openTx does, can you describe it fully?
6. Normally I would not expect to see any errors, or only a handful over a minute.

Yes a pullup may reduce the errors.

Mike
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
Timeless
Posts: 19
Joined: Sun Aug 09, 2020 9:29 pm
Country: -

Re: er9x and multi-protocol telemetry mod

Post by Timeless »

MikeB wrote: Tue Aug 18, 2020 8:45 pm 1. That is the value being sent by the multi-module, for the selected protocol, that is what it is!
Any idea what TSSI means? Telemetry signal strength calculated by the MPM I suppose?
MikeB wrote: Tue Aug 18, 2020 8:45 pm 2. Best I know is here: https://github.com/pascallanger/DIY-Mul ... Details.md.
Yeah I found those documentation as well:
Timeless wrote: Mon Aug 17, 2020 7:10 pm I did some googling and found the description which points me to the protocol page
But this does not make and sense to me because the options I have are: T-Rate, Option, Rate.
And they all have varying ranges for example T-Rate:
Starts at (holding the + button until it reaches an endpoint)
50 -> 125 -> jumps to -126 -> -1 -> jumps to 4 -> 124 -> jumps to -127 -> -112 and then goes over into option 71.
Why are these ranges not consecutive?
But are T-Rate, Option, Rate send by the MPM or are these given by ER9X?
Timeless wrote: Mon Aug 17, 2020 7:10 pm 3. Best to use standard firmware, I hacked some thing out to make space for the debug!
Ok, I will revert back to standard. Thanks.
MikeB wrote: Tue Aug 18, 2020 8:45 pm 4. Probably not for the '64, and maybe not for the '128 as it needs a significant chunk of RAM for all the data. I may be able to add something.
Great, I'm planning to upgrade the CPU one day, since I have plenty reflow experience.
Just have to find a reason, because the M64 fits most of my needs right now :)
MikeB wrote: Tue Aug 18, 2020 8:45 pm 5. I don't know what openTx does, can you describe it fully?
What I meant was this.
But I see that this is only in the "discovery menu" and not on the "normal telemetry dashboard".
MikeB wrote: Tue Aug 18, 2020 8:45 pm 6. Normally I would not expect to see any errors, or only a handful over a minute.
Yes a pullup may reduce the errors.
Ah ok, then my non-inverted setup works fine. I get 1 or 2 errors every couple of minutes.
I'll test a 4.7k resistor when I flash the standard firmware back.
User avatar
MikeB
9x Developer
Posts: 17990
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: er9x and multi-protocol telemetry mod

Post by MikeB »

I've just posted a new test version for all radios. The RADIO SETUP|General menu has a new entry where you set whether to ask the multi module to send non-inverted or inverted telemetry data. This setting shoul be in the hardware menu, but there is a lot of conditional compilation in that so I wasn't sure I would get it correct.

Timeless: I think the T-Rate settings indicate to use AFHDS2A Telemetry, while the Rate settings indicate FrSky Hub telemetry.
The actual rate values are something to do with the servo output pulse rate, I believe. If you see "Option", then the setting is not a valid rate value.

Mike
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
nvd07
Posts: 63
Joined: Sat Aug 15, 2020 8:45 am
Country: France

Re: er9x and multi-protocol telemetry mod

Post by nvd07 »

Timeless wrote: Tue Aug 18, 2020 9:17 pm
MikeB wrote: Tue Aug 18, 2020 8:45 pm 6. Normally I would not expect to see any errors, or only a handful over a minute.
Yes a pullup may reduce the errors.
Ah ok, then my non-inverted setup works fine. I get 1 or 2 errors every couple of minutes.
I'll test a 4.7k resistor when I flash the standard firmware back.
I have news related to this. I wanted to try a pull up too.

First i looked again at my voltage level in the non inverting scenario. I had only 2.2v where Mike mentionned the atmega wants at least 3v ( 0.6 * vcc per datasheet ). There was no way my 2.2v would work.

I tried a 10k pull up. Still not good.

Then i was going to go with a lower R pullup but realized my NPN and its base parasitic cap discharge resistor were still in... Not good, working against us in the current scenario.

I disconnected the NPN circuit, i will have to ditch my remote inverting jumper idea ( inverting / noninverting jumper ).

Here are the (better) voltage levels i am seeing now:
IMG_20200820_124340-disconnected-npn.jpg
( It looks like the voltage is a bit slow to go back to highlevel; maybe the effect of the new 100R and the existing 220R ? )

And for the first time the MPM is chatting with the Protocol menu:
IMG_20200820_124259.jpg
Much fewer erroneous packets:
IMG_20200820_124330.jpg
A significant step has been accomplished!

Tonight i will try binding it with my receivers and have a look at the telemetry data. Still with the debug1 firmware.

Then i will test the newer firmware that Mike posted , to see if my MPM will be able to accept the inverting/noninverting commands from the new menu.
nvd07
Posts: 63
Joined: Sat Aug 15, 2020 8:45 am
Country: France

Re: er9x and multi-protocol telemetry mod

Post by nvd07 »

Ok so looking at the connexion with a TGY-iA8 AFHDS 2A receiver:
IMG_20200820_202101.jpg
IMG_20200820_202119.jpg
IMG_20200820_202042.jpg
So receiver voltage and RSSI are coming through allright. I cannot comment about TSSI I just realized I had been mistaking it for the opposite of SWR but it turns out it is not so I have some reading to do.

All in all very good progress and these screens are very much similar to Timeless'


Timeless regarding your question about TSSI you might want to have a look at the MPM FW code it might help you, i noticed this below.
MPM_code.png
However my 247 would be obtained from 256 - 9 . Then 5/8 *( 9) is below the lower bound 8 mentionned in the comment... so I fail to explain.
nvd07
Posts: 63
Joined: Sat Aug 15, 2020 8:45 am
Country: France

Re: er9x and multi-protocol telemetry mod

Post by nvd07 »

Looking at telemetry data from a FrSky G-RX8 receiver:
IMG_20200820_191524.jpg
IMG_20200820_191556.jpg
IMG_20200820_191316.jpg
Everything good, RSSI, receiver voltage, Altimeter, Variometer, TSSI as usual.

This is great. As much data with this MPM module as I had with my FrSky XJT module.
Timeless
Posts: 19
Joined: Sun Aug 09, 2020 9:29 pm
Country: -

Re: er9x and multi-protocol telemetry mod

Post by Timeless »

nvd07 wrote: Thu Aug 20, 2020 11:19 am
Timeless wrote: Tue Aug 18, 2020 9:17 pm
MikeB wrote: Tue Aug 18, 2020 8:45 pm 6. Normally I would not expect to see any errors, or only a handful over a minute.
Yes a pullup may reduce the errors.
Ah ok, then my non-inverted setup works fine. I get 1 or 2 errors every couple of minutes.
I'll test a 4.7k resistor when I flash the standard firmware back.
I have news related to this. I wanted to try a pull up too.
I tried a 4.7k pull-up and unfortunately it made no difference in the normal (non inverted) setup, it also seems like it made it worse.
So I reverted the change and time will tell if those sporadic errors will impact normal flight, probably not I guess.
MikeB wrote: Wed Aug 19, 2020 9:40 pm I've just posted a new test version for all radios.
....
but there is a lot of conditional compilation in that so I wasn't sure I would get it correct.
Nice, I've tested the er9x-frsky.hex and the option ended up in the general menu section.
MikeB wrote: Wed Aug 19, 2020 9:40 pm Timeless: I think the T-Rate settings indicate to use AFHDS2A Telemetry, while the Rate settings indicate FrSky Hub telemetry.
The actual rate values are something to do with the servo output pulse rate, I believe. If you see "Option", then the setting is not a valid rate value.
I've always flown my airplanes with RATE 50, So I guess its safe to put it on T-RATE 50.
This should then provide the same servo pulse rate.
nvd07 wrote: Thu Aug 20, 2020 6:59 pm All in all very good progress and these screens are very much similar to Timeless
Nice, congrats :)
nvd07 wrote: Thu Aug 20, 2020 6:59 pm Timeless regarding your question about TSSI you might want to have a look at the MPM FW code it might help you.
Ah so it does mean Transmitter RSSI calculated on telemetry packets
On your FrSky screenshots the RSSI is at 2, so AFHDS is not the only one with a strange TSSI reading it seems.
nvd07 wrote: Thu Aug 20, 2020 7:04 pm This is great. As much data with this MPM module as I had with my FrSky XJT module.
Nice, that means ArduPilot FrSky telemetry would also be possible on the M64 with MPM :)
nvd07
Posts: 63
Joined: Sat Aug 15, 2020 8:45 am
Country: France

Re: er9x and multi-protocol telemetry mod

Post by nvd07 »

Timeless wrote: Sat Aug 22, 2020 9:08 pm I tried a 4.7k pull-up and unfortunately it made no difference in the normal (non inverted) setup, it also seems like it made it worse.
So I reverted the change and time will tell if those sporadic errors will impact normal flight, probably not I guess.
During the week I did solder in a pull up as we had been talking about it (and I still have it in right now).
I looked at the trace - I'd say on my hardware the pull up improved the corners - made them more square-ish- but not the voltage levels, they're still near 3.4v ( yet another fact that I failed to predict... :roll: )
In the course of all this I took the 100R out - as there is already the 220R ( smd ) further down the path.
Non_inverting_NoPullUp.jpg
Non_inverting_6k_pullup.jpg
Timeless wrote: Sat Aug 22, 2020 9:08 pm Nice, that means ArduPilot FrSky telemetry would also be possible on the M64 with MPM :)
Ok I had not thought this far ahead yet... It is still a whole new world for me to discover, as so far I was doing 100% line-of-sight with no flight controllers.
I have on my desk an Ardupilot-compatible flight controller gizmo (F405-CTR), still waiting for its maiden flight yet!
User avatar
amxcs
Posts: 37
Joined: Tue Jun 04, 2019 8:02 am
Country: -

Re: er9x and multi-protocol telemetry mod

Post by amxcs »

Hello,
I try to set up a telemeter mod, but without success. Atmega2561
I will be grateful for a little help.

1. First I tried the module - it binds with the receivers (FS-iA6B or iA8) and works.
2. Then I done a telemetry mod - cut the tracks on the 2 and 3 pin before the resistors (200ohm) and wire resistors with 41 and 42 pin. And wire atmega pin 2 with module pin 5 with 470ohm resistor. Everything is checked for a short circuit - it's OK.
3. When power on - Switch Warning THR AIL - it's normally?
4. I can not find Frsky Mod Done option

Code: Select all

set the option “Frsky Mod Done” to ON; you will find this setting in Radio Setup, Hardware (see page 21) 
5. I flash the module with latest version - multi-stm-erskytx-aetr-noinv-v1.3.1.59
6. Does not show any values RSSI, TSSI

More images

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

Re: er9x and multi-protocol telemetry mod

Post by MikeB »

The option “Frsky Mod Done” is in the "Hardware" menu. This is protected from accidental use. To enable it, power the radio on holding the left horizontal trim to the left. The Hardware menu will then be available in the "Radio Setup" menu index.

Mike
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
User avatar
amxcs
Posts: 37
Joined: Tue Jun 04, 2019 8:02 am
Country: -

Re: er9x and multi-protocol telemetry mod

Post by amxcs »

Thanks!

I have progress :)

Image
Image

I only want the receiver voltage, but it shows 0. Where could be the problem?
User avatar
amxcs
Posts: 37
Joined: Tue Jun 04, 2019 8:02 am
Country: -

Re: er9x and multi-protocol telemetry mod

Post by amxcs »

Due to a bad cable, interrupted while flashing. And now I can't flash.
What to do.

Code: Select all

Writing MULTI-Module via serial
[1/3] Erasing flash memory ... done
[2/3] Writing bootloader ... failed!
I also tried an Arduino

Code: Select all

Probing serial port COM5 for STM32 in BOOT0 mode ...
stm32flash 0.4

http://stm32flash.googlecode.com/

Interface serial_w32: 115200 8E1
Version      : 0x22
Option 1     : 0x00
Option 2     : 0x00
Device ID    : 0x0410 (Medium-density)
- RAM        : 20KiB  (512b reserved by bootloader)
- Flash      : 128KiB (sector size: 4x1024)
- Option RAM : 16b
- System RAM : 2KiB

Found module on COM5

Flashing module via FTDI adapter on COM5

Erasing ...
stm32flash.exe -o -S 0x8000000:129024 -b 115200 COM5
stm32flash 0.4

http://stm32flash.googlecode.com/

Interface serial_w32: 115200 8E1
Version      : 0x22
Option 1     : 0x00
Option 2     : 0x00
Device ID    : 0x0410 (Medium-density)
- RAM        : 20KiB  (512b reserved by bootloader)
- Flash      : 128KiB (sector size: 4x1024)
- Option RAM : 16b
- System RAM : 2KiB
Erasing flash

Writing bootloader ...
stm32flash.exe -v -e 0 -g 0x8000000 -b 115200 -w C:\Users\Dell\Documents\ArduinoData\packages\multi4in1\hardware\STM32F1\1.1.8\bootloaders\Multi4in1\StmMulti4in1.bin COM5
stm32flash 0.4

http://stm32flash.googlecode.com/

Using Parser : Raw BINARY
Interface serial_w32: 115200 8E1
Version      : 0x22
Option 1     : 0x00
Option 2     : 0x00
Device ID    : 0x0410 (Medium-density)
- RAM        : 20KiB  (512b reserved by bootloader)
- Flash      : 128KiB (sector size: 4x1024)
- Option RAM : 16b
- System RAM : 2KiB
Write to memory
Failed to read ACK byte

Failed to write memory at address 0x08000000
Writing Multi firmware ...
stm32flash.exe -v -s 8 -e 0 -g 0x8002000 -b 115200 -w C:\Users\Dell\AppData\Local\Temp\arduino_build_377437\Multiprotocol.ino.bin COM5
Failed to init device.
stm32flash 0.4

http://stm32flash.googlecode.com/

Using Parser : Raw BINARY
Interface serial_w32: 115200 8E1


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

Re: er9x and multi-protocol telemetry mod

Post by MikeB »

Possibly the missing RxV is because it is being sent in an extended telemetry packet, which I don't handle (yet).
RSSI is in a standard packet, and RxV could be in the same packet. If it is, it should display OK.

I see you are getting help over on RCG for the module flashing problem.

MIke
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
User avatar
amxcs
Posts: 37
Joined: Tue Jun 04, 2019 8:02 am
Country: -

Re: er9x and multi-protocol telemetry mod

Post by amxcs »

I think the bootloader is broken. But how to flash it with USB-to-TTL as it does not have the necessary pins TX,RX,GND,VIN. It has the 5 holes but they are spi,mosi,miso,sck,rest :(
User avatar
amxcs
Posts: 37
Joined: Tue Jun 04, 2019 8:02 am
Country: -

Re: er9x and multi-protocol telemetry mod

Post by amxcs »

I fixed the module, flashed with another baud rate.
The version is "multi-stm-opentx-aetr-noinv-v1.3.1.59.bin". And now I have telemetry 8-)
Is it good for the resistor between the processor and the module to be 100 ohms or bring back the 470 ohms ?
And finally:
What value should it be Rate or T-Rate?
With t-rate i see receiver voltage, but low rssi.
With rate i don't see receiver voltage, high rssi.
The RSSI does it affect the range?
Attachments
IMG_20200904_232230.jpg
IMG_20200904_232019.jpg
IMG_20200904_231057.jpg
efyzz
Posts: 8
Joined: Sun Nov 28, 2021 10:00 pm
Country: -

Re: er9x and multi-protocol telemetry mod

Post by efyzz »

Hello,

At first thanks for this great software and support!

I'm also trying to get telemetry from FlySky receivers. Here is my setup:

Turnigy 9X with M64
iRangeX IRX4 Plus 4in1 module with FW mm-stm-serial-aetr-v1.3.3.0.bin
FlySky IA6B, FlySky IA6 and Turnigy IA8 receiver

All devices were bought in the last few weeks, so everything should be the actual hardware revision.

I did the telemetry mod as follows:
Re-routed switches to Pins 41/42 -> switches are working with M64-frsky.hex
Directly routed pin 5 of module connector to pin 2 of M64, without series resistor and inverter circuit or cutting any traces at the module connector (pin 5 seems to be connected to a small copper plane only).

I tried er9xProv822z1 first, then er9x-frsky-AFHdebug1 and er9xProv822u. No telemetry at all. No RSSI, nothing.

With the debug screen of er9x-frsky-AFHdebug1 I can see the RX packets counting up, but all other values stay at 0.

I tried the Invert Telemetry option in er9X General setup and also an inverter circuit with NPN, but nothing changed. The voltage level of the module is 3.3V and it sends inverted (was shown when flashing the FW and also checked with an oscilloscope).

I think the data is beeing received, because RX packets are counting up and stop counting if I disconnect pin 5 of the module. So it's just a software problem ... My last idea is to update the receiver's FW, but this is tricky and I think the receivers should have actual firmware?!

By the way: Pin 2 of M64 is used as UART RX, right? As it could also be SPI MOSI, I was confused why not using Pin 3 MISO ... But it seems pin 2 is correct.
And another question: The checkbox for FrSky mod isn't available anymore in Hardware menu, right? There is only something called TemelmetrEZ>=r90 whatever that means. But it changes nothing for me and the switches are always working on pins 41/42.

I hope you can help me get telemetry working. Thanks! :)
User avatar
MikeB
9x Developer
Posts: 17990
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: er9x and multi-protocol telemetry mod

Post by MikeB »

There is no support of the AFHDS2A telemetry in er9x (and no space to add it on the M64).
You might find there is a TSSI value reported.

To check the data from the multi module is being received, go to the protocol menu. If the multi module firmware version is displayed (like the 1.3.1.59 above), and the protocol names are displayed, then the telemetry data from the multi module is being received correctly.

Mike
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
efyzz
Posts: 8
Joined: Sun Nov 28, 2021 10:00 pm
Country: -

Re: er9x and multi-protocol telemetry mod

Post by efyzz »

Thank you Mike,
MikeB wrote: Mon Nov 29, 2021 3:54 pm There is no support of the AFHDS2A telemetry in er9x (and no space to add it on the M64).
What are you guys then talking about here? As I understood Timeless and nvd07 both have M64 and had success with telemetry.
Timeless wrote: Mon Aug 10, 2020 1:56 pm I've been a happy user of er9x(M64)
nvd07 wrote: Sat Aug 15, 2020 9:19 am To give you the full picture, this is with TGY 9X - m64
Also I found this thread were you mentioned you've built a special version for M64:
https://openrcforums.com/forum/viewtopic.php?t=11578

So if I'm wrong, will it work when I solder a M128 to my Turnigy 9X or are there any other hints?
MikeB wrote: Mon Nov 29, 2021 3:54 pm To check the data from the multi module is being received, go to the protocol menu. If the multi module firmware version is displayed (like the 1.3.1.59 above), and the protocol names are displayed, then the telemetry data from the multi module is being received correctly.
I saw it once, but it seems it depends of the er9X version. Actually with er9xProv822u it is not shown.

Can you say something about why there is so no "FrSky mod done" checkbox but something called "TelemetrEZ>=r90"? Is the change of switches to pins 41/42 hardcoded in er9x-frsky versions?

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

Re: er9x and multi-protocol telemetry mod

Post by MikeB »

I don't have any Flysky hardware that supports telemetry, so this has all been done by getting others to test things.
Flysky telemetry sends two type of packet, er9x only "understands" one of these, which is why I said it doesn't support AFHDS2A telemetry, I thought this uses the "other" type of packet, but I may be wrong.

For any of this to work, you need the MPM firmware built with "MULTI_TELEMETRY", not "MULTI_STATUS".

Recent firmware includes an option in the RADIO SETUP/GENERAL menu that allows the telemetry data from the MPM to be inverted.This actually sends something to the module to make that invert the data.

Please use 822z1 firmware for testing as this is using the "latest" source code so I can see what it is doing. Use "er9x-frsky.hex" unless you have a "serial voice" addition when you need "er9x-frsky-sv.hex". These are for the M64 and have the "FrSky mod done" hard coded, the menu option is only available on the '128 and '2561 versions (which have the flash space to allow for it).

We first need to get the module firmware being displayed (and the protocol names), to confirm the data from the module is being received correctly, then we can see what is happening with the telemetry data.

Note that due to the amount of work needed to support all the different radios with er9x and erskyTx, I did announce some time ago that I was only doing bug fixes to er9x now.

Mike
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
efyzz
Posts: 8
Joined: Sun Nov 28, 2021 10:00 pm
Country: -

Re: er9x and multi-protocol telemetry mod

Post by efyzz »

Hello Mike,

Wow, thanks for this comprehensive explanation!

I was not aware that er9x is obsolete. I see I have to change to erSkyTX to get all the functionality ... but this is not running on Turnigy 9X. Even a M128 wouldn't help if I'm right, the whole board has to be changed :(

I flashed again 822z1 (er9x-frsky.hex) and now have protocol names and module firmware version shown. When I activate "Invert Telemetry" protocol names and version disappear. So it seems to be right to leave the box unchecked.

Telemetry screen shows Rx=0 and Tx=0 (I think this is for RSSI and TSSI?).

It would be very nice if you would investigate some time here. But I would also understand If you don't ...

However, I'm ready to go on ;)
User avatar
MikeB
9x Developer
Posts: 17990
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: er9x and multi-protocol telemetry mod

Post by MikeB »

Try this firmware. The second statistics page (with TOT on the top line) should have two (hex) numbers on the bottom line.

The second is a count of actual AFHDS2A telemetry packets received.
The first is either 00, AA or AC (or may be swapping between them) is the type of telemetry packet.

I can't test it however.

The M64 version only has 74 bytes of flash spare (and this debug added 56 bytes!).

Mike
Attachments
er9x-frsky-AF.zip
(74.1 KiB) Downloaded 290 times
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
efyzz
Posts: 8
Joined: Sun Nov 28, 2021 10:00 pm
Country: -

Re: er9x and multi-protocol telemetry mod

Post by efyzz »

Hello Mike,

Thanks for your investigation!

I'm sorry to say both values show 0000 (both have 4 digits).

Protocol names and module fw version are present.
MikeB wrote: Wed Dec 01, 2021 11:59 am The M64 version only has 74 bytes of flash spare (and this debug added 56 bytes!).
Sounds comfortable :)

Post Reply

Return to “er9x”