FOR TIPS, gUIDES & TUTORIALS

subscribe to our Youtube

GO TO YOUTUBE
Ask a question

3844 questions

4380 answers

3252 comments

46077 members

Ask a question
0 votes
1,144 views
in Vehicle tracking by

Hello,

Again I need teltonika community help wink

Since 3 days I try to implement TCP with Windev Language Programming without success, I really did my best :

Check my code (i'ts very simple to understand) :

Steps :

Every 2 minutes SocketWaitForConnection becomes True when I receive IMEI periodically from FMB001,

Then I read data from channel during 10 secodes maximum and I put the content in Buffer variable and simply I print  it in Hexa value,

Finally, I replay to device by wirtting ACK (0x01).

Problem :

Steps :

Firstly SYN from device (it's correct).

Then, ACK SYN from program (it's correct).

Then, ACK from device (it's correct).

Then, I received IMEI number. Data Length=17 (it's correct).

Then, my program sent 2 messages (Why ?).

Then, Device sent ACK.

Then, my program sent ACK by programming :

and again my program FIN ACK (it's normal ?).

Finally Device Reset connection :(

Can you help me how can I resolve this problem please ?

Thank you so much,

Regards,

1 Answer

0 votes
by
Very bad quality images.

And first of all you should state your problem at the very beginning of message - easier to understand.

After reading all this - i still don't see where is your problem?

You send ACK to device - and device does not send records? Is t his main problem?

You can check how communication with server is supposed to happen by using this:

https://community.teltonika-gps.com/?qa=blob&qa_blobid=4573467400376059332

It automatically answers to imei + records from device -> prints all received packets to log file.

Regards