I am working on a project where i am attempting to spoof a gps command from X-Plane 11 to allow a flight simulator that i am working on to communicate with an electroic flight bag app (Oz Runways)
The X-Plane software outputs a GPS stream that is sent to the app, which the app then interprets.
it is sent via UDP as an ascii Stream.
When the stream is sent, it shows the gps position of the plane in Xplane on a moving mapp in the App, on an Ipad.
An Example Stream: “XGPS1,-122.578640,47.264560,87.9936,8.2152,68.5358“
At this stage i have tried taking the exact udp message (from Xplane, intercepted by Wireshark) and sending it from another program called Packet Sender. Sending the stream does not work, but sending the entire packet (which seems wrong) seems to give me the desired result.
The Entire Packet: “>ï£¿ûÿÛEN©)À¨À¨ò¿i¿j:XGPS1,-122.578640,47.264560,87.9936,8.2152,68.5358“
This makes the entire packet of this UDP message: “>ï£¿ûÿÛEe®
it seems like it doubles up on the leading data, like ip and port adresses etc.
So while this seems to work, when using my piece of software, which will change the numbers to send through the correct position and speed, but right now is just a simple c# udp sender it refuses to work.
udpClient = new UdpClient(49001);
Byte() sendBytes = Encoding.UTF8.GetBytes(textBoxmsg.Text);
catch (Exception e)
This is the code for my Sender, in order to mimic the Xplane software as much as possible i have set it to use the exact output port, and the text boxes in my win form feed in the message, ip address, and remote port number.
The actual question i suppose i am asking here, is why would copying the start of packet data work in Packet sender in the first place, and not in my c# program?
Below are two packets from wireshark one of which is from Xplane, the other is from my piece of software.
I understand that this is a very specific issue, but i simply do not understand why the same stream works from one piece of software and not another.