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
535 views
in Vehicle tracking by anonymous

Hello, we have following setup to read data from FMT100  codec 8 extended with PHP.

  • we opened a socket port 5027 with function


$host = "XXX.XXX.XXX.XXX";
$port = 5027;

set_time_limit(0);

  $socket = socket_create(AF_INET, SOCK_STREAM, 0) or die("Could not create socket\n");
  $result = socket_bind($socket, $host, $port) or die("Could not bind to socket\n");

  while(true) {
    $result = socket_listen($socket, 3) or die("Could not set up socket listener\n");
    $spawn = socket_accept($socket) or die("Could not accept incoming connection\n");
    $input = socket_read($spawn, 1024) or die("Could not read input\n");
    $input = date("H:i:s d.m.Y") . " " . ****($input) . "\n";
    socket_write($spawn, "0x01") or die("Could not write output\n");
  }
  socket_close($spawn);
  socket_close($socket);
 

  • and we get IMEI in decimal value that works!
  • when we try to send ACK - respond back with function   socket_write($spawn, "0x01") or die("Could not write output\n")    we tried all values" 01", "\x01", "0x01"

but we cannot get any response from device back, to start receiving data.

Please post any idea if you have

regards

Grega

1 Answer

0 votes
by anonymous
Hello Grega,

Thank you for your detail request.

Could you please say, do you sent to device a response " 01" like you mentioned on query? If yes, then you will need to try to send value "01" without space before. If you sent response like we mentioned before, please let us know. Then we explore this case again.

Best regards,

Teltonika Support