stratux icon indicating copy to clipboard operation
stratux copied to clipboard

Traffic WebSocket Intermittently Stops Sending Updates

Open JohnMarzulli opened this issue 5 years ago • 5 comments

  1. Stratux version: 1.4r5

  2. Stratux config:

    SDR

    • [ ] single
    • [x ] dual

    GPS

    • [x ] yes
    • [ ] no type:

    AHRS

    • [x ] yes
    • [ ] no

    power source: 5v USB power socket AND Anker PowerCore 26800

    usb cable: Anker

  3. EFB app and version: (e.g., WingX Pro7 8.6.2) StratuxHud, 1.3 EFB platform: (e.g., iOS 9.2) Stratux 1.4r5 (Custom Image) EFB hardware: (e.g., iPad Mini 2) Raspberry Pi 3

  4. Description of your issue: The StratuxHud implements an ICMP Ping protocol. This sends Ping/Pong requests/responses to the Stratux.

When the software is running on the Stratux unit, after about 10 minutes messages from the WebSocket are no longer received. When the ping is coming from a dedicated unit (separate Raspberry Pi), the websocket stops receiving data after about 20 minutes.

Inspection of the Stratux code shows that receiving a ICMP RESPONSE should keep the client out of sleep mode. The HUD is making sure that a ICMP_ECHO_REPY is being sent, and sends one every two seconds "just to be sure".

Inspection of the Stratux code (I'm not fluent in Go...) looks like a timeout/sleep should happen within 15 seconds.

Additionally, I can not reproduce this behavior "on the ground".

JohnMarzulli avatar Nov 13 '18 17:11 JohnMarzulli

John, I think this is an issue in the websocket library. Can you try writing to the websocket every so often to keep it alive? The content you send doesn't matter, it will be discarded. If that keeps the socket alive indefinitely, it's the same issue as another app integrator had at one time.

cyoung avatar Nov 26 '18 21:11 cyoung

I'll give it a try. I am already sending Ping/Pong back to the Stratux per ICMP.

To be clear, you are suggesting writing to the same socket that is already open and I am receiving the traffic updates on?

JohnMarzulli avatar Nov 27 '18 03:11 JohnMarzulli

To be clear, you are suggesting writing to the same socket that is already open and I am receiving the traffic updates on?

Yes, exactly.

cyoung avatar Nov 27 '18 03:11 cyoung

I have been able to give this several tests with blindly writing to the socket and the pick. The connection will still appear to go to sleep.

JohnMarzulli avatar Jan 16 '19 23:01 JohnMarzulli

I have the same issue with v1.5b2, the WebSocket goes to sleep, so no traffic updates. Refreshing the page does'nt bring it back up, however clicking on any other menue item will, at least for some time. Eventually you will need to reconnect the WiFi altogheter to get the WedUi to respond. Has there been any progress on this lately?

OEZWONKP avatar Feb 06 '19 07:02 OEZWONKP