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
145 views
in Vehicle tracking by anonymous
I have a server written in kotlin with which I am able to connect to the FMB003 chip. I receive the IMEI number, to which I repond correctly (0x01 if I remember correctly), and the server is then fed with AVLs. I respond correctly to these (the number of records received, which I believe means how many commands the AVL consisted of). After the last AVL has been received by the server, and appropriately responded to, I receive a -1. Then the code exits the AVL loop, and sends the GPRS message. The GPRS message is written in the codec 12 protocol, and is the getinfo command. The command looks like this:
 

 val request = byteArrayOf(

            0x00, 0x00, 0x00, 0x00,                     //Zero bytes

            0x00, 0x00, 0x00, 0x0F,                     //Data size

            0x0C,                                       //Codec ID (12)

            0x01,                                       //Command quantity 1

            0x05,                                       //Command type

            0x00, 0x00, 0x00, 0x07,                     //Command size

            0x67, 0x65, 0x74, 0x69, 0x6E, 0x66, 0x6F,   //Command (getinfo)

            0x01,                                       //Command quantity 2

            0x00, 0x00, 0x43, 0x12                      //CRC-16

        )

Which is a copy of one of the example requests from the documentation page for GPRS. However, when I send this to the chip, it always responds with "-1". What am I doing wrong?

1 Answer

0 votes
by anonymous
Hello.

Device is sending hex data, so it can not send "-1".

Please verify communication with device using Hercules as described on Wiki:

https://wiki.teltonika-gps.com/view/Teltonika_Data_Sending_Protocols

Regards