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
583 views
in Vehicle tracking by anonymous
Please help me out to send the GPRS command to the device.

I read the documents and format in:

https://wiki.teltonika-gps.com/view/Codec#Codec_12

But I have some questions.

1. In which format should I send the data to the device(little-endian, big-endian, etc)

2. Is this the correct way to send the packet?

  \x00\x00\x00\x00\x00\x00\x00\x18\x0C\x01\x05\x00\x00\x00\x102347455420444154414F5244455\x01\x00\x00\x49\x90

I'm stuck here.

Thanks in advance,

Gowdham.V

1 Answer

0 votes
by anonymous
Hello

According to your packet:

00000000 00000018 0C 01 05 00000010 2347455420444154414F5244455 01 00004990

command size is invalid: 10Hex -> 16Dec, your command size is 13 bytes + one sign - not valid

command is: 2347455420444154414F5244455 -> HEX to ASCII: #GET DATAORDE

#get dataorde is not valid SMS/GPRS command

please check command list on Teltonika Wiki:

https://wiki.teltonika-gps.com/view/FMB120_SMS/GPRS_Commands

Regards
by anonymous

I'm Sorry, That is the wrong packet. I have been testing by using the same packet in the wiki link.

'\x00\x00\x00\x00\x00\x00\x00\x0F\x0C\x01\x05\x00\x00\x00\x07676574696E666f\x01\x00\x00\x43\x12'

 After encoding utf-8 

the packet is looking like this:

b'\x00\x00\x00\x00\x00\x00\x00\x0f\x0c\x01\x05\x00\x00\x00\x07676574696E666f\x01\x00\x00C\x12'

But, still I'm receiving the next codec-8e data.

by anonymous

Hello

If you send string: '\x00\x00\x00\x00\x00\x00\x00\x0F\x0C\x01\x05\x00\x00\x00\x07676574696E666f\x01\x00\x00\x43\x12'  to device, it will not understand it. The packet must be in HEX, proper command packet is: 000000000000000D0C010500000005676574696F01000000CB

by anonymous

For imei packet and AVL data packet, I'm sending the ack like "0x00, 0x01(or length as this format)". The device is understanding this format. If I send the ack as "01" as mentioned in the wiki.teltonika the device not accepting.

000000000000000D0C010500000005676574696F01000000CB

I Sent the same hex. But the same result.

by anonymous

Hello

To send GPRS command, device must send all records to the server first.

First, when module connects to server, module sends its IMEI. First comes short identifying number of bytes written and then goes IMEI as text (bytes).
For example, IMEI 356307042441013 would be sent as 000F333536333037303432343431303133.
First two bytes denote IMEI length. In this case 0x000F means, that IMEI is 15 bytes long.
After receiving IMEI, server should determine if it would accept data from this module. If yes, server will reply to module 01, if not - 00. Note that confirmation should be sent as binary packet. I.e. 1 byte 0x01 or 0x00.
Then module starts to send first AVL data packet. After server receives packet and parses it, server must report to module number of data received as integer (four bytes).
If sent data number and reported by server doesn’t match module resends sent data.

Please check in the configurator Status->GSM info tab if sent records counter is growing (if records were succesfully sent to the server)

example:

module ->000F333536333037303432343431303133

server ->01

module -> 000000000000003608010000016B40D8EA30010000000000000000000000000000000105021503010101425E0F01F10000601A014E0000000000000000010000C7CF (data packet, codec 8, number of data: 01)

server ->00000001

if there is no request from device send GPRS command