The device generate a '->' prompt as last sequence, I can not use '\n' in this case.
I tried to pass the prompt string to readline() but it's not yet reliable enough .
Anyway, I'm happy with single read(). Maybe I will try again readline() in the future,
So far so good, my app is working now!