Do not reboot device each time mos connects to it
Harvie opened this issue · comments
every time i do mos console
, mos call
or mos config-set
, etc... ESP32 device gets rebooted.
I've even tried mos console --no-reboot
but it does not help and reboots device anyways.
Is this expected behaviour? Is there way to prevent it? Happens to me both on boards with CP210x and FTDI serial converter... I am running Linux, haven't tried on other platforms.
the behavior usually depends on the driver and operating system. different combinations behave differently wrt setting the control lines, DTR and RTS, when the port is opened - some leave them alone but some cause transitions that end up resetting the device. some need them set after opening, some don't.
--no-reboot
actually has no effect on mos console
, try adding --set-control-lines=false
instead.
--set-control-lines=false
this seems to work on CP210x board, but on FTDI, the console does not show any output... :-/
that's what i'm talking about - different type of usb-uart converter, driver, os behave differently.
this means that on your os (windows?) opening a serial port backed by ftdi sets RTS low, which resets the device on the other end and RTS needs to be explicitly set to inactive state (1), which is what --set-control-lines=true (the default) does.
bottom line is - i don't think we can really do anything about it, unfortunately.