FrSky Redundancy Bus

erskyTx runs on many radios and upgrade boards
ersky9x was a port of er9x for use on the sky9x board.
PNaz
Posts: 142
Joined: Tue Dec 27, 2011 5:28 pm
Country: -
Location: Kaleden (Twin Lake), British Columbia

FrSky Redundancy Bus

Post by PNaz »

I have just received a Frsky Redundancy Bus for a large aerobatic model. http://www.frsky-rc.com/product/pro.php?pro_id=155 I am receiving the usual telemetry including RSSI and the receiver pack voltage from the Bus but I am unable to get any of the unique telemetry messages that the Redundancy Bus transmits. Is there any plan to support this item on ersky9x for Taranis.

Paul

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

Re: FrSky Redundancy Bus

Post by MikeB »

I'll need to find out what the ID(s) of the message(s) is/are, then I can add them. I'm investigating SPort ID at the moment, and I can very likely find them out from the openTx sources.

Mike.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
User avatar
MikeB
9x Developer
Posts: 17990
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: FrSky Redundancy Bus

Post by MikeB »

I've found most of the data I need, some processing in.
Are you using a Taranis or a Taranis Plus?
I don't have a Redundancy Bus unit, so I'll need to rely on you testing the implementation.

Mike.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
PNaz
Posts: 142
Joined: Tue Dec 27, 2011 5:28 pm
Country: -
Location: Kaleden (Twin Lake), British Columbia

Re: FrSky Redundancy Bus

Post by PNaz »

I have a Taranis using the internal module to a X4R receiver and a XJT external module to a X6R receiver. Both receivers are attached to the Redundancy bus via S.Bus. The X6R has telemetry disabled as per the instruction sheet.I can turn off either the internal or external module and still maintain control via the Redundancy Bus so that is working as planned. Obviously no telemetry if only the X6R is controlling the aircraft. No problem with me testing the firmware.

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

Re: FrSky Redundancy Bus

Post by MikeB »

OK, I'll see about getting the data displayed, then get you a version to test.

Mike.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!

PNaz
Posts: 142
Joined: Tue Dec 27, 2011 5:28 pm
Country: -
Location: Kaleden (Twin Lake), British Columbia

Re: FrSky Redundancy Bus

Post by PNaz »

Thanks Mike. There is no rush on this. The model is not completed and the redundancy bus should work properly as is. The data we are talking about will only tell me if the bus is actually encountering problems and compensating for them.

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

Re: FrSky Redundancy Bus

Post by MikeB »

I've sent you a test version via PM.

Mike.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
User avatar
MikeB
9x Developer
Posts: 17990
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: FrSky Redundancy Bus

Post by MikeB »

I've just posted a full test version with this, including logging, in.

Mike.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
PNaz
Posts: 142
Joined: Tue Dec 27, 2011 5:28 pm
Country: -
Location: Kaleden (Twin Lake), British Columbia

Re: FrSky Redundancy Bus

Post by PNaz »

Thanks Mike. I will try it out.

Paul
PNaz
Posts: 142
Joined: Tue Dec 27, 2011 5:28 pm
Country: -
Location: Kaleden (Twin Lake), British Columbia

Re: FrSky Redundancy Bus

Post by PNaz »

Mike I just tried out the new test version with the Redundancy Bus additions. There is a problem. When going through to list I still get the original six items RBv1 RBa1 RBv2 Rba2 RBm1 and RBm2. The it gets weird. The next selection ends up as a flashing -- situated at the 5th and 6th character position from the left side of the screen. Scrolling to the next and last selection the flashing characters are in the correct position on the line but consist of --TI. Those two items are the only additions available beyond the original test version you sent me. The flashing -- on the left of the screen do this in the Custom Telemetry screen and when selected as a Voice alert. The --TI shows up in the correct position on the Custom screen and the Voice Alerts selection screen. I did not try this with any receivers or redundancy bus operating. This was only during the set up of the transmitter to show the values.

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

Re: FrSky Redundancy Bus

Post by MikeB »

Oops, I forgot to add the text for the servo status and the box status, so you get whatever is in memory after the existing text.

I'll get those added.

Mike.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
User avatar
MikeB
9x Developer
Posts: 17990
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: FrSky Redundancy Bus

Post by MikeB »

Test version posted with the RBOX names fixed.

Mike.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
PNaz
Posts: 142
Joined: Tue Dec 27, 2011 5:28 pm
Country: -
Location: Kaleden (Twin Lake), British Columbia

Re: FrSky Redundancy Bus

Post by PNaz »

Mike. I tried the new test version and do get two more selections, RBSV and RBST. These are not what FrSky shows as status messages. When I power up the Redundancy bus RBSV reads 0 and RBST reads -2048. Disconnecting one of the receivers or one of the batteries to simulate a failure results in no change to the values. The attachment shows the expected status messages. All of the PB** data seems to be working correctly. All of the Rx** status messages are missing. Those status messages should have a value of 0 for normal operation or 1 for abnormal operation.

Paul
Attachments
Redundancy Bus s.port output.jpg
User avatar
MikeB
9x Developer
Posts: 17990
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: FrSky Redundancy Bus

Post by MikeB »

RBSV and RBST are many bits encoded in a single value:
RBSV:
Bits 0-15 Set if channel overload
RBST:
Bit 0 RX1IN overload
Bit 1 RX2IN overload
Bit 2 SBUS overload
bit 3 RX1_FAILSAFE
Bit 4 RX1_LOSTFRAME
Bit 5 RX2_FAILSAFE
Bit 6 RX2_LOSTFRAME
Bit 7 RX1_PHYSICAL_CONNECTION _LOST
Bit 8 RX2_PHYSICAL_CONNECTION _LOST
Bit 9 RX1_NO_SIGNAL
Bit 10 RX2_NO_SIGNAL

I would expect RBSV to change when you disconnect a receiver.

Mike.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
PNaz
Posts: 142
Joined: Tue Dec 27, 2011 5:28 pm
Country: -
Location: Kaleden (Twin Lake), British Columbia

Re: FrSky Redundancy Bus

Post by PNaz »

Further testing shows RBST does go from -2048 to -1912 when the non telelmetry receiver RX2 is disconnected. It was very intermittant. That problem was probably caused by the problem of having the transmitter close enough to read the data on the screen but far enough away to receive the telemetry. Originally I moved the transmitter away until the No Telemetry warning stopped. It seems I had to move it slightly further away then that to get a change in the data on the screen.

A second person at the transmitter would help with my poor eyesight. The optometrist tells me that cataracts are starting in my eyes so my models are getting larger.

The FrSky documentation that I have been able to find is very sparse on what to expect at the transmitter. I guess they left it to the open source developers to figure it out. It appears to be doing what it is advertised to do but the status messages are the only way to troubleshoot a problem and replace a poorly performing component.

Paul
Last edited by PNaz on Sat Oct 08, 2016 12:28 am, 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: FrSky Redundancy Bus

Post by MikeB »

The next step is to decide how to display the information and/or provide voice announcement of faults.

Mike.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
PNaz
Posts: 142
Joined: Tue Dec 27, 2011 5:28 pm
Country: -
Location: Kaleden (Twin Lake), British Columbia

Re: FrSky Redundancy Bus

Post by PNaz »

The PB** data messages are displaying well. Voice announcements of the data can be handled exactly like the other FrSky sensors displaying volts, amps, or mah.

I think the way FrSky shows the data messages will work ok and can easily trigger a voice message. It looks like they poll each individual bit of the message and create an item for each bit with a 0 for normal operation and 1 for fault.

The data from RBST can be converted easily for individual failures. -2048 is normal, -2024 is shown when the receiver 2 transmitter module is switched off, and -1912 is shown when receiver 2 is disconnected. I couldn't easily simulate failsafe, lost frame, and overload so don't know what those numbers are. Multiple failures will have a much greater combination of numbers to deal with.

Only one receiver can be set up for telemetry so if that receiver fails then the only indication of any fault will be the current No Telemetry warning.

I think it is important to log the data and status messages for troubleshooting but that would increase the items logged by a large amount.

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

Re: FrSky Redundancy Bus

Post by MikeB »

I've got rid of the negative value for the status, the top 5 bits were being received as ones, I've masked them out. This will make it easier to see set bits, and it also means a value of 0 is all is OK.

I've just been extending Scalers and I'll add an extra function to voice alarms "v & val". These will both allow single bits to be monitored/displayed.

For example:
Bit 7 of the status is RX1_PHYSICAL_CONNECTION _LOST
Bit 7 is decimal 128.
So you should be able to set a voice alarm as:
Source RBST
Function v & val
value 128
Trigger ON
and specify a suitable voice file.
Then if bit 7 of the status becomes ON, the voice file will play.

By the look of the code in openTx, what they have is to display the status, as text, of a single bit, possibly just that of first bit, starting from bit 0.

Mike.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
User avatar
Kilrah
Posts: 11108
Joined: Sat Feb 18, 2012 6:56 pm
Country: Switzerland

Re: FrSky Redundancy Bus

Post by Kilrah »

The RB data is "complex", simple real-time display is not enough, processing and memorizing events is needed. Proper display in OpenTX will hopefully eventually be implemented as a custom lua-based telemtry screen (widget on Horus).

E.g. the "connection lost" bit is only set while the connection is lost, but is cleared as soon as connection is back. Similarly the "overload" flags indicate a tripped polyfuse, but once it resets the flag is cleared. For useful diagnostics these events should be at least latched, ideally counted so that you can look at the screen after landing and know what happened.
PNaz
Posts: 142
Joined: Tue Dec 27, 2011 5:28 pm
Country: -
Location: Kaleden (Twin Lake), British Columbia

Re: FrSky Redundancy Bus

Post by PNaz »

Mike It looks like you have a workable solution to the problem if you can also latch the bit as Kilrah has suggested. If you can reset the latch after a voice file has been triggered and a screen or log entry written that increments the error count then that would work well enough for troubleshooting. The voice alarm would have to have time restrictions to avoid continuous announcements for ongoing errors.

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

Re: FrSky Redundancy Bus

Post by MikeB »

If you use a trigger of ON, then the voice message is only spoken when the bit changes from OFF to ON, so is spoken just once for each time the event happens.
I'm adding the servo status and RBUS status to the log file, just as numbers at present. With the addition of the MOD function to Scalers, you could create a scaler to monitor a specific bit, and all the scalers are logged already.

I should be posting an updated test version in the next few minutes.

Mike.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
User avatar
MikeB
9x Developer
Posts: 17990
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: FrSky Redundancy Bus

Post by MikeB »

Took a bit longer to test, but new test version now posted.
I've managed to add the function v&val to both voice alerts and logical switches.
You may use it in voice alerts to get a voice message when a particular bit gets set.
With this function in logical switches you have an interesting possibility. Set a logical switch:
L1: v&val RBST 128
L1 will now switch ON when the RX1_PHYSICAL_CONNECTION _LOST bit is set.
Now set up a GVAR adjuster with function +/lim L1 and (say) 20.
Every time the RX1 connection is lost, GVAR1 will increment, up to a maximum of 20. Note that GVARs are also logged.
You may also set another GVAR adjuster that will zero the GVAR, or use the function inc/0 in a single adjuster.

Mike.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
User avatar
jhsa
Posts: 19480
Joined: Tue Dec 27, 2011 5:13 pm
Country: Germany

Re: FrSky Redundancy Bus

Post by jhsa »

I will have to test that for other uses.. ;) It sounds interesting :)

João
My er9x/Ersky9x/eepskye Video Tutorials
https://www.youtube.com/playlist?list=PL5uJhoD7sAKidZmkhMpYpp_qcuIqJXhb9

Donate to Er9x/Ersky9x:
https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=YHX43JR3J7XGW
User avatar
MikeB
9x Developer
Posts: 17990
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: FrSky Redundancy Bus

Post by MikeB »

Why am I not surprised? :mrgreen:

Mike.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
PNaz
Posts: 142
Joined: Tue Dec 27, 2011 5:28 pm
Country: -
Location: Kaleden (Twin Lake), British Columbia

Re: FrSky Redundancy Bus

Post by PNaz »

My testing of the latest redundancy bus revision reveals some unexpected numbers. RBST gives a decimal number of 288 (128) for bit 7 on, 136 (256) for bit 8 on, 96 (512) for bit 9 on, and 24 (1024) for bit 10 on. Receivers were switched positions on the redundancy bus and rebound in order to always have an operating telemetry receiver. Only a single failure was simulated for each test. eg bit 7 test was simulated by only disconnecting RX 1. bit 9 was tested by leaving RX 1 connected but turning off the transmitter module bound with RX 1. Numbers in brackets are the expected numbers according to this table I made up:

RBSV:
Dec 1 Bit 0 channel 1 overload
Dec 2 Bit 1 channel 2 overload
Dec 4 Bit 2 channel 3 overload
Dec 8 Bit 3 channel 4 overload
Dec 16 Bit 4 channel 5 overload
Dec 32 Bit 5 channel 6 overload
Dec 64 Bit 6 channel 7 overload
Dec 128 Bit 7 channel 8 overload
Dec 256 Bit 8 channel 9 overload
Dec 512 Bit 9 channel 10 overload
Dec 1024 Bit 10 channel 11 overload
Dec 2048 Bit 11 channel 12 overload
Dec 4096 Bit 12 channel 13 overload
Dec 8192 Bit 13 channel 14 overload
Dec 16384 Bit 14 channel 15 overload
Dec 32768 Bit 15 channel 16 overload

RBST:
Dec 1 Bit 0 RX1IN overload
Dec 2 Bit 1 RX2IN overload
Dec 4 Bit 2 SBUS overload
Dec 8 bit 3 RX1_FAILSAFE
Dec 16 Bit 4 RX1_LOSTFRAME
Dec 32 Bit 5 RX2_FAILSAFE
Dec 64 Bit 6 RX2_LOSTFRAME
Dec 128 Bit 7 RX1_PHYSICAL_CONNECTION _LOST
Dec 256 Bit 8 RX2_PHYSICAL_CONNECTION _LOST
Dec 512 Bit 9 RX1_NO_SIGNAL
Dec 1024 Bit 10 RX2_NO_SIGNAL

Paul
PNaz
Posts: 142
Joined: Tue Dec 27, 2011 5:28 pm
Country: -
Location: Kaleden (Twin Lake), British Columbia

Re: FrSky Redundancy Bus

Post by PNaz »

I also tested a voice switch with the logic switch you suggested. It works correctly if I use the actual numbers displayed for RBST
e.g. Dec 288 for bit 7 instead of your example of 128

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

Re: FrSky Redundancy Bus

Post by MikeB »

I may have a shift wrong, so numbers are double.
288 is double 144. 144 is 128 + 16. It would make sense that both of these are on at the same time, unplugging RX1 could well cause a lost frame, and then you get Physical_connection_lost.

I'll investigate.

Mike.

Edit: What numbers appear in the log file?
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
PNaz
Posts: 142
Joined: Tue Dec 27, 2011 5:28 pm
Country: -
Location: Kaleden (Twin Lake), British Columbia

Re: FrSky Redundancy Bus

Post by PNaz »

I just checked a log file. All 0 for RBST until I disconnected RX2 then it went to 136 and stayed there until I reconnected RX 2. Right back to 0. I turned off the external module and RBST then went to 16 for a single reading and then to 24 for the rest of the readings until turning the module back on. Log rate is every second.

RBST should be higher numbers for the higher bits and the numbers I am getting decrease as the higher bits go to 1.

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

Re: FrSky Redundancy Bus

Post by MikeB »

The 136 and 24 look reasonable for what you are doing.
I wonder if you would get the 1024 bit set if you powered up the RBOX with RX2 not connected.
I've just posted a new test version, where you may choose what is logged. It also has the extensions to scalers where I can store the scaler result into a telemetry value. I added storing into RBST and checked it displays as the same value as the scaler, so I think the RBST display should be OK.

Mike.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
PNaz
Posts: 142
Joined: Tue Dec 27, 2011 5:28 pm
Country: -
Location: Kaleden (Twin Lake), British Columbia

Re: FrSky Redundancy Bus

Post by PNaz »

Quick test with the R219x2 firmware gave RBST 648 when powering up with RX 2 disconnected and 1312 when powering up with RX 1 disconnected. Log doesn't show any other numbers when powering up. Just 0 then 648 or 1312. It goes back to 0 if the receiver is connected.

Paul

Post Reply

Return to “erskyTx (was ersky9x)”