Adding Eagletree Airspeed sensor in FRSKY code

Post Reply
Bruneaux
Posts: 119
Joined: Mon Oct 14, 2013 7:13 pm
Country: -

Adding Eagletree Airspeed sensor in FRSKY code

Post by Bruneaux »

I'm trying to add an airspeed indicator sensor. I've got the code down to the FRSKY.CPP and SPORTFRSKY.CPP code and I have figured out the (proper?) way to read the packets. But I am having problems finding where the packets are pushed out. I would have expected a round-robin method to send out packets for each packet that is expect to be polled.

There is a "frskyPushValue' but it is only called within "void frskySendNextAlarm(void)".

Can someone help guide me toward the proper place/code?

Thanks

Bruneaux

Note: I've been told that FrSky uses basic I2C protocol, thus a polling method is expected. Let me know if it streams (thus there is no way in do this).
Last edited by Bruneaux on Mon Oct 28, 2013 8:22 pm, edited 1 time in total.

User avatar
Kilrah
Posts: 11108
Joined: Sat Feb 18, 2012 6:56 pm
Country: Switzerland

Re: Adding Eagletree Airspeed sensor in FRSKY code

Post by Kilrah »

The telemetry link is only one way (except for D16, but uplink isn't implemented at this point).
FrskyPushValue is used to send configuration data to a DxT module.
Not sure if I understand what you're looking for.

Sent from my SC-03E using Tapatalk
Bruneaux
Posts: 119
Joined: Mon Oct 14, 2013 7:13 pm
Country: -

Re: Adding Eagletree Airspeed sensor in FRSKY code

Post by Bruneaux »

I've updated my post.

Thanks for responding, Kilrah.

Note: I've been told that FrSky uses basic I2C protocol, thus a polling method is expected. Let me know if it streams (thus there is no way in do this).

In the I2C protocol the sensors are polled. Sending a start and a value indicating the sensors ID to read. The sensor then sends it's value(s).

Is sounds like you are saying that the data is streaming, not polled.

Is that correct? In that case there would be not way to make this sensor (EagleTree Airspeed sensor V3) work because I can't send the code to the sensor.

Brunueax
Last edited by Bruneaux on Mon Oct 28, 2013 8:41 pm, edited 1 time in total.
Bruneaux
Posts: 119
Joined: Mon Oct 14, 2013 7:13 pm
Country: -

Re: Adding Eagletree Airspeed sensor in FRSKY code

Post by Bruneaux »

Hmm, I thought the Smart Port was bi-directional.
User avatar
MikeB
9x Developer
Posts: 17992
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: Adding Eagletree Airspeed sensor in FRSKY code

Post by MikeB »

FrSky SPort is polled, but it is NOT I2C. It uses a bi-directional signal that carries asynchronous serial data at 57600 baud. If the EagleTree sensor is I2C, then you will need something (Arduino?) to interface between the two. The openXsensor project does just this, interfacing to FrSky protocol on one side and I2C to a pressure sensor on the other.
I'm just looking into why the SPort part is not working properly!

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

Bruneaux
Posts: 119
Joined: Mon Oct 14, 2013 7:13 pm
Country: -

Re: Adding Eagletree Airspeed sensor in FRSKY code

Post by Bruneaux »

It is possible that the receiver polls the sensors and adds that data to the stream. If that is the case then the code that I need is within the receiver. That would make this very difficult to implement.

Note: the information that used to be on FrSky's site (detailing the I2C protocol for the sensors) has been pulled. I think it was a PDF; does anyone still have that file? I believe it was "HubProtocol.pdf".

Thanks

Bruneaux
Bruneaux
Posts: 119
Joined: Mon Oct 14, 2013 7:13 pm
Country: -

Re: Adding Eagletree Airspeed sensor in FRSKY code

Post by Bruneaux »

Mike,

To be clear, I have not tried using the S-PORT yet. Who indicated that it was not working?

Hope I have not confused you.

Bruneaux
Bruneaux
Posts: 119
Joined: Mon Oct 14, 2013 7:13 pm
Country: -

Re: Adding Eagletree Airspeed sensor in FRSKY code

Post by Bruneaux »

Mike,

I believe that FrSky used I2C prior to the SPORT. But that might be hidden through the hub or the receivers code. When the Hub is attached to SPORT Vario it is bridged so the older style sensors can still be used (since there no other NEW sensors out yet!! ).

This does work: (old sensors) ==> Hub (data port) ==> SPORT Vario ==> SPORT X8R.

So the hub might be doing the I2C work and converting it to a stream of data for the S-Port.

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

Re: Adding Eagletree Airspeed sensor in FRSKY code

Post by MikeB »

The HubProtocol.pdf detailed the asynchronous serial data (9600 baud) sent by the hub to the serial input on the D series receivers. THe hub may well have used I2C to "talk" to certain sensors.

The SPort protocol is quite different. The signal line is bi-directional, the receiver sends a poll request and an ID out, then listens for any response. Again the data is asynchronous serial but at 57600 baud.

Mike.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
ReSt
Posts: 1581
Joined: Tue Dec 27, 2011 11:34 pm
Country: -

Re: Adding Eagletree Airspeed sensor in FRSKY code

Post by ReSt »

[quote="Bruneaux"] I think it was a PDF; does anyone still have that file? I believe it was "HubProtocol.pdf".
/quote]

Is it this, that you are looking for?

Reinhard
Protocol V02 FrSky Hub.pdf
(47.7 KiB) Downloaded 450 times
Bruneaux
Posts: 119
Joined: Mon Oct 14, 2013 7:13 pm
Country: -

Re: Adding Eagletree Airspeed sensor in FRSKY code

Post by Bruneaux »

Mike,
Thanks. To be clear, though, any device can talk through SPORT, can't they? So when you say

"the receiver sends a poll request and an ID out, then listens for any response.?

it could be any device, including the transmitter. Correct?

I'm just going by the little bit that I got from FrSky. And that would make things very interesting.

Bruneaux
Last edited by Bruneaux on Mon Oct 28, 2013 11:07 pm, edited 1 time in total.
Bruneaux
Posts: 119
Joined: Mon Oct 14, 2013 7:13 pm
Country: -

Re: Adding Eagletree Airspeed sensor in FRSKY code

Post by Bruneaux »

Reinhard,

Thanks. That could be the one!

It does speak of (input/output). But it doesn't make sense if it just streams.


I saw it on the sight and I did download it, but my version was corrupt and then the page disappeared.

Bruneaux
Bruneaux
Posts: 119
Joined: Mon Oct 14, 2013 7:13 pm
Country: -

Re: Adding Eagletree Airspeed sensor in FRSKY code

Post by Bruneaux »

Mike,

Thanks for the info:
MikeB wrote:The openXsensor project does just this, interfacing to FrSky protocol on one side and I2C to a pressure sensor on the other.
I've Googled for "openXsensor" and I have not found it. If you know where it is could you link it?

That would work if I can find it.

Bruneaux
User avatar
Kilrah
Posts: 11108
Joined: Sat Feb 18, 2012 6:56 pm
Country: Switzerland

Re: Adding Eagletree Airspeed sensor in FRSKY code

Post by Kilrah »

Search for openxvario, and look at the openxsensor branch of the code.

Sent from my SC-03E using Tapatalk

Post Reply

Return to “PROGRAMMERS”