Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re^2: UDP Packet Encoding

by nEMESIS4 (Initiate)
on Nov 21, 2011 at 23:05 UTC ( #939341=note: print w/ replies, xml ) Need Help??


in reply to Re: UDP Packet Encoding
in thread UDP Packet Encoding

I cannot seem to post my reply, just posting this to test.


Comment on Re^2: UDP Packet Encoding
Re^3: UDP Packet Encoding
by nEMESIS4 (Initiate) on Nov 21, 2011 at 23:07 UTC
    \Thank you for the quick response.

    1) Here is the Perl code I am using:

    #!/usr/bin/perl use IO::Socket::INET; $| = 1; my ($socket,$received_data,$peeraddress,$peerport); $socket = new IO::Socket::INET (LocalPort => '26',Proto => 'udp') or d +ie "ERROR in Socket Creation : $!\n"; while(1) { $socket->recv($recieved_data,1024); $peer_address = $socket->peerhost(); $peer_port = $socket->peerport(); print "\n($peer_address, $peer_port) said : $recieved_data"; $data = "data from server\n"; print $socket "$data"; } $socket->close();


    2) The GPS unit is made by CalAmp (http://www.calamp.com/products/cellular-a-gps/fleet-tracking-units/236-lmu-1200-gprs). There isn't much information online about it unfortunately.

    3) Here is the Hexdump results from one of the transmissions:

    0000000 0583 3112 7900 0197 0101 0002 4e01 e6c6
    0000010 00fc 0000 0000 0000 0000 0000 0000 0000
    0000020 0000 0000 0000 0000 022c ffd0 2fcd 0f00
    0000030 0208 0019 0000
    0000035

      Basically, what ikegami said.

      Just one frame doesn't help much when reverse engineering this, especially when you don't know what data to expect. Surely there is some software to go with it that displays human-readable data? Check the lat/long/alt values that it reports and try to estimate how much it jitters. From that you can calculate a range of values to expect. Altitude should be easiest as it's most likely a 16-bit integer of meters and you just have to guess little- or big-endian. Lat/Lon could be fixed or floating point. A timestamp should also be fairly easy to spot as it changes by roughly the same amount between two packets.

      Have you asked the manufacturer at all? Their site is really not very informative but perhaps they're customer-friendly enough to give you the specs.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://939341]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (7)
As of 2014-09-16 08:29 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite cookbook is:










    Results (158 votes), past polls