<?php

//exec ("echo -n -e '\\x02\\x04\\x00\\x1B\\x06\\x21\\x00' > /dev/ttyUSB0");

//chmod ("/dev/ttyUSB0", 0777);

$handle = fopen('/dev/ttyUSB0', 'w');

//abre cupon
$arre = chr(2) . chr(4) . chr(0) . chr(27) . chr(6) . chr(33) . chr(0);

@fwrite($handle, $arre);

@fclose($handle);

?>
