Using FrSky S6R with ersky9x

ersky9x is a port of er9x for use on the sky9x board.
Post Reply
User avatar
MikeB
9x Developer
Posts: 16131
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Using FrSky S6R with ersky9x

Post by MikeB » Wed Oct 12, 2016 2:38 pm

I have received a request to add support for the FrSky S6R stabiliser receiver on ersky9x. In particular, adding the ability to configure the S6R from the radio. The request included some funds to enable me to purchase a S6R :shock: :D .

So, I had a S6R delivered today!
I also got a STK to allow configuration from a PC.

To be able to configure the S6R from the radio requires sending Sport data out from the radio, so needs a bi-directional SPort connection.
The Taranis (X9D, X9D plus and X9E), 9XR-PRO and 9Xtreme platforms all have this as standard.
The SKY board and AR9X boards do not have this, although it should be possible make it work by connecting COM1 Tx and Rx together, possibly including a diode in the connection. If this is done, it will probably cause problems if using a DJT and requiring the radio configure the alarms on the DJT. It may be necessary to either remove the ability to configure a DJT in this way, or add an option to indicate that COM1 is configured as SPort and so it isn't possible to access a DJT for configuration.
Note that eepskye includes a facility to configure the alarms on a DJT.

There is also a problem with the SKY board. It 'only' has 256K of flash memory, and the firmware is approaching this limit. All the other platforms have at least 512K of flash.
My plan, for now, is to provide a version of ersky9x that only supports 2 or 3 languages. This would save 25K of flash, and would be for the SKY board only.

I've also now added a test version of "SportSet" that I originally wrote to allow setting the UART sensor. This now also has a "tab" for the S6R. To install, simply unzip the files in the .zip into a suitable directory (if you have eepe/eepskye installed, you may just put SportSet.exe into your eepe directory).
To use, connect your S6R using the STK device to your computer, then run SportSet. Select the S6R tab and choose the COM port your STK is on. Then click the "start" button. SportSet should then read the parameters from the S6R, then you may use the "next" and "Previous" buttons to step through them. You may change any value and then use the "Write" button to write the new value (just the one) to the S6R. Clicking the "Read" button reads a single value from the S6R.
Be aware this is a first test version. I'm posting it as it allows setting servo directions to "Off" that cannot be done using the FrSky program.

Mike.
S8RonErsky9x.pdf
07-Jan-2018 12:39
Instructions for using menu and script to configure a S6R or S8R
(80.14 KiB) Downloaded 199 times
Test Version of "SportSet"
SportSet(9).zip
23-Dec-2017 22:41
Support Quick Mode setting
Support AUX1 and AUX2 settings
Add version text
Add Print facility
Only the .exe in this .zip, install from SportSet.zip first, then copy this .exe to the same directory
(147.32 KiB) Downloaded 207 times
SportSetLinux(8).zip
09-Apr-2017 11:22
Support AUX1 and AUX2 settings
Add version text
Add Print facility
(151.72 KiB) Downloaded 152 times
SportSetMac.zip
SportSet built for a Mac
(10.25 MiB) Downloaded 143 times
SportSet(8).zip
15-Jan-2017 21:15
Support AUX1 and AUX2 settings
Add version text
Add Print facility
Only the .exe in this .zip, install from SportSet.zip first, then copy this .exe to the same directory
(147.13 KiB) Downloaded 485 times
SportSet(7).zip
24-Dec-2016 16:19
Add Print facility
(146.67 KiB) Downloaded 195 times
SportSetLinux(6).zip
09-Dec-2016 13:48
Handle S6R incorrect packets with 'unstuffed' checksum.
(140.26 KiB) Downloaded 102 times
SportSet(6).zip
09-Dec-2016 13:48
Handle S6R incorrect packets with 'unstuffed' checksum.
(140.28 KiB) Downloaded 151 times
SportSetLinux(5).zip
27-Nov-2016 16:47
Fix a timing bug
(137.52 KiB) Downloaded 87 times
SportSet (5).zip
27-Nov-2016 16:47
Fix a timing bug
(138.26 KiB) Downloaded 126 times
SportSetLinux(4).zip
26-Nov-2016 23:08
Linux version (this called SportSet1).
Calibration added
(137.43 KiB) Downloaded 68 times
SportSet (4).zip
26-Nov-2016 23:08
Windows version.
Calibration added
(138.16 KiB) Downloaded 96 times
SportSetLinux.zip
25-Nov-2016 18:47
Linux version (this called SportSet1).
This should work if you put it in your eepe folder, or you may need some QT libs
(86.13 KiB) Downloaded 74 times
SportSet (3).zip
24-Nov-2016 17:11
Graphics for the mounting options added.
Offset angle and enable values added
Single COM port selector with 'scan' button to re-discover available COM ports
Reads all values at start
Displays graphics for wing type
Verifies data after writing
Only the .exe, install from SportSet.zip first, then copy this .exe to the same directory
(87.13 KiB) Downloaded 102 times
SportSet (2).zip
22-Nov-2016 19:07
Update - reads all values at start
Displays graphics for wing type
Verifies data after writing
Only the .exe, install from SportSet.zip first, then copy this .exe to the same directory
(117.78 KiB) Downloaded 97 times
SportSet.zip
20-Nov-2016 16:33
(5.33 MiB) Downloaded 365 times
Test versions of ersky9x follow.
ersky9xa_roms6r9.zip
03-Nov-2016 23:33
Fixes for SIM and text editing
SKY/AR9X and 9XR-PRO
(334.87 KiB) Downloaded 106 times
ersky9xr_roms6r8.zip
27-Oct-2016 12:14
Add Calibration option
Failsafe setting moved to protocol menu
Add "Off" option for ELE2
SKY/AR9X, 9XR-PRO, 9Xtreme and Taranis/plus
(856.91 KiB) Downloaded 261 times
ersky9xr_roms6r7.zip
25-Oct-2016 18:56
Add failsafe setting
Add "Off" option for ELE2
SKY/AR9X, 9XR-PRO and Taranis/plus
Add images of S6R
(671.84 KiB) Downloaded 72 times
ersky9xr_roms6r6.zip
24-Oct-2016 19:01
SKY/AR9X, 9XR-PRO and Taranis/plus
Add more parameters
Remove some debug
Add images of S6R
(670.02 KiB) Downloaded 86 times
ersky9x/er9x developer
The difficult we do immediately,
The impossible takes a little longer!


User avatar
jhsa
Posts: 18494
Joined: Tue Dec 27, 2011 5:13 pm
Country: Germany

Re: Using FrSky S6R with ersky9x

Post by jhsa » Wed Oct 12, 2016 4:10 pm

So, that wouldn't apply if the Ar9x board is selected in hardware, Right?

Sent from my thor using Tapatalk
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: 16131
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: Using FrSky S6R with ersky9x

Post by MikeB » Wed Oct 12, 2016 5:19 pm

We will end with a .bin file for the AR9X specifically, and another .bin for the SKY board. Current test versions look at the processor, and if there is 512K flash, automatically set AR9X anyway.

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

User avatar
jhsa
Posts: 18494
Joined: Tue Dec 27, 2011 5:13 pm
Country: Germany

Re: Using FrSky S6R with ersky9x

Post by jhsa » Wed Oct 12, 2016 5:41 pm

Thanks Mike, about the DJT, I believe there is no need to set alarms on the module itself.. As you say, eepskye could do that anyway..

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

andrewju
Posts: 755
Joined: Tue Aug 21, 2012 7:29 am
Country: Russian Federation
Location: Moscow

Re: Using FrSky S6R with ersky9x

Post by andrewju » Sat Oct 15, 2016 4:58 pm

Thanks, Mike! :)

Regarding XJT and DJT, may it be an idea to assume an XJT / S.Port-capable device when protocol is set to PXX, and assume DJT otherwise?

Though, I'm not sure if this is applicable in the maintenance mode (there are no model settings there!)...


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

Re: Using FrSky S6R with ersky9x

Post by MikeB » Fri Oct 21, 2016 11:15 am

An update on progress (I've not had much time over the last few days).
I've re-written the SPort receive code to use interrupts (instead of DMA) so I can monitor for a poll and send SPort data out. This is all working, and I am able to send a SPort packet out and see it sent out from a X8R, so the driver code is all working (tested on a 9XR-PRO).
The next step is to add a menu to make use of this and get/send data from/to a S6R.

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

User avatar
jhsa
Posts: 18494
Joined: Tue Dec 27, 2011 5:13 pm
Country: Germany

Re: Using FrSky S6R with ersky9x

Post by jhsa » Fri Oct 21, 2016 2:46 pm

Perhaps a Sub-Menu from the telemetry menu? Just like the custom screens?

Thanks

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: 16131
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: Using FrSky S6R with ersky9x

Post by MikeB » Fri Oct 21, 2016 6:44 pm

To get this working, I've just added another menu when you go UP from the main screen. Exactly where this ends up is still to be decided.
I've got the first two items (wing type and mounting) working, I can read the values from the S6R, update them and write them back.

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

andrewju
Posts: 755
Joined: Tue Aug 21, 2012 7:29 am
Country: Russian Federation
Location: Moscow

Re: Using FrSky S6R with ersky9x

Post by andrewju » Sat Oct 22, 2016 11:32 am

Wow, terrific! Thanks, Mike!!!

For some reason, I imagine this should be part of the Maintenance mode. As I understand, this is something that doesn't need to be changed on a regular basis. So it's Ok to start your radio in the Maintenance mode, make necessary changes and then reboot for normal flying.

The S.Port firmware update, Device ID change and the new S6R configuration could be grouped to something like an "S.Port Tools" in the Maintenance mode.

User avatar
jhsa
Posts: 18494
Joined: Tue Dec 27, 2011 5:13 pm
Country: Germany

Re: Using FrSky S6R with ersky9x

Post by jhsa » Sat Oct 22, 2016 1:03 pm

If that is the case I agree with Andrewju. I don't have that hardware myself,,

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
Kilrah
Posts: 9832
Joined: Sat Feb 18, 2012 6:56 pm
Country: Switzerland

Re: Using FrSky S6R with ersky9x

Post by Kilrah » Sat Oct 22, 2016 1:24 pm

Calibration only needs to be done once indeed, but setting directions and gains is something you might need to do quite a few times and would want the radio/sticks to be operational when you do so that you can check response.

andrewju
Posts: 755
Joined: Tue Aug 21, 2012 7:29 am
Country: Russian Federation
Location: Moscow

Re: Using FrSky S6R with ersky9x

Post by andrewju » Sat Oct 22, 2016 2:18 pm

Well, then it should be somewhere in the model settings. Perhaps, an item in the 'Protocol' section that gets you to the corresponding menu.

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

Re: Using FrSky S6R with ersky9x

Post by MikeB » Sat Oct 22, 2016 2:33 pm

I've put a test version of ersky9x on the first post. The S6R menu is UP LONG, then LEFT twice.
Make sure you have the S6R powered on and bound to the Tx.
In the menu, use DOWN and UP to select the item you wish to view/edit (they are not all there yet). The value will show as "-----". Press MENU SHORT and the value will be requested from the S6R. If the value doesn't appear after a second or so, try MENU again.
Once the value is present, you may edit it. MENU LONG will then write the value to the S6R.
This may not be the best method, but it seems to at least work. I'm open to suggestions for improvement. Note that fetching a value from the S6R does take some time, so trying to read all the values could take a long time.
For now, I'd like to know if this much is working and useable. I've only tested the 9XR-PRO as I don't have any diodes fitted on SKY/AR9X boards (yet).

Note that these test versions also include the use of trim switches in places where any switch might be used. There is an automatic mechanism in place for these. If no mix is active with a trim included, and the trim value is not being used as a GVAR source, then the relevant trim switches will not change the trim value.

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

andrewju
Posts: 755
Joined: Tue Aug 21, 2012 7:29 am
Country: Russian Federation
Location: Moscow

Re: Using FrSky S6R with ersky9x

Post by andrewju » Sat Oct 22, 2016 3:11 pm

I'll try the test version on my AR9x tonight, and will post back.

I didn't get the point regarding trim switches. If no mix uses certain trim switch and that switch is not part of GVAR, shouldn't it act as a regular trim switch - i.e. change the trim value as usual?

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

Re: Using FrSky S6R with ersky9x

Post by MikeB » Sat Oct 22, 2016 4:01 pm

There are 8 trim switches, that might just be considered as 8 push buttons. If you don't need a particular trim (e.g. throttle trim on an electric 'plane), then why not have the two trim switches available for some other purpose? That is what the change is about. By stopping the trim switches from changing the trim value, you both stop the beeps you get and also stop scheduling an EEPROM write that is needed when you change a trim value.
If the trim value is not being used, why have the trim switches change it?

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

andrewju
Posts: 755
Joined: Tue Aug 21, 2012 7:29 am
Country: Russian Federation
Location: Moscow

Re: Using FrSky S6R with ersky9x

Post by andrewju » Sat Oct 22, 2016 5:38 pm

Wait, wait... I understand the idea and I think it's great. But I think I'm missing something essential here.

By-default, when we create a new model, the trim switches work "the usual way". Do you mean there is a mix for them already in place? I'm far from being an expert in ER9x, so I never saw it...

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

Re: Using FrSky S6R with ersky9x

Post by MikeB » Sat Oct 22, 2016 6:02 pm

The basic 4 mixes on a newly created model (Ail, Ele, Thr, Rud) have their trims included by default. There is an option in the mixes "Include Trim" that is enabled. You would have to disable that.

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

andrewju
Posts: 755
Joined: Tue Aug 21, 2012 7:29 am
Country: Russian Federation
Location: Moscow

Re: Using FrSky S6R with ersky9x

Post by andrewju » Sat Oct 22, 2016 6:29 pm

Ah, now I got it! :)
Will try to test the trims as well, if I have enough time tonight.

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

Re: Using FrSky S6R with ersky9x

Post by MikeB » Sat Oct 22, 2016 8:12 pm

Early testing at present, but I now have this working on the 9Xtreme and the Taranis, so , if anyone else has a S6R, and wants to test configuring it using either of these transmitters, I'll post test versions for them.

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

andrewju
Posts: 755
Joined: Tue Aug 21, 2012 7:29 am
Country: Russian Federation
Location: Moscow

Re: Using FrSky S6R with ersky9x

Post by andrewju » Sat Oct 22, 2016 8:56 pm

Ok, I'm on the test version now.

Something works - I mean, I can fetch the details from the S6R. There seem to be a minor cosmetics issue with "Ail2 Dir." and "Ele2 Dir.": the value "Ail S" is aligned to the left, while the value "Invers" is in the middle (same as other values). But that's not important, really.

I can also store new values, although right now it doesn't feel like this works reliably. I mean, I change the value and hold Menu for a couple of seconds. Then I go to another parameter and return back to the changed one. I re-read the value and sometimes a new one is stored, sometimes it's still an old one. Maybe I need to hold Menu longer, but I'm not sure.

Sometimes the communication gets lost. I can't even fetch existing values. Maybe it's S6R that is not responding - I'm not sure. The numbers in the bottom of the screen read "0000 0087 0064". Sometimes it starts working again when I scroll through several parameters.

andrewju
Posts: 755
Joined: Tue Aug 21, 2012 7:29 am
Country: Russian Federation
Location: Moscow

Re: Using FrSky S6R with ersky9x

Post by andrewju » Sat Oct 22, 2016 9:07 pm

Offtopic: What does "F1 E1" mean in the Bootloader mode? Is it "All Ok", or speaks about some issue?

For some reason, when I connect my radio to the PC, I can't access the SDcard. I get the drive letter in Explorer, but I cannot open the disk ("Please insert a disk into Removable Disk"). This radio with this particular SD card used to work just fine previously. And the SD card works well when inserted directly into the PC.

andrewju
Posts: 755
Joined: Tue Aug 21, 2012 7:29 am
Country: Russian Federation
Location: Moscow

Re: Using FrSky S6R with ersky9x

Post by andrewju » Sat Oct 22, 2016 9:26 pm

Thinking of the usability...
I think all of the parameters need to be listed on the screen (or grouped in several screens). It would be best to have a parameter and its value at the same line (just like we currently have in other menus). Short press of "Menu" on a parameter should fetch its value from the S6R. Then the parameter can be changed and new value stored in the S6R with a "Menu Long".

It would also be good to have an option to fetch all values for the parameters displayed on the screen. Yes, it'll take some time, but if the information will be updated from top to bottom, line by line, the user will see something is happening and will wait accordingly.

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

Re: Using FrSky S6R with ersky9x

Post by MikeB » Sat Oct 22, 2016 11:05 pm

I noticed sometimes it doesn't respond to requests when pressing MENU. Just testing on a Taranis and a 9Xtreme, they seem much more reliable, responding every time. I'll investigate to see what is the difference.

F1 and E1 in the bootloader relate to the Flash and Eeprom being protected from writing. They may be ignored.
What revision of the bootloader are you running? I'm using 2.0, and can access the SD card (8Gb) from the PC with no problems.

I put the parameter on the next line as the description and value didn't always fit on a single line.

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

andrewju
Posts: 755
Joined: Tue Aug 21, 2012 7:29 am
Country: Russian Federation
Location: Moscow

Re: Using FrSky S6R with ersky9x

Post by andrewju » Sun Oct 23, 2016 6:41 am

MikeB wrote:I noticed sometimes it doesn't respond to requests when pressing MENU. Just testing on a Taranis and a 9Xtreme, they seem much more reliable, responding every time.
Hmm, that's interesting...
F1 and E1 in the bootloader relate to the Flash and Eeprom being protected from writing. They may be ignored.
What revision of the bootloader are you running? I'm using 2.0, and can access the SD card (8Gb) from the PC with no problems.
I believe I used to have F1 and E0 in the bootloader screen before I updated it from the S6R beta firmware. I had no issues accessing SD card before the update. The bootloader now reports version 2.1. Unfortunately, I don't remember which version I had before (though, I suppose it was the same 2.1).
I put the parameter on the next line as the description and value didn't always fit on a single line.
If there's no simple way to reduce some words to fit a single line, I think it's fine to keep it on two lines.

Another option could be to just list the parameters, and the values will be open on a new screen. But then there is no easy way to view all the values on one screen - people will have to click every parameter one by one just to see existing configuration...

Thanks!!!

andrewju
Posts: 755
Joined: Tue Aug 21, 2012 7:29 am
Country: Russian Federation
Location: Moscow

Re: Using FrSky S6R with ersky9x

Post by andrewju » Sun Oct 23, 2016 8:07 am

Update regarding the bootloader and SD-card: I think my issue may have been related to something within Windows rather than to the radio itself. I rebooted my PC this morning, and I can access SD-card in the radio again.
I apologize for the false alarm! :)

User avatar
jhsa
Posts: 18494
Joined: Tue Dec 27, 2011 5:13 pm
Country: Germany

Re: Using FrSky S6R with ersky9x

Post by jhsa » Sun Oct 23, 2016 8:20 am

Do you have a Turnigy computer? ;) :mrgreen:

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

andrewju
Posts: 755
Joined: Tue Aug 21, 2012 7:29 am
Country: Russian Federation
Location: Moscow

Re: Using FrSky S6R with ersky9x

Post by andrewju » Sun Oct 23, 2016 8:29 am

Come on! Unlike a PC with Windows, Turnigy with ER9x is much more reliable and doesn't need reboots! It just works properly all the time! :)

User avatar
jhsa
Posts: 18494
Joined: Tue Dec 27, 2011 5:13 pm
Country: Germany

Re: Using FrSky S6R with ersky9x

Post by jhsa » Sun Oct 23, 2016 8:42 am

You are absolutely right and I totally agree :mrgreen:
Just make sure your Turnigy PC is not running Flysky OS ;) :D

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: 16131
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: Using FrSky S6R with ersky9x

Post by MikeB » Sun Oct 23, 2016 9:03 am

How do you update the firmware? If you use the bootloader, and flash from eepskye, then the bootloader is not updated.
If you use STM DFU and zadig, then the bootloader is updated.

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

andrewju
Posts: 755
Joined: Tue Aug 21, 2012 7:29 am
Country: Russian Federation
Location: Moscow

Re: Using FrSky S6R with ersky9x

Post by andrewju » Sun Oct 23, 2016 10:16 am

I use bootloader and update firmware via eepskye. Then I copy the firmware file to SD, start the radio in Maintenance mode and update the Bootloader from there.

Anyway, the bootloader v2.1 works fine for me now. As I said, I suspect it was Windows that caused SD card access issues yesterday.


Post Reply

Return to “ersky9x”