New beta version of openXsensor (=openXvario)

Development & General Chat for the superb openxvario project.

Moderator: rainer

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

Re: New beta version of openXsensor (=openXvario)

Post by MikeB »

mstrens wrote: Mon Aug 28, 2017 12:06 pmIf later on I implement a config response, I presume that oXs should send the config only it get a polling from the Rx with his own physical ID (in order to avoid conflict with other sensors).
Correct!

I'm making use of AppID 0x50FF. I know that a number of the lower IDs are in use, I think it is pixhawk "passthrough" telemetry.
I suggest using 0x50FE if you want to use one of the user DIY IDs, otherwise, use the AppID of the 'sensor' (e.g. Fuel) you are configuring.

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

mstrens
Posts: 1435
Joined: Fri Dec 27, 2013 7:49 pm
Country: -

Re: New beta version of openXsensor (=openXvario)

Post by mstrens »

MikeB wrote: Sun Aug 27, 2017 10:55 pm While working on a somewhat related project, I've got a modification to the SPort serial code that receives SPort packets as well as sending them. Now the SPort protocol includes specific configuration commands as well as data commands. What this allows is the option to run a script on the Tx that sends configuration data to a sensor connected to the Rx. Such configuration data may be stored in EEPROM on the sensor.

This might be useful for the openXsensor where you wish to calibrate something. Calibrate it when in operation, rather than needing to change a config file and re-compile.

Any interest?

Mike.
Mike, could you provide me your code for the Sport serial.
I got a comment from a user that there is an issue with my latest version of oXs for GPS over SPORT. Perhaps it is the result of the changes I made myself in this part of the code. So I could test with your code.
User avatar
MikeB
9x Developer
Posts: 17979
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: New beta version of openXsensor (=openXvario)

Post by MikeB »

Sent by PM.

Mike.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
mstrens
Posts: 1435
Joined: Fri Dec 27, 2013 7:49 pm
Country: -

Re: New beta version of openXsensor (=openXvario)

Post by mstrens »

Thanks Mike. I will compare with my code
mstrens
Posts: 1435
Joined: Fri Dec 27, 2013 7:49 pm
Country: -

Re: New beta version of openXsensor (=openXvario)

Post by mstrens »

I made some more test and I did not find a bug in the oXs version. it was a mistake of the user in the config file.
So I will keep my code (which does not require using COMPB)

I will still make the other changes your said about decoding different bytes of the frame sent from the Tx

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

Re: New beta version of openXsensor (=openXvario)

Post by jhsa »

Hi, I'm having a problem with SPORT on oXs, and I'm using oXs version 8.0
It is the first time I use SPORT and I am configuring the oXs to output it..
I define the PROTOCOL as FRSKY_SPORT,but I get no signal out of the sensor. Can't see anything on the scope. If i configure it to FRSKY_HUB, I do see a signal at the output.

If I configure to SDPORT_HUB, I see a signal but I think it is the HUB signal. I have attached the config file, hopefully you see what I am doing wrong..

Thanks in advance for your help

João
Attachments
oXs_config.h
(15.6 KiB) Downloaded 405 times
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
mstrens
Posts: 1435
Joined: Fri Dec 27, 2013 7:49 pm
Country: -

Re: New beta version of openXsensor (=openXvario)

Post by mstrens »

Your config seems ok.

Is your oXs connected to your receiver when you look at signal on the scope with SPORT?
This is required when you use SPORT protocol because, for SPORT, oXs put data on the SPORT bus only when it receives some frame on the SPORT bus.

On the opposite, with HUB protocol oXs does not have to be connected to the RX because it sent always frames on the hub wire.

When you use SPORT_HUB, oXs look if a signal is received from the Rx and if a signal is present, it assumes it is SPORT otherwise it assumes it is HUB.
So it is normal that you got HUB signal when no Rx is connected.
User avatar
jhsa
Posts: 19480
Joined: Tue Dec 27, 2011 5:13 pm
Country: Germany

Re: New beta version of openXsensor (=openXvario)

Post by jhsa »

Hi, thank you for your answer. No it wasn't connected. Will measure with it connected and report. As I said, this is my first contact with S.PORT

Thanks again

João

Sent from my BLN-L21 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: 17979
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: New beta version of openXsensor (=openXvario)

Post by MikeB »

With SPort telemetry protocol, the Rx polls round all sensors to ask for data. The sensors do not send anything unless they receive a poll.

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: New beta version of openXsensor (=openXvario)

Post by jhsa »

Yeah, thanks guys.. I have it semi-working now.. data comes, then flashes again, then shows bad data (values) for cells, then FasV shows a huge negative value, then the fields stop blinking and the data seems to be correctly displayed, and then all goes wrong again.
This is part of another project being tested now so the problem could be somewhere else.. Will try to find out where the problem is.. :)

Thanks again

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
Carbo
Posts: 467
Joined: Fri Aug 02, 2013 6:55 pm
Country: Germany
Location: Freinsheim RP

Re: New beta version of openXsensor (=openXvario)

Post by Carbo »

jhsa wrote: Fri Oct 20, 2017 12:07 pmThis is part of another project being tested now so the problem could be somewhere else..
A quick calculation gave a probability of 99,84% <-- sorry for this one ;) and i wish you successful troubleshooting :)
User avatar
jhsa
Posts: 19480
Joined: Tue Dec 27, 2011 5:13 pm
Country: Germany

Re: New beta version of openXsensor (=openXvario)

Post by jhsa »

:mrgreen: thanks.. :)
This is my introduction to the X protocol.. If it wasn't an interesting project I would (and will) keep using the excellent HUB protocol.. Less complicated for just receive some telemetry :)

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
jhsa
Posts: 19480
Joined: Tue Dec 27, 2011 5:13 pm
Country: Germany

Re: New beta version of openXsensor (=openXvario)

Post by jhsa »

Ok guys, just that you know.. problem solved. Had to update my multi module with the latest fixes on sport. Now all is working as far as I can see.. Can move on with the project. :)

Thanks for your help.. :)

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

Re: New beta version of openXsensor (=openXvario)

Post by MikeB »

Does that include the one I just posted today? Sport telemetry wasn't reliable if using EU-LBT mode with a multi module.

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: New beta version of openXsensor (=openXvario)

Post by jhsa »

I don't think so Mike. I just flashed from Midelic's repo.. Didn't even know that you've posted it.. :)

João

EDIT:Mike, do you have a link? Thanks..
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: 17979
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: New beta version of openXsensor (=openXvario)

Post by MikeB »

https://www.rcgroups.com/forums/showpos ... ount=10107,
Change shown below as well

Please try changing the timing in Frskyx_cc2500.ino:
(5500 to 5200 and 2800 to 3100)

Code: Select all

			state++;
			return 5200;
		case FRSKY_DATA2:
			CC2500_SetTxRxMode(RX_EN);
			CC2500_Strobe(CC2500_SIDLE);
			state++;
			return 200;
		case FRSKY_DATA3:		
			CC2500_Strobe(CC2500_SRX);
			state++;
			return 3100;
		case FRSKY_DATA4:
			len = CC2500_ReadReg(CC2500_3B_RXBYTES | CC2500_READ_BURST) & 0x7F;
Mike.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
User avatar
ddano007
Posts: 41
Joined: Thu Nov 13, 2014 8:40 pm
Country: Slovakia
Contact:

Re: New beta version of openXsensor (=openXvario)

Post by ddano007 »

Hi guys, I want to ask for one issue:
Is it possible to add to OXS modifiedable fixed Fuel Level value?
0x04 Fuel Level % U 0, 25, 50, 75, 100
The reason: FrSky D-series receivers doesn`t support model match/ model ID function. As I look for FrSky hub protocol, Fuel Level is 16- bit value. So it can be used as Model Quasi ID: at Taranis in LS and SF can be monitored to warn in case of incorrect model selection. Thanks.
mstrens
Posts: 1435
Joined: Fri Dec 27, 2013 7:49 pm
Country: -

Re: New beta version of openXsensor (=openXvario)

Post by mstrens »

This is a good idea.
In fact it should be very easy.

In current version on github, at line 1123, you have the lines
// test1.value = oXs_MS5611.varioData.absoluteAlt.value/10 ;
// test1.available = true ;

You can try to change those lines to
test1.value = 123 ;
test1.available = true ;
(so remove the "//" and in test.value, put any value you want)

Then in your config-basic.h file you have to ask for sending test1 in a telemetry field like T1.

I expect it should work but I did not test it.

Please note that this would not work if field test1 is already used for another purpose in your config.
User avatar
jhsa
Posts: 19480
Joined: Tue Dec 27, 2011 5:13 pm
Country: Germany

Re: New beta version of openXsensor (=openXvario)

Post by jhsa »

Would this work also for the HUB protocol?
I use mostly the multiprotocol module in my Ersky9x radios, and with this module I can set a receiver number even when using the D protocol.
But when using a normal DJT or DHT module, this could be helpful.

Thanks

João

Sent from my BLN-L21 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
mstrens
Posts: 1435
Joined: Fri Dec 27, 2013 7:49 pm
Country: -

Re: New beta version of openXsensor (=openXvario)

Post by mstrens »

It should work with all protocols.
oXs would just send a value to the Tx and the user would have (on Tx side) to define some logical switch and some special function to generate the warning.
User avatar
jhsa
Posts: 19480
Joined: Tue Dec 27, 2011 5:13 pm
Country: Germany

Re: New beta version of openXsensor (=openXvario)

Post by jhsa »

That would be the voice menu in Ersky9x. It has all included for alarms..

Thank you

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

Re: New beta version of openXsensor (=openXvario)

Post by MikeB »

While testing something else, using the oXs in FrSky 'X' mode, it has been noticed that the Tx receives some unusual SPort frames:
7E 1E F2 (or F1) 01 (or 0D) 00 00 00 00 00 CRC
I've guessed this is diagnostic information from the receiver (X6R) being sent to the Tx.
I have noticed that when the oXs is polled by the Rx, and doesn't have any data ready (but has sent some on the hardware ID previously), the oXs just ignores the poll. The correct response is to send a frame of all 0s.

I've just put in a change to do this (send all 0s), and a quick test generating a raw log file on the Tx of over 22 seconds, does not show any of these unusual frames. Previously there were several in a capture of only 4 seconds.

Mike.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
User avatar
ddano007
Posts: 41
Joined: Thu Nov 13, 2014 8:40 pm
Country: Slovakia
Contact:

Re: New beta version of openXsensor (=openXvario)

Post by ddano007 »

mstrens wrote: Mon Oct 30, 2017 7:49 am ...
You can try to change those lines to
test1.value = 123 ;
test1.available = true ;
...
OK
mstrens wrote: Mon Oct 30, 2017 7:49 am ...
Then in your config-basic.h file you have to ask for sending test1 in a telemetry field like T1.
...
Tried to modify in // ***** 2.1 - Frsky data *****

//#define FUEL_SOURCE ADS_VOLT_1
to
#define FUEL_SOURCE test1
but no new sensor found in Taranis. MS5611 work OK, but nothing more :(
Carbo
Posts: 467
Joined: Fri Aug 02, 2013 6:55 pm
Country: Germany
Location: Freinsheim RP

Re: New beta version of openXsensor (=openXvario)

Post by Carbo »

ddano007 wrote: Mon Oct 30, 2017 8:20 pm
mstrens wrote: Mon Oct 30, 2017 7:49 am ...
You can try to change those lines to
test1.value = 123 ;
test1.available = true ;
...
//#define FUEL_SOURCE ADS_VOLT_1
to
#define FUEL_SOURCE test1
but no new sensor found in Taranis. MS5611 work OK, but nothing more :(
Imo test1 is not allowed as input for FUEL_SOURCE. The comment at the end of the line lists the available fields. You want to use a ACCx or Tx field for test1.
User avatar
jhsa
Posts: 19480
Joined: Tue Dec 27, 2011 5:13 pm
Country: Germany

Re: New beta version of openXsensor (=openXvario)

Post by jhsa »

MikeB wrote: Mon Oct 30, 2017 7:42 pm While testing something else, using the oXs in FrSky 'X' mode, it has been noticed that the Tx receives some unusual SPort frames:
7E 1E F2 (or F1) 01 (or 0D) 00 00 00 00 00 CRC
I've guessed this is diagnostic information from the receiver (X6R) being sent to the Tx.
I have noticed that when the oXs is polled by the Rx, and doesn't have any data ready (but has sent some on the hardware ID previously), the oXs just ignores the poll. The correct response is to send a frame of all 0s.

I've just put in a change to do this (send all 0s), and a quick test generating a raw log file on the Tx of over 22 seconds, does not show any of these unusual frames. Previously there were several in a capture of only 4 seconds.

Mike.
Mstrens, did you see this?

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
mstrens
Posts: 1435
Joined: Fri Dec 27, 2013 7:49 pm
Country: -

Re: New beta version of openXsensor (=openXvario)

Post by mstrens »

I saw it.
I can change it in a future version. I did not know that it was expected to send all 0X00 when there was no data available.

I do not know if it really makes a difference on Tx side. I never saw an impact with openTx running on Tx
User avatar
jhsa
Posts: 19480
Joined: Tue Dec 27, 2011 5:13 pm
Country: Germany

Re: New beta version of openXsensor (=openXvario)

Post by jhsa »

It could be that it makes a difference with the multiprotocol module..
I have been testing some other equipment and I do get errors, I'm not saying that is the oXs 's fault, but it might contribute to the problem, so, if you would please (when you have time) make a version with it in I could test it.. :)

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
ddano007
Posts: 41
Joined: Thu Nov 13, 2014 8:40 pm
Country: Slovakia
Contact:

Re: New beta version of openXsensor (=openXvario)

Post by ddano007 »

Carbo wrote: Tue Oct 31, 2017 6:23 am Imo test1 is not allowed as input for FUEL_SOURCE. The comment at the end of the line lists the available fields. You want to use a ACCx or Tx field for test1.
Super, with ACCx it works, thanks!
And what/ where am I modify, if I want to make new variable FrSky_D_Model_QID and send it via FUEL_SOURCE?
mstrens
Posts: 1435
Joined: Fri Dec 27, 2013 7:49 pm
Country: -

Re: New beta version of openXsensor (=openXvario)

Post by mstrens »

You can already send "test_1" (being filled with the model ID) in T1_SOURCE or T2_SOURCE.
Why do you want to use FUEL_SOURCE?
User avatar
ddano007
Posts: 41
Joined: Thu Nov 13, 2014 8:40 pm
Country: Slovakia
Contact:

Re: New beta version of openXsensor (=openXvario)

Post by ddano007 »

mstrens wrote: Tue Oct 31, 2017 8:20 pm You can already send "test_1" (being filled with the model ID) in T1_SOURCE or T2_SOURCE.
Why do you want to use FUEL_SOURCE?
Because when I`m looking at FrSky HUB protocol I see FUEL LEVEL as the least significant measurement/ parameter. I think not many people are flying gas models even with fuel level sensor. Another measurements ( volt, temperatures, GPS etc. ) can be commonly used. OK, I have a question about Acc X,Y,Z, what is it commonly used for, but MPU-6050 is quite cheap sensor, maybe somebody will find some usefull aplication :roll:
From my scope of OpenXSensor use: MS5611 for altitude, MPXV7002DP + ADS1115 for speed, GPS as option, two DS18B20 for Temp. I use APM power module as Current/ Voltage sensor connected to A1/ A2 inputs on D8R II receiver, but X-series FrSky receivers doesn`t have two analog inputs, so volt/ current parameters in protocol is necessary for them.
That`s my reason, why FUEL LEVEL. Your opinion?

Post Reply

Return to “OpenXVario - an open source vario supported by the open source firmwares!!”