In that case why not swap the energy device GPIO with your TCP?
Might also be worth contemplating using an ESP32
Regards
Phil K
Sent from Mail for Windows
After studying the software UART code, it seems to me that what I am trying to do will not work unless I use a hardware UART interface. For the soft UART, the serial transmit is synchronous and the serial receive is asynchronous based on an interrupt triggered by a transition of the signal on the RX pin. At low baud rate, the transmitter starts bit banging and yields during each bit time. After the first bit, the receiver interrupt handling starts sampling the RX pin and waiting each bit time of the byte without yielding. At high baud rate the transmit masks interrupts and doesn't yield. The net result is that the single threaded nature of the the software UART doesn't allow for simultaneous transmit and receive which is exactly what it is attempting to do when the TX and RX pins are jumpered as in my testing. Perhaps this is well known to the Tasmota experts, but the software UART is only useful for use cases where the RX and TX will not happen simultaneously. This makes sense for a serial protocol where a master device transmits a command and then waits for a status response from a slave device before the master transmits the next command. It does not work for my use case (terminal server) where RX and TX can happen simultaneously.
--
You received this message because you are subscribed to the Google Groups "TasmotaUsers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sonoffusers...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/sonoffusers/fbc460ea-a94f-4875-be86-a00f427c86fbn%40googlegroups.com.