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

FrSky ARCHER PLUS R10+ and SR10+ receiver support #3188

Closed
1 task done
kochpet opened this issue Feb 13, 2023 · 71 comments · Fixed by #4077
Closed
1 task done

FrSky ARCHER PLUS R10+ and SR10+ receiver support #3188

kochpet opened this issue Feb 13, 2023 · 71 comments · Fixed by #4077
Labels
enhancement ✨ New feature or request feedback help wanted Extra attention is needed

Comments

@kochpet
Copy link

kochpet commented Feb 13, 2023

Is there an existing issue for this feature request?

  • I have searched the existing issues

Is your feature request related to a problem?

The Frsky R10+ receivers have 10 configurable channel ports, each channel port can be assigned as PWM, SBUS, FBUS, or S.Port.
At the moment you can only change the channel mapping for the 10 ports.

Describe the solution you'd like

The possibility to configure all channel ports also to PWM, SBUS, FBUS, or S.Port.

Describe alternatives you've considered

No response

Additional context

No response

@kochpet kochpet added the enhancement ✨ New feature or request label Feb 13, 2023
@raphaelcoeffic
Copy link
Member

raphaelcoeffic commented Feb 14, 2023

To be able to implement this, we will need some information on how is this done. At the very least we need a trace of the packets exchanged during this configuration between radio and module.

Last time I asked if anyone would be ready to do this kind of things and maintain the FrSky protocols, nobody showed up.

This probably means we won’t be able to support this hardware, as we’re not receiving any information from the vendor.

@raphaelcoeffic raphaelcoeffic added help wanted Extra attention is needed feedback labels Feb 14, 2023
@kochpet
Copy link
Author

kochpet commented Feb 14, 2023

Hi Raphael,
thanks for your reply. At the moment you can only configure the ports of the Archer Plus series with ETHOS to PWM, SBUS, FBUS, or S.Port, for this I flashed one of my transmitters to ETHOS.

The reconfiguration of the ports as well as changing the chanel mappings happens with a bound RX under options. I would like to support you in the implementation if you tell me how I can help you!
Attached two screenshots from Ethos.
screenshot-2023-02-14-58411
screenshot-2023-02-14-58373

@raphaelcoeffic
Copy link
Member

@kochpet what we need are the data exchanged between the radio software and the RF module. This means using a logic analyser with probes on the serial lines between the RF module and the main MCU in your radio.

Other vendors just document their communication protocol so that we "just" have to implement it. This requires to reverse-engineer the protocol itself, whereby we already have a good part of it (from the time FrSky was communicating some details to the OpenTx team), but we need the new parts now.

@kochpet
Copy link
Author

kochpet commented Feb 14, 2023

@raphaelcoeffic Ok, just to clarify my background. I'm an IT consultant and I work for a company that develops and builds electronic devices. It should be possible that I can provide you with this data.
Can you tell me where exactly I have to attach the logical analyzer. I would use a Frsky X10S ETHOS with an internal ISRM module for this.

@raphaelcoeffic
Copy link
Member

@rotorman can you please help this gentlemen with the pinout of the internal module connector? It is the same as on the TX16S.

@raphaelcoeffic
Copy link
Member

Once the packages have been monitored, the single packet payload need to be exported and analysed. I usually write python scripts to do that. Otherwise it's quite hard to find the exact packet or sequence of packets you are looking for.

@rotorman
Copy link
Member

rotorman commented Feb 14, 2023

Here a pinout of the TX16S 12-pin RF module connector:
grafik
grafik

@kochpet Would you happen to have a Saleae logic analyzer? Tapping the internal module RX and TX pins would reveal it's secrets.
Alternatively you could use two 3.3V logic level FTDI adapters, one for TX and one for RX line, but logic analyzer is better, as it shows combined timing of the RX and TX lines better.

@raphaelcoeffic
Copy link
Member

raphaelcoeffic commented Feb 14, 2023

You are looking for a "normal" async serial (8N1) with a baud rate of 450.000.

This is the code for the current receiver settings as we know it:

addFrameType(PXX2_TYPE_C_MODULE, PXX2_TYPE_ID_RX_SETTINGS);
uint8_t flag0 = reusableBuffer.hardwareAndSettings.receiverSettings.receiverId;
if (reusableBuffer.hardwareAndSettings.receiverSettings.state == PXX2_SETTINGS_WRITE)
flag0 |= PXX2_RX_SETTINGS_FLAG0_WRITE;
Pxx2Transport::addByte(flag0);
if (reusableBuffer.hardwareAndSettings.receiverSettings.state == PXX2_SETTINGS_WRITE) {
uint8_t flag1 = 0;
if (reusableBuffer.hardwareAndSettings.receiverSettings.telemetryDisabled)
flag1 |= PXX2_RX_SETTINGS_FLAG1_TELEMETRY_DISABLED;
if (reusableBuffer.hardwareAndSettings.receiverSettings.pwmRate)
flag1 |= PXX2_RX_SETTINGS_FLAG1_FASTPWM;
if (reusableBuffer.hardwareAndSettings.receiverSettings.fport)
flag1 |= PXX2_RX_SETTINGS_FLAG1_FPORT;
if (reusableBuffer.hardwareAndSettings.receiverSettings.telemetry25mw)
flag1 |= PXX2_RX_SETTINGS_FLAG1_TELEMETRY_25MW;
if (reusableBuffer.hardwareAndSettings.receiverSettings.enablePwmCh5Ch6)
flag1 |= PXX2_RX_SETTINGS_FLAG1_ENABLE_PWM_CH5_CH6;
if (reusableBuffer.hardwareAndSettings.receiverSettings.fport2)
flag1 |= PXX2_RX_SETTINGS_FLAG1_FPORT2;
Pxx2Transport::addByte(flag1);
uint8_t outputsCount = min<uint8_t>(24, reusableBuffer.hardwareAndSettings.receiverSettings.outputsCount);
for (int i = 0; i < outputsCount; i++) {
Pxx2Transport::addByte(min<uint8_t>(23, reusableBuffer.hardwareAndSettings.receiverSettings.outputsMapping[i]));

@kochpet
Copy link
Author

kochpet commented Feb 14, 2023

@rotorman on the X10S IXJT motherboard is a 13pin Molex and not a 12pin like at your photo.
Do you have a pinout for that too?
20230214_201221

@kochpet
Copy link
Author

kochpet commented Feb 14, 2023

@rotorman
Don't worry already found it
Unbenanntes Bild

@kochpet
Copy link
Author

kochpet commented Feb 16, 2023

@raphaelcoeffic
Ok, I'll get the Logical Analyzer on Monday, then we'll see. In the meantime, a possibly stupid question. As I can see at the code you know how to switch the separate port for SBus, Fport......etc on existing receivers. Since the R10Plus registers and binds perfectly and the port mapping also works perfectly, the receiver can also be switched to 7ms PWM mode and telemetry can be disabled, it would not be possible for the reconfiguration of the ports to work with the existing code?
screen-2023-02-13-222318
screen-2023-02-16-070547

@raphaelcoeffic
Copy link
Member

It‘s hard to guess, I don’t have the hardware, so I cannot test, and it feels weird to make blind changes. Let‘s see what traces show first.

@kochpet
Copy link
Author

kochpet commented Feb 17, 2023

@raphaelcoeffic
Can you please check the Saleae logic file, I think this is one of the sequences we are looking for.

Pin1toFBUS
Pin1toFBUS.zip

@kochpet
Copy link
Author

kochpet commented Feb 20, 2023

@raphaelcoeffic did you find time to check the Saleae logic file?

@raphaelcoeffic
Copy link
Member

raphaelcoeffic commented Feb 22, 2023

@kochpet it seems your ZIP file has only the picture, right? Is there any way I can have the full Logic2 trace file? I need to see the traffic around it as well (request + replies, etc).

@kochpet
Copy link
Author

kochpet commented Feb 22, 2023

@raphaelcoeffic Sorry, I zipped the wrong file, here are all the .sal of the various switching processes.
Analyzer.zip

@raphaelcoeffic
Copy link
Member

raphaelcoeffic commented Feb 22, 2023

@kochpet did you actually have "Telemetry disabled" activated? It seems bit 7 is always set in your traces, which seems odd.

Also:

  • can you choose the output pins freely? (every type of output on any pin?)
  • can you have multiple SPORT pins? (same for SBUS in/out)

@kochpet
Copy link
Author

kochpet commented Feb 22, 2023

@raphaelcoeffic Yes telemetry was disabled

@kochpet
Copy link
Author

kochpet commented Feb 22, 2023

@raphaelcoeffic
10 Configurable Channel Ports
CP1: PWM / SBUS Out / FBUS / S.Port / SBUS In
CP2-10: PWM / SBUS Out / FBUS / S.Port

@raphaelcoeffic
Copy link
Member

@kochpet it seems we're missing the capability frames in the trace. You should be able to see at some point (possibly when opening the receiver options?) a frame coming from the module starting with 0x7E [size] 0x01 0x06.

@kochpet
Copy link
Author

kochpet commented Feb 22, 2023

@raphaelcoeffic let me check, I make a new trace

@kochpet
Copy link
Author

kochpet commented Feb 22, 2023

@raphaelcoeffic this is the trace when i open the OPTIONS menu

Press_Options.zip

@raphaelcoeffic
Copy link
Member

raphaelcoeffic commented Feb 22, 2023

The receiver sends 0x70 as its capabilities, so basically bits 4, 5 and 6 are set (0111 0000). Bit 4 is supposed to be "Racing mode" (do you even see the option in the menu?), but we don't know what bits 5 and 6 mean.

enum ReceiverCapabilities {
  RECEIVER_CAPABILITY_FPORT,                          // bit 0
  RECEIVER_CAPABILITY_TELEMETRY_25MW,
  RECEIVER_CAPABILITY_ENABLE_PWM_CH5_CH6,
  RECEIVER_CAPABILITY_FPORT2,
  RECEIVER_CAPABILITY_RACING_MODE,                    // bit 4
  // missing bit 5
  // missing bit 6
  RECEIVER_CAPABILITY_COUNT
};

We would probably need to see what other receivers will reply, and see what the difference is in terms of supported features.

@kochpet
Copy link
Author

kochpet commented Feb 22, 2023

This is the caprure for the High PWM Speed ​​mode
High PWM Speed.zip

@kochpet
Copy link
Author

kochpet commented Feb 22, 2023

@raphaelcoeffic Would it be possible that bit 5 and 6 is responsible for switching from SBUS-16 to SBUS-24, you have the trace for it SBUS16-24.sal

@raphaelcoeffic
Copy link
Member

Capabilities and settings are 2 different things! It is not the same bitfield. But yes, the Receiver settings frame, bit 5 is definitely used to switch SBUS to 24CH channel mode. However, only one bit is required, and there is no relation between settings and capabilities, they don't use the same bits and the frames are different.

@raphaelcoeffic
Copy link
Member

raphaelcoeffic commented Feb 22, 2023

Fast PWM was already know and AFAIK already supported. These are the known settings bits (general, not per channel):

#define PXX2_RX_SETTINGS_FLAG1_TELEMETRY_DISABLED  (1 << 7)
#define PXX2_RX_SETTINGS_FLAG1_READONLY            (1 << 6)
#define PXX2 RX_SETTINGS_FLAG1_SBUS_24CH           (1 << 5) // new
#define PXX2_RX_SETTINGS_FLAG1_FASTPWM             (1 << 4)
#define PXX2_RX_SETTINGS_FLAG1_FPORT               (1 << 3)
#define PXX2_RX_SETTINGS_FLAG1_TELEMETRY_25MW      (1 << 2)
#define PXX2_RX_SETTINGS_FLAG1_ENABLE_PWM_CH5_CH6  (1 << 1)
#define PXX2_RX_SETTINGS_FLAG1_FPORT2              (1 << 0)

For the channel output, special values in the output mapping array are used. So far I noted from your traces:

        // (1 << 5) SBUS in  (0x20)
        // (1 << 6) S.PORT   (0x40)
        // (1 << 7) SBUS out (0x80)
        // SPORT | SBUS out  (0xC0)

Please note that values up to 23 are reserved for normal channel mapping.

Possibly, the capability bits are mapped to these 2 features. The question is: which is which? So we'd need to have a receiver that has only one of the afore mentioned capabilities, so we can determine which is which. Or we can try a blind guess based on the "historical" context (which feature appeared first), but development and shipping are 2 different things, the order could be reversed.

@pfeerick
Copy link
Member

Real life has intervened, so Raphael hasn't had time to work on this (or much of ETX the last few weeks) ... normal service should resume soon 🤭

@kochpet
Copy link
Author

kochpet commented Apr 26, 2023

The ACCESS protocol is one of the most advanced protocols on the market. The new Archer Plus series receivers are an essential part and should definitely be integrated into EdgeTX, otherwise EdgeTX will become uninteresting for FrSky users in the future.

@gagarinlg
Copy link
Member

  1. FrSky has no interest in EdgeTX, so support for new products might or might not happen
  2. EdgeTX is a hobby for us. Some things are way more important than hobbies. Please be patient.

@DRZ400
Copy link

DRZ400 commented Jul 18, 2023

the sr10+ is supposed to be accst compatible, is anyone has tested it with their new lua ?

@kochpet
Copy link
Author

kochpet commented Jul 27, 2023

@raphaelcoeffic
Is there any news on the subject or is the work on it completely stopped ?

@raphaelcoeffic
Copy link
Member

Is there any news on the subject or is the work on it completely stopped ?

I need to get back to it. Probably when I get back from vacations (beg. August).

@kochpet
Copy link
Author

kochpet commented Jul 27, 2023

@raphaelcoeffic
If you need support or hardware for this please let me know, am happy to help.

@AlphaCharlyX
Copy link

AlphaCharlyX commented Sep 7, 2023

Maybe some posts could be a hint here too:

opentx/opentx#9015 (comment)

@raphaelcoeffic
Copy link
Member

Maybe some posts could be a hint here too

The receiver name table is really not the issue.... What did not work here was the output mode. It's harder to reverse engineer than just finding a string table in a binary (have fun with Ghidra ;-)).

Top of the table:
Screenshot 2023-09-07 at 18 23 54

Bottom of that same table:
Screenshot 2023-09-07 at 18 24 29

But you know, neither me nor any other dev from this project does use this gear. So, yes, we could maybe provide some little fan service, you can be sure that as long as nobody actively tests it regularly, it will be very unreliable and incomplete.

Other vendors provide us with the full package:

  • sample hardware,
  • specifications,
  • donations,
  • etc...

@raphaelcoeffic
Copy link
Member

@AlphaCharlyX it would help much more if you could find a dev using FrSky/ACCESS willing to support their gear ;-) (warning: some reverse engineering involved....)

@AlphaCharlyX
Copy link

Did someone asked FrSky for the needed information?

I think FrSky 8s interested to sell the Archer plus Receivers to OpenTX and EdgeTX -users as well?

@gagarinlg
Copy link
Member

Did someone asked FrSky for the needed information?

I think FrSky 8s interested to sell the Archer plus Receivers to OpenTX and EdgeTX -users as well?

FrSky has abandonded OpenTX, sees EdgeTX as a threat and tries to force people into their closed eco system. A while ago someone from FrSky said, that OpenTX and EdgeTX are old and have a bad software quality. And for OpenTX this is not far from the truth, some parts are not well maintained. But on EdgeTX we are working on those parts, to have a good base for future developments, so that we are able to use STM32H7 MCUs and maybe MCUs from different manufacturers.

FrSky wants everyone to move to Ethos.

If you are able to get infos from FrSky, feel free to share them and maybe someone will implement it. I am pretty sure that they are not willing to share any information. As for me personally, except for then BnFs with Spektrum, I have switched almost everything to ExpressLRS and I do not plan to invest any money or time on FrSky gear, with the exception of testing already supported radios.

@AlphaCharlyX
Copy link

Problem has been solved in OpenTX

@pfeerick
Copy link
Member

@AlphaCharlyX Do you have one of the newer supported receivers? You should be able to try out #4077 then ;)

@pfeerick pfeerick linked a pull request Sep 22, 2023 that will close this issue
@raphaelcoeffic
Copy link
Member

Problem has been solved in OpenTX

Including the additional options for the configurable ports? I haven't seen anything related to that, but I might be wrong.

@pfeerick
Copy link
Member

pfeerick commented Sep 22, 2023

Please keep in mind: OTX has only added some support - around being able to OTA flash the Rx IIRC, those changes don't include the ability to configure the Rx (which is what this issue is in regard to). So #3249 is still in a state of "need some help testing" before this issue is solved.

@pfeerick
Copy link
Member

pfeerick commented Sep 22, 2023

Does anyone know if the GR6+ also supports remappable pins? I'm contemplating getting one, else it will be the R10+... looking at the manual for the GR6+ it seems like it has that capability also? Just doesn't seem to be mentioned in the manual or specs in any way...
image

@kochpet
Copy link
Author

kochpet commented Sep 22, 2023

As far as I know, all Plus series receivers have remappable pins!

@3djc
Copy link
Collaborator

3djc commented Sep 22, 2023

Everything should be available, if something isn't, let me know. The issue for pin map was the wrong model id check

@3djc
Copy link
Collaborator

3djc commented Sep 22, 2023

Please keep in mind: OTX has only added some support - around being able to OTA flash the Rx IIRC, those changes don't include the ability to configure the Rx (which is what this issue is in regard to). So #3249 is still in a state of "need some help testing" before this issue is solved.

Sorry to disagree with that :)

@AlphaCharlyX
Copy link

opentx/opentx#9015 (comment)

I get it from there...

@ToniCupra
Copy link

Everything should be available, if something isn't, let me know. The issue for pin map was the wrong model id check

I must wait for the nightly version? Sorry for asking (newbie) :-)

@pfeerick
Copy link
Member

Sorry to disagree with that :)

We'll fine out... I'm getting the hardware to check :-P

@pfeerick
Copy link
Member

Everything should be available, if something isn't, let me know. The issue for pin map was the wrong model id check

I must wait for the nightly version? Sorry for asking (newbie) :-)

For OTX changes yes. For ETX, niether #3249 nor #4077 are merged yet so you would need to either using the automated builds avavailable for one or the other depending on what specifically you are wanting to test or build your own frankenbuild via Gitpod

@raphaelcoeffic
Copy link
Member

Gentlemen, the test party is going right here: #4077

@raphaelcoeffic raphaelcoeffic linked a pull request Sep 26, 2023 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement ✨ New feature or request feedback help wanted Extra attention is needed
Projects
None yet