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