ERSKY9X Coding

erskyTx runs on many radios and upgrade boards
ersky9x was a port of er9x for use on the sky9x board.
User avatar
MikeB
9x Developer
Posts: 17993
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: ERSKY9X Coding

Post by MikeB »

I've posted a second test version for the 'PRO. I tested this, on a 'PRO, with a FLVSS set to ID 4 and got cells 7-9, then I changed the ID to 1 and got cells 1-3.
This version also has the two new telemetry items Cls1 and Cls2 for the total cells, Cls1 for a sensor with ID 1 and Cls2 for a sensor with any other ID.

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

ozphoenix
Posts: 404
Joined: Fri Oct 28, 2016 11:51 am
Country: Australia

Re: ERSKY9X Coding

Post by ozphoenix »

Ok, thanks for this FrSky tool download -- it works, after a fashion - a few quirks (leaves some figures in some fields -- but not all -- when battery disconnected, etc) -- BUT it did report that some of the MLVSS units were NOT set to the ID reported by the Pro(!)

I have labelled each of my 5 spare MLVSS units with a letter (A-E) and the ID it is now set to, according to the FrSky program on the FLVSS tab. BTW, just a note - I have to connect to the 'Update' port (2) on the STK for this to work- the 'Configure' port (1) does not find the MLVSS - I guess you know that already, but documenting it here for future reference (and for others).

I now have MLVSS units (according to this program and re-read to verify) with the ID shown in the second column. The cell voltages shown in the FrSky program look about right for the battery that I am connecting. Now, running the Change Sport ID program on the Pro (with a Lipo connected to the MLVSS each time) for each MLVSS I get the ID shown in the third column, as reported by the Pro (running D3). When I go to the QX7back port (running C9), I get the fourth column. When I go back to the FrSky program, I get the ID shown in the fifth column (readings were not taken in any particular letter order):
Fr 9P Q7 Fr
ML ID ID ID ID
A 4 10 10 11(!)
B 1 1 1 2(!)
C 2 1 1 2
D 11 1 1 2(!) Thought I smoked my STK Tool here
E 4 3 3 4

NOTE: On the last test (D) I think I slipped as I was connecting the pins of the STK to the MLVSS - my computer made a 'USB disconnected' sound and now the STK does not respond nor appear in the Device Manager of Windows - noticed that I still had a +5 wire in the cable from the STK to the MLVSS and must had touched GND - so, testing with STK is curtailed until I get a new one :(

However, there is evidently a difference between what the STK is/was reading as the ID number on an MLVSS and what ErSky is reading.

Not sure where to go from here, so maybe you can think of something. But, I will now connect two MLVSS to an S8R on my desk and report shortly on the cell readings.

regards,
ozphoenix
MikeB wrote: Tue Jan 01, 2019 11:40 pm This is the program from FrSky (no longer on their web site) that changes sensor ID's (at least some of them). Try the FLVSS tab.

Please try, if you haven't already, just using the MLVSS with ID 4. I only have one FLVSS available (my other one is in a model in the loft so I could get it later). When I tried that on ID 11 I got cells 7-9 showing up (I wasn't using the 'PRO though, another radio with internal XJT).

Mike
MikeB wrote: Tue Jan 01, 2019 11:40 pm This is the program from FrSky (no longer on their web site) that changes sensor ID's (at least some of them). Try the FLVSS tab.

Please try, if you haven't already, just using the MLVSS with ID 4. I only have one FLVSS available (my other one is in a model in the loft so I could get it later). When I tried that on ID 11 I got cells 7-9 showing up (I wasn't using the 'PRO though, another radio with internal XJT).

Mike

Edit: It looks like the ID value shown is one more than the actual value, so my FLVSS shows ID 2 when it is actually ID 1.
Last edited by ozphoenix on Wed Jan 02, 2019 1:16 am, edited 1 time in total.
ozphoenix
Posts: 404
Joined: Fri Oct 28, 2016 11:51 am
Country: Australia

Re: ERSKY9X Coding

Post by ozphoenix »

Ok, thanks - I'll download this newer version of ErSky and do all further radio-based testing with that version.
MikeB wrote: Wed Jan 02, 2019 12:06 am I've posted a second test version for the 'PRO. I tested this, on a 'PRO, with a FLVSS set to ID 4 and got cells 7-9, then I changed the ID to 1 and got cells 1-3.
This version also has the two new telemetry items Cls1 and Cls2 for the total cells, Cls1 for a sensor with ID 1 and Cls2 for a sensor with any other ID.

Mike
ozphoenix
Posts: 404
Joined: Fri Oct 28, 2016 11:51 am
Country: Australia

Re: ERSKY9X Coding

Post by ozphoenix »

Ah, let the Saints be praised! The STK is ok - the computer apparently has an overload protection on the USB ports - tried a soft restart, but didn't help. Did a full power cycle, removing AC, etc., waited a few moments, restarted and all is now working again. Yippeee! Yes, I've now remembered to remove the +5 wire from my STK cable. EDIT: just found out - I had extra cables on the bench - I actually had removed the +5 for my STK, but I picked up the wrong one sometime during this exercise - found the proper cable sitting beside my computer :( Anyway, now forewarned to ALWAYS check which cable I pick up - will label it visibly!
So, MLVSS 'D' (re-tested now) reads ID2(!)
Now, to try the newest ('1') version of ErSky.
ozphoenix
Posts: 404
Joined: Fri Oct 28, 2016 11:51 am
Country: Australia

Re: ERSKY9X Coding

Post by ozphoenix »

Just confirming: I have 2x 3S 2200mAh and 2x MLVSS with B ID 1 and E ID 4, with SR8 and latest version ErSky9x(cells1) on Pro.
In Telemetry Logging, after first power-up onto the batteries, I show ticks beside Cel 7,8,9 and no ticks beside Cel 1,2,3. If I remove ID4 from the end of the chain, after 2-3 secs I get ticks for Cel 1,2,3 and lose them from Cel 7,8,9. If I then re-connect ID4, after 2-3 secs the ticks return to Cel 7,8,9 and I lose them from Cel 1,2,3.
I removed E ID4 completely and replaced it with D ID 11 (it showed ID2 when put onto the STK with FrSKy program, so I re-set it to ID11. In Telemetry Logging, after first power-up onto the batteries, I show ticks beside Cel 7,8,9 and no ticks beside Cel 1,2,3. If I remove D I11 from the end of the chain, after 2-3 secs I get ticks for Cel 1,2,3 and lose them from Cel 7,8,9. If I then re-connect D ID11, after 2-3 secs the ticks DID NOT return to Cel 7,8,9 and I retained them at Cel 1,2,3.
Just FYI: I put each of the MLVSS units back onto the STK and it shows B ID1 as ID2(!), E ID4 as ID4(!) and D ID11 as ID11(!). Something strange between the STK and the radio, again, but cannot detect a full pattern yet - maybe you can.
Last edited by ozphoenix on Wed Jan 02, 2019 9:00 am, edited 1 time in total.

ozphoenix
Posts: 404
Joined: Fri Oct 28, 2016 11:51 am
Country: Australia

Re: ERSKY9X Coding

Post by ozphoenix »

In a similar way to you, I put a single MLVSS D ID11 and got ticks on Cel 7,8,9. I put a single B ID1 and got Cel 1,2,3. I put a single E ID4 and got ticks on Cels 7,8,9. So, as a single unit system, it works as expected. As a 2x units system, it does not.
An interesting note: I put a single C ID2 and got ticks on Cels 1,2,3(!) I then added MLVSS B ID1 to the chain and lost all three ticks on Cels 1,2,3 and they did not re-appear as ticks on Cels 7,8,9. I removed B ID1 from the chain and the ticks re-appeared on Cels 1,2,3 from the C ID2.
ozphoenix wrote: Wed Jan 02, 2019 2:25 am Just confirming: I have 2x 3S 2200mAh and 2x MLVSS with B ID 1 and E ID 4, with SR8 and latest version ErSky9x on Pro.
In Telemetry Logging, after first power-up onto the batteries, I show ticks beside Cel 7,8,9 and no ticks beside Cel 1,2,3. If I remove ID4 from the end of the chain, after 2-3 secs I get ticks for Cel 1,2,3 and lose them from Cel 7,8,9. If I then re-connect ID4, after 2-3 secs the ticks return to Cel 7,8,9 and I lose them from Cel 1,2,3.
I removed E ID4 completely and replaced it with D ID 11 (it showed ID2 when put onto the STK with FrSKy program, so I re-set it to ID11. In Telemetry Logging, after first power-up onto the batteries, I show ticks beside Cel 7,8,9 and no ticks beside Cel 1,2,3. If I remove D I11 from the end of the chain, after 2-3 secs I get ticks for Cel 1,2,3 and lose them from Cel 7,8,9. If I then re-connect D ID11, after 2-3 secs the ticks DID NOT return to Cel 7,8,9 and I retained them at Cel 1,2,3.
Just FYI: I put each of the MLVSS units back onto the STK and it shows B ID1 as ID2(!), E ID4 as ID4(!) and D ID11 as ID11(!). Something strange between the STK and the radio, again, but cannot detect a full pattern yet - maybe you can.
ozphoenix
Posts: 404
Joined: Fri Oct 28, 2016 11:51 am
Country: Australia

Re: ERSKY9X Coding

Post by ozphoenix »

Separate of the strange things happening with ID numbers, which I am sure will become clearer with time (I guess), I seem to be getting the same (or similar) results as you with a single unit system, but the failing seems to be when I go to a 2x MLVSS system. I think it might be necessary for you to get hold of your second FLVSS, if possible, to replicate my system as closely as possible. If worst comes to worst, maybe FrSky will provide you with 2x MLVSS to test(?) or, further still, maybe I need to send two units to you from Oz.
I think I've run out of things to test, for now, and I'm sure you must be in the land of nod by now, so I'll get on with other things until I hear back from you or I have some flash of enlightenment regarding further testing I can do with the tools I currently have.
Many thanks for the FrSky tool - it's a little rough around the edges (leaves some wrong values behind sometimes, etc and needs reset and reconnect between each new device, etc) but it should be useful for future things, I guess :))
Regards,
ozphoenix
User avatar
Kilrah
Posts: 11109
Joined: Sat Feb 18, 2012 6:56 pm
Country: Switzerland

Re: ERSKY9X Coding

Post by Kilrah »

Just in case it might help, OpenTX supports that setup just fine.
ozphoenix
Posts: 404
Joined: Fri Oct 28, 2016 11:51 am
Country: Australia

Re: ERSKY9X Coding

Post by ozphoenix »

Thanks, Kilrah - appreciated, and it was a thought I had, to see if it worked the same way, but I like and want to stick with ErSky9x on my own radios - I'm sure it will get resolved - it could just as easily be something I am doing wrong and going to OpenTx might not help. But, thanks for the thought and confirmation that it works, anyway.
ozphoenix
Posts: 404
Joined: Fri Oct 28, 2016 11:51 am
Country: Australia

Re: ERSKY9X Coding

Post by ozphoenix »

Hi Mike,
P.S. and oh-by-the-way.... I can confirm that the ex Source bug appears to be resolved in these recent 'special' cell versions.
I have not noticed any watchdog timer reboot events so far.
MikeB wrote: Tue Jan 01, 2019 7:14 pm I've just posted a specific test version for you to try.
This should fix the Scaler ex_source editing bug.
......
Please test this version carefully as I thought I saw a watchdog reboot happen on mine.

Mike
ozphoenix
Posts: 404
Joined: Fri Oct 28, 2016 11:51 am
Country: Australia

Re: ERSKY9X Coding

Post by ozphoenix »

Mike,
In the 'cells1' version, if I have only one MLVSS (ID1) connected and one 3S battery, on the Telemetry Cell Scaling page cells 1,2,3 all show an expected value (for now) of about 3.85v and there is a tick beside Cells 1,2,3 on the Telemetry Logging page. If I disconnect the battery balance lead, the value for Cell1 on the Scaling page goes to 0.0v (as expected) but the values for Cells 2 and 3 remain at the last known value (about 3.85v each) and on the Logging page, the tick remains beside Cell1 but there is no tick beside Cells 2 or 3. I would have expected the tick to remain beside all three cells on the Logging page and all 3 values to go to 0.0V on the Scaling page.
regards,
ozphoenix
User avatar
MikeB
9x Developer
Posts: 17993
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: ERSKY9X Coding

Post by MikeB »

Kilrah wrote: Wed Jan 02, 2019 7:00 am Just in case it might help, OpenTX supports that setup just fine.
Do you know if two MLVSS have been tested in openTx, rather than two FLVSS?
I'm suspecting there may be a problem with the MLVSS.

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

Re: ERSKY9X Coding

Post by MikeB »

I've retrieved my other FLVSS and tested with one on the (default) ID of 1 and the other on ID 11. I have a 3-cell lipo and a 4-cell lipo.
All worked as I expected!
With both connected up I have cells 1,2,3 and cells 7,8,9,and 10 showing. Disconnecting either lipo caused the corresponding set of cells to lose their ticks in the logging menu with the values going to 0.
In the cell scaling menu, all cells retained their last value, but the highlight flashes indicating no received data.
Ctot showed the total of all 7 cells, while the (new) Cls1 and Cls2 showed the correct 3 and 4-cell totals.

I'll look to get a couple of MLVSS sensors and test them.

A test you could try is, with both sensors connected, create a raw log file and post it so I may see what is being received.

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

Re: ERSKY9X Coding

Post by Kilrah »

MikeB wrote: Wed Jan 02, 2019 12:40 pm Do you know if two MLVSS have been tested in openTx, rather than two FLVSS?
I'm suspecting there may be a problem with the MLVSS.
I never used an MLVSS, so doubt it. But the way we do it, if one works any number of them will.
User avatar
MikeB
9x Developer
Posts: 17993
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: ERSKY9X Coding

Post by MikeB »

True, as long as the data from two MLVSS sensors is correct. In ersky9x currently, a FLVSS or MLVSS on the default ID (of 1) populates cells 1-6 and a sensor not on the default ID populates cells 7-12, and this is what I see with two FLVSS sensors.
The report we have is a MLVSS on ID 1, by itself, populates 1-6 and a MLVSS on a different ID, by itself, populates 7-12, but with both connected only 1-6 are populated.

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: ERSKY9X Coding

Post by jhsa »

Mike, just an idea here (probably a stupid one :) ), but what about a sub menu in the Telemetry menu called for example "Manage sensors"??
Perhaps we could then select which telemetry fields would be attached to each of them. If both (or more) have voltage sensors perhaps some Identifier name for each sensor could be created, example "1CL2", meaning sensor 1, cell 2. I know, it looks confusing. If only you could make the name at least one character longer it would be nice..

This would probably mean a rewrite of how the telemetry works and is displayed?

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
ozphoenix
Posts: 404
Joined: Fri Oct 28, 2016 11:51 am
Country: Australia

Re: ERSKY9X Coding

Post by ozphoenix »

Mike,
I earlier made a couple of log files but now don't remember the exact sequence of connect/disconnect and also ID numbers in use for those files (I saw received data for various cells, but it varied depending on the ID numbers of the MLVSS I was connecting at the time -- not all received data was displayed in the Cell Scaling fields, if I recall correctly - can't remember about the ticks in the Logging page).
I have a little something I need to do for an hour or two, but shortly I will sit and create a definitive set of verified MLVSS ID numbers and a connection sequence and create a new matching log file and document it and send it to you for review.

regards,
ozphoenix
MikeB wrote: Wed Jan 02, 2019 12:52 pm I've retrieved my other FLVSS and tested with one on the (default) ID of 1 and the other on ID 11. I have a 3-cell lipo and a 4-cell lipo.
All worked as I expected!
With both connected up I have cells 1,2,3 and cells 7,8,9,and 10 showing. Disconnecting either lipo caused the corresponding set of cells to lose their ticks in the logging menu with the values going to 0.
In the cell scaling menu, all cells retained their last value, but the highlight flashes indicating no received data.
Ctot showed the total of all 7 cells, while the (new) Cls1 and Cls2 showed the correct 3 and 4-cell totals.

I'll look to get a couple of MLVSS sensors and test them.

A test you could try is, with both sensors connected, create a raw log file and post it so I may see what is being received.

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

Re: ERSKY9X Coding

Post by MikeB »

Please do a "raw" logfile as that will contain the exact telemetry data actually received, complete with ID values.
To select raw logging, go to the DEBUG menu (UP long, then RIGHT several times), then press MENU long to tick the "Raw Logging" box. This option is NOT kept when you power off.

Mike
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
ozphoenix
Posts: 404
Joined: Fri Oct 28, 2016 11:51 am
Country: Australia

Re: ERSKY9X Coding

Post by ozphoenix »

will do.
MikeB wrote: Wed Jan 02, 2019 9:58 pm Please do a "raw" logfile as that will contain the exact telemetry data actually received, complete with ID values.
To select raw logging, go to the DEBUG menu (UP long, then RIGHT several times), then press MENU long to tick the "Raw Logging" box. This option is NOT kept when you power off.

Mike
ozphoenix
Posts: 404
Joined: Fri Oct 28, 2016 11:51 am
Country: Australia

Re: ERSKY9X Coding

Post by ozphoenix »

Changed EID4 to EID1, as BID1 regularly showed up as ID2 when returned to the STK and FrSKy SPort utility - not sure why, but it was clouding the issues - have now set BID1 to become B ID2 and will look into this later, somehow.
Checked two MLVSS units (D and E) for ID with FrSky SPort program and STK - repeatedly show as D ID11 and E ID 1 - will use these for logging.
Set DEBUG to RAW, set Telemetry logging to 0.5s sampling, left all boxes ticked.
Powered up S8R (powered by 3S which will be connected to first MLVSS), confirmed bind.
I then started logging and first added MLVSS E ID1 with 3S 2200mAh (partially discharged) as first unit in chain from S8R port, waited about 5 seconds then added MLVSS D ID11 with 4S 2650mAh (partially discharged) for about 5 seconds, then removed MLVSS D ID11 for about 5 seconds, then stopped logging.
The collected log file is attached as a .zip file and as a .rar file (forum would not let me attach as a .raw)

regards
ozphoenix
Attachments
S6RTEST-2019-01-03-091701.rar
(874 Bytes) Downloaded 186 times
S6RTEST-2019-01-03-091701.7z
(929 Bytes) Downloaded 180 times
Last edited by ozphoenix on Thu Jan 03, 2019 2:17 am, edited 1 time in total.
ozphoenix
Posts: 404
Joined: Fri Oct 28, 2016 11:51 am
Country: Australia

Re: ERSKY9X Coding

Post by ozphoenix »

Mike,
Which tool can I use to best read the .raw file easily - I would like to try to understand why the IDs are not matched between the 9XRPro and the FrSky tool?
Regards,
ozphoenix
ozphoenix
Posts: 404
Joined: Fri Oct 28, 2016 11:51 am
Country: Australia

Re: ERSKY9X Coding

Post by ozphoenix »

Mike,
In case the other two files are not useful to you - here is the original .raw file, but with the word 'modded' added to the title and the extension changed (but only textually changed) to .rar (it is still a .raw file) to get around the forum posting restriction.
Attachments
S6RTEST-2019-01-03-091701modded.rar
(6.14 KiB) Downloaded 194 times
ozphoenix
Posts: 404
Joined: Fri Oct 28, 2016 11:51 am
Country: Australia

Re: ERSKY9X Coding

Post by ozphoenix »

Ok, someone (more than just Mike, I think) has downloaded my log files a number of times - would someone tell me which is the best software tool that they are using to view them, please? I have an IT background and probably have them lying around from earlier times, but save me the time of looking for them or new ones, please.
ozphoenix
Posts: 404
Joined: Fri Oct 28, 2016 11:51 am
Country: Australia

Re: ERSKY9X Coding

Post by ozphoenix »

Ok, got Binary Viewer from Proxoft - seems to work. Anyone offer me the file layout? Or, is it similar to OpenTx and maybe I can find that description on OpenTX GitHub?
User avatar
Kilrah
Posts: 11109
Joined: Sat Feb 18, 2012 6:56 pm
Country: Switzerland

Re: ERSKY9X Coding

Post by Kilrah »

Any hex editor.

I see only one sensor with ID1 in this.
User avatar
MikeB
9x Developer
Posts: 17993
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: ERSKY9X Coding

Post by MikeB »

Likewise!
A packet for a lipo sensor looks like:
7E A1 10 00 03 30 5F 47 76 9F
7E = start
A1 = ID (least 5 bits only)
10 = Data frame
00 03 = App ID (little endian so 0300)
30 = the 3 is number of cells, the zero is start cell
5F 47 76 = Battery voltages, 12 bits per cell
9F = CRC

So you are looking for a packet starting 7E 0B 10 00 03 where the 0B is not the A1 you have in this log file, and may have some of the top 3 bit set.
After the 00 03, you are looking for 40 or 42 for a lipo sensor with 4 cells attached.

Mike
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
ozphoenix
Posts: 404
Joined: Fri Oct 28, 2016 11:51 am
Country: Australia

Re: ERSKY9X Coding

Post by ozphoenix »

Ok, thanks - had to go out and about - will be back at my house later today (our time, probably after your snooze time) and will stay digging around, for the hell of it.
ozphoenix
Posts: 404
Joined: Fri Oct 28, 2016 11:51 am
Country: Australia

Re: ERSKY9X Coding

Post by ozphoenix »

Is there an available format I can have for other sensors, such as vario, GPS and in-line current sensor (I have each)? Or, is it similar with changes for sensor type, etc.
User avatar
MikeB
9x Developer
Posts: 17993
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: ERSKY9X Coding

Post by MikeB »

You may find you need to wait longer than 5 seconds after connecting a sensor before data is sent.
At the end of a logging test, wait a few more seconds, I buffer 256 bytes of raw data before writing it to the file, so you may "lose" up to 256 bytes when you stop logging.

The format is the same:
7E
Physical ID
10
xx xx Application ID
xx xx xx xx data
xx CRC

Frames starting 7E 98 10 xx F1 are from the XJT and have RSSI or SWR or RxV in them.

Mike
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
ozphoenix
Posts: 404
Joined: Fri Oct 28, 2016 11:51 am
Country: Australia

Re: ERSKY9X Coding

Post by ozphoenix »

Ok, all good info - many thanks. I'll make a new file with 20 secs of each step when I get back to my house, if you like, with the same two devices. I can also prepare a second file with added vario and current sensor (gps needs me to be outside for a while, so will not include that, for now) just to get done reference material, in case that's also handy. I can also do another file with many MLVSS of different IDs, if that would help, but maybe it will confuse the issue.

Post Reply

Return to “erskyTx (was ersky9x)”