Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Location of serial console port not constant (with ESP32 USB connections) #23139

Open
4 tasks
dx136 opened this issue Mar 12, 2025 · 0 comments
Open
4 tasks

Comments

@dx136
Copy link

dx136 commented Mar 12, 2025

PROBLEM DESCRIPTION

A clear and concise description of what the problem is.

On an ESP32 device (i.e. ESP32-S3-Zero), the location of the serial console port is not constant. Perhaps this is by design but not what I expected (or perhaps I have misunderstood the meaning & purpose of "Serial Tx/Rx" in the template?)

Scenario: GPIO pins are defined for Serial Tx/Rx (i.e. 43, 44); they work correctly (i.e. allow console commands to be issued) when the module is powered from a simple USB power block (i.e. no USB data connection). When the device is powered from a laptop and a USB data connection exists, the GPIO serial pins no longer respond; instead, console commands can only be issued from the USB serial device (e.g. /dev/ttyACM0). Thus the location of the console port is not constant.

Preferred solution: Provide a (new?) command that sets the location of the console port. This command could be used from either the webUI console or used in a rule with system#boot.

Thanks very much!

REQUESTED INFORMATION

Make sure your have performed every step and checked the applicable boxes before submitting your issue. Thank you!

  • [ y] Read the Contributing Guide and Policy and the Code of Conduct
  • [y] Searched the problem in issues
  • [y] Searched the problem in discussions
  • [y] Searched the problem in the docs
  • [y] Searched the problem in the chat
  • [y] Problem is not scripter related, in this case open a discussion and tag gemu2015
  • [y] Device used (e.g., Sonoff Basic): ESP32-S3-Zero
  • [y] Tasmota binary firmware version number used: 14.4.1
    • Pre-compiled
    • [y] Self-compiled
  • [y] Flashing tools used: OTA upgrade
  • [y] Provide the output of command: Backlog Template; Module; GPIO 255:
  Configuration output here:
02:30:50.723 CMD: Backlog Template; Module; GPIO 255
02:30:50.736 RSL: RESULT = {"NAME":"TasmoCompilerFirmware","GPIO":[32,1,1,1,1,1,1,1,1,1,1,1,5504,5472,1,1,1,1,1,0,0,1376,0,0,0,0,0,1,1,1,1,1,3200,3232,1,1,1,1],"FLAG":0,"BASE":1}
02:30:50.972 RSL: RESULT = {"Module":{"0":"TasmoCompilerFirmware"}}
02:30:51.176 RSL: RESULT = {"GPIO0":{"32":"Button1"},"GPIO1":{"0":"None"},"GPIO2":{"0":"None"},"GPIO3":{"0":"None"},"GPIO4":{"0":"None"},"GPIO5":{"0":"None"},"GPIO6":{"0":"None"},"GPIO7":{"0":"None"},"GPIO8":{"0":"None"},"GPIO9":{"0":"None"},"GPIO10":{"0":"None"},"GPIO11":{"0":"None"},"GPIO12":{"5504":"TCP Rx"},"GPIO13":{"5472":"TCP Tx"},"GPIO14":{"0":"None"},"GPIO15":{"0":"None"},"GPIO16":{"0":"None"},"GPIO17":{"0":"None"},"GPIO18":{"0":"None"},"GPIO19":{"0":"None"},"GPIO20":{"0":"None"},"GPIO21":{"1376":"WS2812"},"GPIO33":{"0":"None"},"GPIO34":{"0":"None"},"GPIO35":{"0":"None"},"GPIO36":{"0":"None"},"GPIO37":{"0":"None"},"GPIO38":{"0":"None"},"GPIO39":{"0":"None"},"GPIO40":{"0":"None"},"GPIO41":{"0":"None"},"GPIO42":{"0":"None"},"GPIO43":{"3200":"Serial Tx"},"GPIO44":{"3232":"Serial Rx"},"GPIO45":{"0":"None"},"GPIO46":{"0":"None"},"GPIO47":{"0":"None"},"GPIO48":{"0":"None"}}
  • If using rules, provide the output of this command: Backlog Rule1; Rule2; Rule3:
  Rules output here:
[None so N/A]
  • Provide the output of this command: Status 0:
  STATUS 0 output here:
02:35:55.456 CMD: status 0
02:35:55.458 RSL: STATUS = {"Status":{"Module":0,"DeviceName":"ESP32-S3","FriendlyName":["ESP-S3"],"Topic":"tasmota_3060A0","ButtonTopic":"0","Power":"1","PowerLock":"0","PowerOnState":3,"LedState":1,"LedMask":"FFFF","SaveData":1,"SaveState":1,"SwitchTopic":"0","SwitchMode":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"ButtonRetain":0,"SwitchRetain":0,"SensorRetain":0,"PowerRetain":0,"InfoRetain":0,"StateRetain":0,"StatusRetain":0}}
02:35:55.463 RSL: STATUS1 = {"StatusPRM":{"Baudrate":115200,"SerialConfig":"8N1","GroupTopic":"tasmotas","OtaUrl":"","RestartReason":"Vbat power on reset","Uptime":"0T01:03:51","StartupUTC":"2025-03-12T00:32:04","Sleep":50,"CfgHolder":4617,"BootCount":27,"BCResetTime":"2025-02-11T00:12:38","SaveCount":100}}
02:35:55.467 RSL: STATUS2 = {"StatusFWR":{"Version":"14.4.1(TasmoCompiler-esp32s3)","BuildDateTime":"2025-03-10T20:32:29","Core":"3_1_0","SDK":"5.3.2","CpuFrequency":240,"Hardware":"ESP32-S3 v0.2","CR":"339/699"}}
02:35:55.470 RSL: STATUS3 = {"StatusLOG":{"SerialLog":2,"WebLog":2,"MqttLog":0,"SysLog":0,"LogHost":"","LogPort":514,"SSId":["AuxNetIn",""],"TelePeriod":300,"Resolution":"558180C0","SetOption":["00008009","2805C80001000600003C5A00192800000000","00000080","00006000","00004000","00000003"]}}
02:35:55.476 RSL: STATUS4 = {"StatusMEM":{"ProgramSize":1462,"Free":1417,"Heap":261,"StackLowMark":3,"PsrMax":2048,"PsrFree":2016,"ProgramFlashSize":4096,"FlashSize":4096,"FlashChipId":"164020","FlashFrequency":80,"FlashMode":"QIO","Features":["0809","0F80C5CE","00040001","60020FC3","180C0000","D0320880","000B2088","00200000","54000048","00000080","00000004"],"Drivers":"1,2,4,!8,9,10,12,26,29,!35,38,41,50,52,62,!68,!121","Sensors":"1,2,5,6,7,8,9,14,26,27,38,39,46,47,55,58,59,63,65,72,73,74,88,127","I2CDriver":"8,9,10,15,20,21,32,36,41,42,43,45,51,52,60"}}
02:35:55.481 RSL: STATUS5 = {"StatusNET":{"Hostname":"ESP32-S3","IPAddress":"192.168.87.79","Gateway":"192.168.87.1","Subnetmask":"255.255.255.0","DNSServer1":"192.168.87.1","DNSServer2":"0.0.0.0","Mac":"24:EC:4A:30:60:A0","IP6Global":"","IP6Local":"fe80::26ec:4aff:fe30:60a0%st1","Webserver":2,"HTTP_API":1,"WifiConfig":4,"WifiPower":19.0}}
02:35:55.485 RSL: STATUS6 = {"StatusMQT":{"MqttHost":"","MqttPort":1883,"MqttClientMask":"DVES_%06X","MqttClient":"DVES_3060A0","MqttUser":"DVES_USER","MqttCount":0,"MAX_PACKET_SIZE":1200,"KEEPALIVE":30,"SOCKET_TIMEOUT":4}}
02:35:55.488 RSL: STATUS7 = {"StatusTIM":{"UTC":"2025-03-12T01:35:55Z","Local":"2025-03-12T02:35:55","StartDST":"2025-03-30T02:00:00","EndDST":"2025-10-26T03:00:00","Timezone":"+01:00","Sunrise":"07:09","Sunset":"18:50"}}
02:35:55.492 RSL: STATUS10 = {"StatusSNS":{"Time":"2025-03-12T02:35:55","ESP32":{"Temperature":39.5},"TempUnit":"C"}}
02:35:55.497 RSL: STATUS11 = {"StatusSTS":{"Time":"2025-03-12T02:35:55","Uptime":"0T01:03:51","UptimeSec":3831,"Heap":261,"SleepMode":"Dynamic","Sleep":50,"LoadAvg":19,"MqttCount":0,"Berry":{"HeapUsed":3,"Objects":31},"POWER":"ON","Dimmer":14,"Color":"240000","HSBColor":"0,100,14","Channel":[14,0,0],"Scheme":0,"Width":1,"Fade":"OFF","Speed":1,"LedTable":"ON","Wifi":{"AP":1,"SSId":"AuxNetIn","BSSId":"4E:5E:0C:63:29:70","Channel":11,"Mode":"HE20","RSSI":100,"Signal":-23,"LinkCount":1,"Downtime":"0T00:00:03"}}}
  • Set weblog to 4 and then, when you experience your issue, provide the output of the Console log:
  Console output here:
[N/A]

TO REPRODUCE

Steps to reproduce the behavior:
[Copied from Problem Description] Scenario: GPIO pins are defined for Serial Tx/Rx (i.e. 43, 44); they work correctly (i.e. allow console commands to be issued) when the module is powered from a simple USB power block (i.e. no USB data connection). When the device is powered from a laptop and a USB data connection exists, the GPIO serial pins no longer respond; instead, console commands can only be issued from the USB serial device (e.g. /dev/ttyACM0). Thus the location of the console port is not constant.

EXPECTED BEHAVIOUR

A clear and concise description of what you expected to happen.
[Copied from Problem Description] Preferred solution: Provide a (new?) command that sets the location of the console port. This command could be used from either the webUI console or used in a rule with system#boot.

Alternative 1: a (new) command which allows the relative priority of the serial Tx/Rx console vs the USB console (right now, USB console has priority and overrides the serial Tx/Rx).

Alternative 2: a #define directive which sets the relative priority of serial Tx/Rx console to be higher than USB console.

SCREENSHOTS

If applicable, add screenshots to help explain your problem.

ADDITIONAL CONTEXT

Add any other context about the problem here.

(Please, remember to close the issue when the problem has been addressed)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant