Live-f1 showing 'Unknown system packet type: 5'

Reported by Sacro on 2009-04-05

This bug report was converted into a question: question #110571: Live-f1 showing 'Unknown system packet type: 5'.

10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Live F1
Low
Dave Pusey

Bug Description

Have been using live-f1 during the Malaysian GP, using verbose mode as am currently doing a port to C#, when the race was stopped it shows this message.

Related branches

Unknown what this packet contains, do you have a data trace of when you received this packet, it's length/content etc.

Changed in live-f1:
importance: Undecided → Low
status: New → Confirmed
Gareth (gareth-adams+launchpad) wrote :

If you haven't seen this yet, the strange header packet comes in as the following bytes (MSB first)

  10100000,00000000

and although the 'length' of the packet it describes by your algorithm is 0, it's then followed by 4 more bytes before I stop receiving any more data (MSB first):

  01000000,00100010,00000010,00000000

If you assume that this strange "Packet 5" doesn't actually have any data, then these 4 bytes describe Keyframe 00002

Dave Pusey (davepusey) wrote :

I am also working on my own C# implementation of this.

If you connect to the datastream at the moment, you will get...

System Packet 2 - Keyframe 420
System Packet 5 - Data=0 PayloadLength=0
System Packet 2 - Keyframe 421

I don't know the purpose of this packet, but it doesnt seem to be important.

I've been running live-f1 since Nurburgring 2007 and it commonly reports "Unknown system packet type: 5" but it has never caused a problem.

I think this packet can be safely ignored.

Yevgen Fedorenko (funarg) wrote :

Looking at the output of a Java console while running the official client I get an "End of Stream" message when it encounters a type 5 system packet with Data field equal to zero. When it's not zero it prints "Notify: 60" or something like that.

I'm not sure what exactly it means but looking at the values it might be a refresh rate that drops to 0 when the session ends.

Do you guys share your C# code somehwere? Would be great to have this ported to *ahem* "other" platforms.

Dave Pusey (davepusey) wrote :

I may share it at some point in the future, but at the moment it's not really in a state fit for sharing.

Dave Pusey (davepusey) on 2010-05-11
Changed in live-f1:
status: Confirmed → Invalid
Dave Pusey (davepusey) wrote :

During some testing today, i've noticed that the System packet 5 only occurs at the very end of a session.

My belief now is that this packet indicates the end of the data stream and that no more packets are to follow, and is probably used to instruct the Java client to disconnect from the server.

This would agree with Yevgen's "End of Stream" message.

Changed in live-f1:
status: Invalid → Triaged
assignee: nobody → Dave Pusey (dave-puseyuk)
milestone: none → 0.2.11
Gareth (gareth-adams+launchpad) wrote :

Looking at my logs for a few qualifying and race sessions this year, I see a packet 5 followed by two packet 3s, immediately after *every* keyframe. This would suggest that it's not an end of stream message.

However, as well as this pattern there is occasionally an additional packet 5 *preceding* a keyframe at the end of the session. I don't have enough data to know what that means - I might have stopped recording before the stream actually terminated.

Dave Pusey (davepusey) on 2010-05-17
Changed in live-f1:
status: Triaged → In Progress
Dave Pusey (davepusey) on 2010-05-26
Changed in live-f1:
status: In Progress → Fix Committed
Dave Pusey (davepusey) wrote :

Just been looking into the official java applet's source code to see how it handles the session clock, and whilst looking around noticed this for System packets 3 and 5...

case 3: // '\003'
                    if(l != 0)
                        throw new IOException("Long valid marker");
                    if(!dontProcess)
                        theApp.setValid(c != 0);
                    break;
case 5: // '\005'
                    if(!dontProcess)
                        setRefresh(v);
                    break;

Changed in live-f1:
status: Fix Committed → Confirmed
Dave Pusey (davepusey) wrote :

Following on from previous post, also from official client...

    public void setRefresh(int refresh)
    {
        refreshRate = refresh;
        if(refresh == 0)
        {
            theApp.output("End of Stream");
            theApp.setLED(Color.darkGray);
            cleanup();
        } else
        {
            theApp.output("Notify: " + refresh);
        }
    }

    public void setValid(boolean valid)
    {
        isValid = valid;
        redrawOffscreen(true);
    }

It seems that if isValid == false then it displays the red text "Please Wait ..."

Dave Pusey (davepusey) wrote :

...and the value refreshRate is used as the delay between server pings.

Dave Pusey (davepusey) wrote :

... unless it is zero, in which case it doesnt ping at all.

(Sorry for the multiple posts, there is no edit button)

Dave Pusey (davepusey) wrote :

Fixed in revision 104.

Changed in live-f1:
status: Confirmed → Fix Committed
Dave Pusey (davepusey) on 2011-03-27
Changed in live-f1:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers