UDP broadcasts are different to what is stated in documentation

Hey everyone.

I was tinkering around with the Connect API via ifc2 when I noticed it wasn’t connecting to my device properly. I looked into the source code and it appeared fine, so I did some digging through wireshark and found out what was actually being broadcasted.

For reference, this is what the documentation has an example:

    ["State": Playing, "Port": 10111, "DeviceID": iPad7, "Aircraft": Cessna 172,
    "Version": 19.4.7354.25209, "DeviceName": Thomas’s iPad,
    "Addresses":("fe80::1c79:baf4:f9f1:dd59%3", ""),
    "Livery": Civil Air Patrol]

This is what I found:

{"addresses":[""],"port":10112,"deviceID":"motorola moto g(8) power lite","version":"","deviceName":"moto g(8) power lite","state":"Playing","aircraft":"DC-10F","livery":"Fedex"}

It looks like a JSON object kinda thing is being broadcasted, and the keys are no longer capitalized.

Can someone please confirm and clarify? Cheers.

Hey, sorry about this. It looks like the formatting in the documentation is incorrect (it has always been a JSON object). What you received is the format you should expect to receive.

The contents are in JSON, and the key names now use camel case (the casing is due to a change we made to our JSON serializer a few updates ago).

We’ll make sure to get that updated, thanks for letting us know :)

1 Like

For reference, this is the C# representation of what we send:

public class APIServerInfo
    public string[] Addresses { get; set; }

    public int Port { get; set; }

    public string DeviceID { get; set; }

    public string Version { get; set; }

    public string DeviceName { get; set; }

    public string State { get; set; }

    public string Aircraft { get; set; }

    public string Livery { get; set; }

Ah, I see. Thank you so much!