Serial while debugging

All ESP8266 boards running MicroPython.
Official boards are the Adafruit Huzzah and Feather boards.
Target audience: MicroPython users with an ESP8266 board.
Post Reply
cefn
Posts: 230
Joined: Tue Aug 09, 2016 10:58 am

Serial while debugging

Post by cefn » Mon Mar 05, 2018 1:42 pm

Hi all,

I am trying to figure out the proper way to 'free' the UART pins from the primary UART on an ESP8266, (so it can be used to communicate with hardware), while being able to get at least debug output and preferably two-way REPL communication with the board.

I am considering two configurations to be able to use the primary TX and RX pins on a NodeMCUv2 for hardware communication...

* Don't use UART at all for shell input or debugging output - depend only on WebREPL.
* Switch the REPL debugging output to the secondary UART (which only has transmit) which would be wired with a separate USB-UART to see the output on a laptop

Is there any reference information how to achieve these configurations?
* I don't know if the WebREPL can be brought up without a hardware UART at all, or if it can be switched later
* I don't know if the primary TX/RX pins are just inherently hobbled for communication with external hardware (within the micropython build, or within the hardware wiring to the CP2102)

I note some commentary about dupterm() but struggle to understand whether it duplicates or redirects, when and how to switch UART configuration to prevent crosstalk with the UART connection with external hardware.

Is this something which can be attempted? If so, how?

Post Reply