FOR TIPS, gUIDES & TUTORIALS

subscribe to our Youtube

GO TO YOUTUBE

4167 questions

4739 answers

3460 comments

0 members

We are migrating to our new platform at https://community.teltonika.lt. Moving forward, you can continue discussions on this new platform. This current platform will be temporarily maintained for reference purposes.
0 votes
2,402 views
in Vehicle tracking by anonymous
I wrote a TCP Server to listen the device in Python. The device is now able to establish a connection to the server.

First the device is sending the IMEI to our server.  Our server acknowledged with 01 status.  Then the device

sent the data in some different machine language.  We are unable to decode it. Can anybody help us on this ?
by
Please, i can see your code?

1 Answer

0 votes
by anonymous
Hello,

Please contact your sales manager. He will provide you the parser tool, which will help you to decode incoming data from device.
We are unable to share links in here.

Or another way - share what you receive from the device and we will help you to decode it.

Regards,
by anonymous

Thank for your response.  In India, our sales persons are not technical people and they only shared protocol PDF (FMB 920).

Anyways, I was able to parse the data using python and struggling with acknowledgements.

Our server got the IMEI from the device and our TCP Server script successfully acknowledged with 01 byte. Python snippets are here

           ba = bytearray()

           ba.append(0x01)

           conn.send(ba)

The device accepted our acknowledgement and sent the following raw data (AVL Data Packet) as below. I just shared partial data for your information.

00000000000004d60813000001695ecc119000000000000000000000000000000000000c05ef00f0001503c80045020

Here 08 is codec and 13 is number of records as per Protocol File. 

Now the server has to respond to the device with the number of records. To do so, I did like this in python

           ba = bytearray()

           ba.append(0x13)

           conn.send(ba)

Unfortunately, the device is not recognizing this byte and again sending the same data in the next connection. 

Could please help me on this.

I tried to send the exact binary also as raw_data[9:10].  Did not work.

I also tried by padding 0 bytes to the number of packets as below.

     conn.send(struct.pack(">I", 0x13)) . No luck.

I have verified the first raw data and second rawdata. Both data are same including CRC.

Please help.

by anonymous
reply = struct.pack('BBBB', 0,0,0, ord(data[ idx ]) )

4b answer per TCP

7b answer per udp

https://wiki.teltonika.lt/view/Codec#Codec_8

Regards