Page 1 of 1

Ser2Net - SWAP_PINS

Posted: 15 Jun 2020, 14:31
by peterax
Tested the serial server. Works fine but I suspect the serial device I will connect to might be confused by all "debug data" like
1082872 : WD : Uptime 18 ConnectFailures 0 FreeMem 17152 WiFiStatus 3
1103387 : MQTT : Intentional reconnect
1104417 : MQTT : Failed to connect to broker


Tried it a similar function with pure Arduino, exapmle sketch "WiFiTelnetToSerial".
It had a "SWAP_PINS" option which set HW serial port to pins GPIO13 and 15. Std RX and TX was then set as SoftwareSerail ports.

By doing this, the serial monitor worked just as usual but the Ser2Net gateway was not affected by debug output.

Any chance to get this on the wish list?

Re: Ser2Net - SWAP_PINS

Posted: 15 Jun 2020, 20:36
by TD-er
You can uncheck the "Enable Serial Port" in Tools -> Advanced.
I know the description is a bit counter intuitive as you want to use the serial port, but that part relates to outputting logs and the serial dumps generated by some commands.
So if you disable the serial port there, it should not give any output other than your plugin, except during boot.
This relates to "Serial 0" on the ESP.
In the plugins (not 100% sure Ser2Net also uses that generic selector other plugins use) you can switch Serial 0 also to use GPIO 13 and 15, but then it is called "Serial 0 swapped"
This will make sure nothing is output during boot, but you still need to uncheck "Enable Serial Port" as logs etc. are written to Serial 0 (and thus also to Serial 0 swapped if selected)