while (true) {
let { value, done } = await reader.read();
if (done) {
// |reader| has been canceled.
console.log("brack");
break;
}
console.log(value);
console.log()
}
} catch (error) {
// Handle |error|...
} finally {
reader.releaseLock();
console.log("f1");
}
}
when I read data from the serial port, my whole data is perfectly received, but the value of the "done" variable never changes it remains false and the code is stop on this stage " let { value, done } = await the reader.read();".