espressif / ESP8266_RTOS_SDK

Latest ESP8266 SDK based on FreeRTOS, esp-idf style.
http://bbs.espressif.com
Apache License 2.0
3.31k stars 1.56k forks source link

monitor dont work in wsl even with all the requirements (IDFGH-9848) (GIT8266O-810) #1233

Open Mathe13 opened 1 year ago

Mathe13 commented 1 year ago

Answers checklist.

IDF version.

v3.4-77-g35375c17

Operating System used.

Windows

How did you build your project?

Command line with Make

If you are using Windows, please specify command line type.

PowerShell

Development Kit.

ESP8266_RTOS_SDK

Power Supply used.

USB

What is the expected behavior?

the comand make monitor to run and show the output of the code. i am using the hello_world example of ESP8266_RTOS_SDK

What is the actual behavior?

make monitor run and trows lots of error on esp-idf python files

Steps to reproduce.

follow the instruction on the ESP8266_RTOS_SDK tutorial using windows wsl make monitor

Debug Logs.

Python requirements from /home/math/esp/ESP8266_RTOS_SDK/requirements.txt are satisfied.
MONITOR
/home/math/esp/ESP8266_RTOS_SDK/tools/idf_monitor.py:53: DeprecationWarning: The distutils package is deprecated and slated for removal in Python 3.12. Use setuptools or check PEP 632 for potential alternatives
  from distutils.version import StrictVersion
--- idf_monitor on /dev/ttyS5 74880 ---
--- Quit: Ctrl+] | Menu: Ctrl+T | Help: Ctrl+T followed by Ctrl+H ---
Exception in thread Thread-2 (_run_outer):
Traceback (most recent call last):
  File "/usr/lib/python3.10/threading.py", line 1016, in _bootstrap_inner
    self.run()
  File "/usr/lib/python3.10/threading.py", line 953, in run
    self._target(*self._args, **self._kwargs)
  File "/home/math/esp/ESP8266_RTOS_SDK/tools/idf_monitor.py", line 136, in _run_outer
    self.run()
  File "/home/math/esp/ESP8266_RTOS_SDK/tools/idf_monitor.py", line 225, in run
    self.serial.open()
  File "/home/math/.local/lib/python3.10/site-packages/serial/serialposix.py", line 332, in open
    self._reconfigure_port(force_update=True)
  File "/home/math/.local/lib/python3.10/site-packages/serial/serialposix.py", line 517, in _reconfigure_port
    termios.tcsetattr(
termios.error: (5, 'Input/output error')

More Information.

i am using wsl type 1 and have acess to the com ports. i can write the code but the monitor dont work

Mathe13 commented 1 year ago

i change the baud rate of the monitor to 115200 and the output changed to

sd$ܟ|l< lc|r#cgndogc8ćlrd;l8g l   c '|s cogldg$'{g $l xo { #g|bog $gln;g lxo ;  # g| Ǐ #og $n dgsۓn $;g docǏl'oldb|oo;ldp䇄gn'ob{n$gllocǏl'oo' {  ndgllncǏldn'o dg '| 'g'n$lllnd$g #{lbogl  l$l~do$l' crdcgnldlg   d$ll'ldgc;cngogdldo$lncxc gnco' 'gdo$l' b$g' d o     $|    $| l|glnd$g # lbog g|          o$gldoc|lc'o d go        d     d 'do$l' bpdlc'o g|   g|d      d  'do$l' bplc'olog cn nlnd$g #xldcd|'b'|    c d $ o? ; b8|ۄl$grglndlg espressif/esp-idf#8$cd|'b'|l   sc sÃo~  ll#lgrglodlg espressif/esp-idf#8$cd|nbn|   # sܜ o~  d l# 'o{n$gldocplbl|oc g|c  p ğc $       d dcog;glnd$g #$d|'b'|    c l  o?  bǏlgnsn$gllnclog lgۃlĜ|'co'$'|  $glۃno'n|x n$g|ldǏo'$ o|#g'oo<#og$ #lld#oxno$scno$gnl ;no||bc$ Traceback (most recent call last): File "/home/math/esp/ESP8266_RTOS_SDK/tools/idf_monitor.py", line 846, in main() File "/home/math/esp/ESP8266_RTOS_SDK/tools/idf_monitor.py", line 758, in main monitor.main_loop() File "/home/math/esp/ESP8266_RTOS_SDK/tools/idf_monitor.py", line 375, in main_loop self.handle_serial_input(data) File "/home/math/esp/ESP8266_RTOS_SDK/tools/idf_monitor.py", line 446, in handle_serial_input self._print(self._last_line_part) File "/home/math/esp/ESP8266_RTOS_SDK/tools/idf_monitor.py", line 668, in _print console_printer(string) File "/home/math/.local/lib/python3.10/site-packages/serial/tools/miniterm.py", line 66, in write_bytes self.byte_output.flush() OSError: [Errno 5] Input/output error Exception ignored in: <_io.TextIOWrapper name='' mode='w' encoding='utf-8'> OSError: [Errno 5] Input/output error make: *** [/home/math/esp/ESP8266_RTOS_SDK/components/esptool_py/Makefile.projbuild:113: monitor] Error 120 `

wujiangang commented 1 year ago

Could you check /dev/ttyS5 is accessible? By using minicom or miniterm.py?

Mathe13 commented 1 year ago

when i use minicom with 115200,N,8,1 i only get garbage on the console but it runs

Mathe13 commented 1 year ago

the port is connected and accessible. i tested with for tty in $(ls /dev/ttyS*); do stty -F $tty -a; done and got

speed 115200 baud; rows 0; columns 0; line = 0; intr = ^C; quit = ^\; erase = ^?; kill = ^U; eof = <undef>; eol = <undef>; eol2 = <undef>; swtch = <undef>; start = ^Q; stop = ^S; susp = ^Z; rprnt = ^R; werase = ^W; lnext = ^V; discard = ^O; min = 0; time = 0; -parenb -parodd -cmspar cs8 hupcl -cstopb cread clocal -crtscts -ignbrk -brkint -ignpar -parmrk -inpck -istrip -inlcr -igncr -icrnl -ixon -ixoff -iuclc -ixany -imaxbel -iutf8 -opost -olcuc -ocrnl -onlcr -onocr -onlret -ofill -ofdel nl0 cr0 tab0 bs0 vt0 ff0 -isig -icanon -iexten -echo -echoe -echok -echonl -noflsh -xcase -tostop -echoprt -echoctl -echoke -flusho -extproc