Open Harvie opened 5 years ago
CTS is an input pin, do you mean RTS?
CTS is an input pin, do you mean RTS?
Didn't knew that. I don't really care about bootloader pin, because i switch it manualy. But the reset pin is important for me. Still i guess other people might need to specify bootloader pin.
Hello, I encountered the same problem. Solved it by swapping DTR and RTS. It's quick and dirty: https://github.com/pohy/mos/commit/6e269733ede65109d387c8cc38c08fa75527fc94
@pohy cool! @rojer do you think we can have commandline option for this ^^^ ?
CTS is an input pin, do you mean RTS?
I've just realized that CTS pin of FTDI usb2serial is bidirectional. Hence my confusion. It would be great if MOS provided also support for reset using FTDI bitbang mode, it's quite common series of chips and the api is compatible across all FTDI products, so it should be easy to do.
Idealy support both like this:
--pin-reset=DTR --pin-bootloader=RTS
or
--ftdi --pin-reset=DTR --pin-bootloader=CTS
not as easy as it seems. we'd need ftdi-specific api to control it, since normally cts is input-only.
@rojer i am fully aware of this. hence i suggested the --ftdi
flag to switch between the native serial and ftdi APIs...
i mean, before committing to tis, i'd like to know how common this is. swapping dtr and rts - ok, sure. but using cts as output - why, when you have rts available?
Because FTDI is very often sold in device called "FTDI cable", which has following pinout:
They sell these FTDI cables everywhere. And they come in various forms, like actual cable:
or even PCB with same pinout as the cable:
(This one has additional pin header to work as arduino ISP, but unfortunately there is not RTS...)
To be honest i would be happy for dtr/rts swap, but having support for classic FTDI cable would certainly be usefull.
Currently we have hand soldered programming jigs involving pieces of wire and hot glue. It would be nice to be able to use something cheap and easily accesible.
ok, this makes sense. i think this could be done in two steps:
--esp-ctl-rst
and --esp-ctl-boot
, defaulting to RTS
and DTR
respectivelyCTS
as a value, specifically fro FTDI chips.
are you able to do one or both of these and send a PR?
Hello, i have ESP32 development board, which has ENABLE (RESET) pin connected to DTR of FTDI usb serial converter. This works very well when flashing ESP32 using Arduino IDE, but does not work when using
mos flash
, because mos tool seems to use RTS pin of FTDI rather than DTR.Can you please add arguments, so i can specify this? Eg. something like:
mos flash --port /dev/ttyUSB1 --pin-reset=DTR --pin-bootloader=CTS
This would be super usefull for me.