nEMESIS4 has asked for the
wisdom of the Perl Monks concerning the following question:

Hello,

I have a quick question that I am hoping someone can point me in the right direction. We are trying to receive data from a GPS unit. I have setup a Perl server script to catch any UDP activity. The device seems to be hitting our server fine, but the packet is either encoded or encrypted in a way I do not know how to handle.

The results look like this:

ƒ1 y“ NÆü( ,ÐÿÉ/

Based on simply looking at this, would anyone have any suggestions to try on how to read this data? Thanks!

most importantly, post a *useful* output example. Perhaps by writing the "results" to a file, and then running `hexdump` or `od -t x1` on the file, and then posting *that* output, inside <pre></pre> tags.

I doubt that your GPS is sending encrypted data; it is probably just using some dense format that is not easily human-readable. Perhaps mentioned in the unit's documentation?

Okay, okay... maybe we have to “reverse engineer” this stuff, but maybe we don’t. What does this hardware vendor say about the packets that their equipment is designed to produce?

A quick search for “gps” on http://search.cpan.org certainly points out a lot of material. (Take no offense at my asking this, but ...) Have you looked at all of this already? Does any of it apply?

Perl functions such as pack() can make short work of dealing with binary packets like this one ... but of course, there’s no sense in doing anything only to discover that it has already been done. :-) And I’m sure that they don’t consider the format to be secret.

(If it comes to that... sure are looking forward to a new CPAN module from you!)

Additionally if you want to reverse engineering, try to capture subsequent requests and see what changes. If your device is statically positioned the position is not likely to change much - GPS have a jitter - but still you should be able to identify a field or a portion that increments steadily it could be a timestamp or ID which I'd expect both of them to be integers