Can the reset occur at the moment that the PC starts sending data, or does it have to be some number of milliseconds prior to that?
I only have a two channel scope so it's difficult to see what's going on with regards to the timing of the DTR, the Tx from the PC and response from the Arduino.
My goal is to use a serial -> ethernet -> serial converter for remote programming, but it doesn't pass the state of the hardware control lines, so I need to figure out how to generate a reset signal at the Arduino end just at the right moment so that the bootloader is running when the PC sends the program.
DTR is generated on HW or SW connection. Whenever you connect the device or open/connect the terminal etc. Persistent connection is without the change on DTR.
Budvar10:
DTR is generated on HW or SW connection. Whenever you connect the device or open/connect the terminal etc. Persistent connection is without the change on DTR.
In my case there won't be a DTR at the Arduino end. Can I just use the first bit send by the PC to trigger a circuit that resets the Arduino, or will I need to buffer and delay the data from the PC so that the bootloader is in the right state to receive the data?
serial -> ethernet -> serial converter for remote programming
This is not clear where the Arduino(s) are in the pipeline. Is one Arduino being used to program another Arduino? Is the goal something similar to esp-link but using Ethernet instead of WiFi?
avrdude has a network option -Pnet:: so the remote side does not require a serial port.
gbafamily:
This is not clear where the Arduino(s) are in the pipeline. Is one Arduino being used to program another Arduino? Is the goal something similar to esp-link but using Ethernet instead of WiFi?
avrdude has a network option -Pnet:: so the remote side does not require a serial port.
When using the Arduino IDE, the virtual com port only sends the Tx Rx data from AVRdude through the ethernet. The DTR state isn't sent. This is a limitation of the driver.
At the USR-TCP232-ED2 receiving end, the ethernet data is turned back into TTL serial Tx Rx.
Currently I don't have a strategy for resetting the target Arduino so that the bootloader can receive the data sent from AVRdude.
I thought that perhaps I could use a second microcontroller or circuit to monitor the incoming AVRdude data and trigger the target Arduino to do a reset. Will this work, or does the reset have to occur some time before the program data reaches the target Arduino?
Also the USR-TCP232-ED2 device I'm using has 3 serial channels so in theory I could use one for the AVRdude data and another for triggering the hardware reset, that's assuming it's possible for AVRdude to somehow trigger another action before it starts sending the program data to the target. This is the first time I've looked at AVRdude outside of the Arduino IDE so I don't know much about it's capabilities and limitations.
If DTR and RTS state are not sent from the VCOM driver, I do not see many options. Does DTR or RTS change when there is a TCP connection versus no TCP connection? You might be able to use a state change to trigger a reset pulse to the Arduino board.
I thought that perhaps I could use a second microcontroller or circuit to monitor the incoming AVRdude data and trigger the target Arduino to do a reset. Will this work, or does the reset have to occur some time before the program data reaches the target Arduino?
This link has details on two ways esp-link handles board reset.
A second uC scanning for the programming start sequence might work. This is one method esp-link handles board reset. The only way to be sure is to try it.