6 Commits

Author SHA1 Message Date
a00edb718b wip test don't skip blocking just because of suppression 2025-11-18 14:19:50 -05:00
f75d3be98d fix: don't buffer while blocking 2025-11-18 14:16:41 -05:00
133554bb1a feat: format messages as hex 2025-11-18 14:16:28 -05:00
9cbe49355c [WIP] feat: Prototype shipping RX / TX messages to ESP_LOG 2025-11-18 12:43:57 -05:00
abc66f8013 [WIP] test: Can we simply ignore rx performed after tx on same bus?
Before this commit, since our diesel heater application uses one line
for RX and TX between the controller and ECU, our MITM device had its
RX1 connected (through the anode of a diode) to TX1, and the same with
TX2. Thus, when open-collector TX1 modulates by pulling the line low,
the esp8266 would also see what it transmitted as a RX byte.

Ignore those bytes by ignoring characters received on each line after
transmit for some time.

As for exactly how long to suppress: here, we try RX_SUPPRESS_INTERVAL
of 50ms. This is pretty application-specific, but ... for our diesel
heater implementation, the controller transmits once a second at most,
and (after having its say) the ECU replies no faster than 200ms later.
2025-11-18 12:38:25 -05:00
Samuel Sieb
7dbe88a03c add uart_mitm component 2023-01-17 14:04:51 -08:00