Two questions:
If I have my IDE not open, and hence the Serial Monitor not open, where do all the Console writes go to?
When does Console.print return? Suppose the wifi is down for a while, could this mean Console.print would block in some way?
Two questions:
If I have my IDE not open, and hence the Serial Monitor not open, where do all the Console writes go to?
When does Console.print return? Suppose the wifi is down for a while, could this mean Console.print would block in some way?
My experience is, that if nothing is connected to that USB, the write buffer fills up and a next write call blocks forever (what else could it do?)
kind regards,
Jos
I thought console was over wifi, not USB?
I am not experiencing that it blocks forever.
I must've misundersttood: if you print to the Serial stream, you're effectively printing to the USB bus; if nothing is connected at'the other end', such as a serial monitorr from your ide, then the buffer fills up etc.
kind regards,
Jos
I am using Console, not Serial. I am quite sure the write does not block. E.g. I can run my sketch with lots of Console.print for a long time without the serial monitor. But we are being sidetracked, I am especially interested in my question 2., i.e. if Console.print behaviour (especially how fast it returns) can be influenced by wifi connectivity issues.
I'm not using the bridge stuff (I dumped it) but after reading the (python) source code, all it does is read and write from/to /dev/ttyATH0 and send/receive stuff to/from a client socket. The python 'middle man' set up a server socket on port 6571 for the purpose. If your WiFi connection is bad, it can take quite some time for a read/write to complete ... sorry, I can't be of more help here.
kind regards,
Jos
Thanks, this is useful. I am trying to debug something really weird, looking as if something in my sketch is taking abnormally long. This would be my first suspect.
Normally, ahem, those suspicous opertations are easy to pinpoint, i.e.
unsigned long start= micros(); // or even millis()
// suspcious operation here ...
unsigned long end= micros();
if end-start is 'too long to be true' narrow down the suspicious operation until you have found the nasty rascal.
kind regards,
Jos