Sometimes, outputs are not send on UDP

Hello !

I'm trying to write a little software to help interfacing Arduino boards with the Q400's UDP interface, and while I was testing receiving data for indicators status, I noticed sometimes I don't get all the data updated.

In the following scenario I have a GPU plugged to the plane, and the APU started with the GEN switch ON. Which means, as I tie/untie the GPU to the electrical systems with the EXT PWR switch on the overhead, the APU GEN ON light goes ON while the APU GEN WARN light goes OFF, and vice versa. But on the UDP packets I receive, here is what happens:

EXT PWR OFF
[OUTPUT] Var 104e | Data: 00
EXT PWR ON
[OUTPUT] Var 104e | Data: ff
EXT PWR OFF
[OUTPUT] Var 104d | Data: ff
EXT PWR ON
[OUTPUT] Var 104d | Data: 00
[OUTPUT] Var 104e | Data: ff
EXT PWR OFF
[OUTPUT] Var 104e | Data: 00

As you can see, except for the fourth time, I get one of the lights updated but not the other; and it's totally random.
I checked with Wireshark that it is not my code which is missing some datagrams, and I observe the same behaviour in Wireshark.

Other test: the three lights of the GPWS Landing Flaps indicator (vars bc02, bc03 and bc04). For these, I never received any UDP packet...

Has anyone experienced something like that?

Thanks in advance.

Comments

  • Hi,

    This might be a similar effect, which I am seeing with AviaServer for the Q400:

    majesticsoftware.com/forums/discussion/1009/udp-packet-transmission-for-aviacdu-stops-sometimes-during-cdu-initialization

    I have the feeling, that something in the UDP interface is not completely robust. Hard to track down obviously, as the source might also be located in one of the network libraries used for generating the UDP broadcast and not directly in the code of Majestic.

    Rgds
    Reinhard

  • Hi,

    Another question: Have you tried this with different send rates, which are controlled by that line in the INI file:

    SEND_RATE_DIVIDER=8; // 16 times per second

    Try to lower the rate and check, if this makes a difference.

    Rgds
    Reinhard

  • I will definitely try that! Thanks

  • Well, I tried changing the rate divider, and with a 0 value (like for the shared cockpit) it's a bit better but not reliable enough. And I still don't get any message for the GPWS Landing Flaps...
    I guess it's not ready for me to consider building a home cockpit yet. I suppose I'll wait for some news about the Cockpit Edition...

Sign In or Register to comment.