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
954 views
in Vehicle tracking by anonymous
Hi,

my client just send me one FMB125, and asked me to analize it and do some testing on it. The thing is that i need to send some commands to the device, but i'm a little bit lost regarding that.

we have the c# tcp listener that was shared by teltonika, now i have 2 questions.

i need to get the imei from the device, or is there any easier way to identify every device? (device id? or something like that?)

the other question is regarding the command that i need to send to the device, i'm trying the following.

once i got the call from the device i try to write on the same stream with the following.

var ReplyBytesCmd = new byte[] { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0F, 0x0C, 0x01, 0x05, 0x00, 0x00, 0x00, 0x07, 0x67, 0x65, 0x74, 0x69, 0x6E, 0x66, 0x6F, 0x01, 0x00, 0x00, 0x43, 0x12 }; // this is supposed to be the getver command

var decodedData = DecodeTcpPacket(fullPacket.ToArray());

await stream.WriteAsync(ReplyBytesCmd, 0, ReplyBytesCmd.Length);

i'm sure i just missunderstood something.

thanks for any guidance.

1 Answer

0 votes
by anonymous

Hello,

Thank you for your query.

Every time device sends its IMEI to server, server should respond (ACK) 01 or 00 if this is correct IMEI for further communication.

If you want simply send GPRS command via hercules.exe just paste hex code and send it. Device should respond with the answer.

getver command in Hexadecimal: 00000000000000100C0105000000086765747665720D0A0100004D36

Please follow codec 12 protocol on our wiki page: https://wiki.teltonika.lt/view/Codec#Codec_for_communication_over_GPRS_messages

Hope this will help. Regards,

Teltonika Support.

by anonymous 1 flag
hi, thanks for that information.

but i'm still struggling with a c# implementation of getver command.

do you have an example to share with me?

thanks!
by anonymous
Hello Teltonika Support Team,

Your support is always valuable and result-oriented for me. I need to get the answer to the second question by Maximiliano.

How I can send Command to Teltonika device (FMB 920, FMB 910) with device last IP and Port in c#.?

For Example getver

Looking forward.