Dear ricardopcunha,

You can try putting the code "Thread.sleep(2000)" right after the “os.write(data.getBytes());”.
If you need further assistance, please contact us directly so we can further...