Summary
FbuildSerialAdapter does not support toggling DTR to reset an ESP32 device. When the device is already booted and idle (no serial output), RPC communication fails because the adapter connects to a silent serial port.
Current behavior
FbuildSerialAdapter.connect() opens the serial connection but does not toggle DTR
- If the device is already booted, there is no output to read
- RPC ping times out → autoresearch incorrectly reports "device not responding"
- The tool then falls through to the GPIO pre-test which also fails → misleading "connect a jumper wire" error
Expected behavior
FbuildSerialAdapter should expose a reset() or toggle_dtr() method that:
- Asserts DTR (pulls low) for ~100ms
- De-asserts DTR
- Waits for device boot output (~3s)
This matches what PySerialAdapter can do via the underlying pyserial dtr property.
Workaround
FastLED/FastLED PR #2260 commit 2168882 adds a workaround in ci/autoresearch/gpio.py that bypasses FbuildSerialAdapter entirely — it opens a raw pyserial connection just to toggle DTR, closes it, then reconnects via the normal adapter. This is fragile and should be replaced once fbuild supports DTR natively.
Proposed API
class FbuildSerialAdapter:
def reset_device(self, dtr_hold_ms: int = 100, boot_wait_ms: int = 3000) -> None:
"""Toggle DTR to reset the connected device and wait for boot."""
...
Or alternatively, add a dtr property setter that maps to the underlying connection.
Related
Summary
FbuildSerialAdapterdoes not support toggling DTR to reset an ESP32 device. When the device is already booted and idle (no serial output), RPC communication fails because the adapter connects to a silent serial port.Current behavior
FbuildSerialAdapter.connect()opens the serial connection but does not toggle DTRExpected behavior
FbuildSerialAdaptershould expose areset()ortoggle_dtr()method that:This matches what
PySerialAdaptercan do via the underlying pyserialdtrproperty.Workaround
FastLED/FastLED PR #2260 commit
2168882adds a workaround inci/autoresearch/gpio.pythat bypassesFbuildSerialAdapterentirely — it opens a raw pyserial connection just to toggle DTR, closes it, then reconnects via the normal adapter. This is fragile and should be replaced once fbuild supports DTR natively.Proposed API
Or alternatively, add a
dtrproperty setter that maps to the underlying connection.Related