Occasionally I'm trying to debug a (usually serial) device that starts very quickly.If I get the device running, I can connect to it using:minicom -D /dev/ttyUSB0Then, if the device disconnects, minicom stays open until it reconnects.  Is there a switch to tell minicom to open in this waiting state, even if the device has not yet been created?I've tried -o (Do not initialize.)
How can I force minicom to wait to connect to a non-existent device?
minicom
If all you want to do initially is capture all the output from the device you can usetail -F /dev/ttyUSB0as this will wait until the device exists then read from it. If the device disappears and reappears it will valiantly re-open it.You can try creating a fifo and using minicom on this as device.Then, in a loop, wait for the real device to appear, and open and connect it the fifo when it does, for example with socat.minicom will not see the re-opens.mkfifo ~/myfifowhile sleep 1; do socat /dev/ttyUSB0,b19200,echo=0,raw ~/myfifo; done &minicom -o -D ~/myfifob19200 is an example of setting the speed, which you can remove if it doesnt need setting.