teltonika-fm-parser icon indicating copy to clipboard operation
teltonika-fm-parser copied to clipboard

PHP Fatal error: Uncaught OutOfBoundsException: Cannot read 32-bit int, it exceeds the boundary of the file

Open manishjesani912 opened this issue 2 years ago • 2 comments

Hello,

I am getting data from Teltonika FMB120.

PHP Fatal error: Uncaught OutOfBoundsException: Cannot read 32-bit int, it exceeds the boundary of the file

Please help me why this not decode.

Thanks.

manishjesani912 avatar Sep 18 '23 10:09 manishjesani912

Hi @manishjesani912,

Got the same error, it was due to the length of the data read. In the main page example of the project, this is 1024 :

// Read Data
$payload = fread($conn, 1024);
$packet = $parser->decodeData($payload);

But the frame from my FMM230 was bigger (1232 bytes). I increased to 1500, it works now!

youb22 avatar Apr 18 '24 11:04 youb22