Closed CedricMi closed 10 months ago
Going to need a the threaded strace(1)
log at a minimum, since no one here has a "ESP8266 chip on a Witty Cloud" (my cloud hasn't said anything clever recently). Also would be worth stepping back to first principles and see if you can stty(1)
and echo(1)
to your /dev/ttyS3
. It isn't clear from the OP whether we're talking about a rshell
fail or whether your serial tty is just not working in WSL. This hint doesn't bode well though:
File "/usr/local/lib/python3.6/dist-packages/pyudev/monitor.py", line 172, in filter_by
self._libudev.udev_monitor_filter_update(self)
WSL doesn't have a functioning udev
(though some parts are stubbed) so it might be choking on that. An strace would tell more.
stty
cedric@SPRO-CM:~$ stty -F /dev/ttyS3 -a speed 1200 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 = 1; time = 0; -parenb -parodd -cmspar cs7 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 cedric@SPRO-CM:~$
echo It works
strace https://gist.github.com/CedricMi/15fadee34ef08a63ed631be1cda761da
Note: after the error message I waited a little to see if anything happens, then pressed Ctrl-D to exit rshell.
An overview of the Witty Cloud Board https://www.faranux.com/product/witty-cloud-board/
Try: sudo rshell Then under rshell prompt: connect serial /dev/ttyS3 Worked for me~~
Thank-you for the strace(1)
logs. There are a couple of EINVAL
s in there:
setsockopt(8, SOL_SOCKET, SO_PASSCRED, [1], 4) = -1 EINVAL (Invalid argument)
setsockopt(8, SOL_SOCKET, SO_ATTACH_FILTER, {len=8, filter=0x7ff84693de80}, 16) = -1 EINVAL (Invalid argument)
The first is an AF_UNIX
socket. The second is an AF_NETLINK
socket. Not sure which one is the fatal blow. Both syscalls will be better on WSL2. WSL2 currently lacks support for /dev/ttyS?
. RS-232 on WSL2 is LZ #4322
This issue has been automatically closed since it has not had any activity for the past year. If you're still experiencing this issue please re-file this as a new issue or feature request.
Thank you!
Please fill out the below information:
Your Windows build number: (Type
ver
at a Windows Command Prompt) Microsoft Windows [version 10.0.17763.134]What you're doing and what's happening: (Copy&paste specific commands and their output, or include screen shots) Trying to remote shell to an ESP8266 chip on a Witty Cloud connected with USB. It is instantly recognized in Windows, and on my computer attributed COM3. A test with a terminal under windows shows it works, the esp8266 is responsive in microPython.
But with rshell (https://github.com/dhylands/rshell) rshell --port /dev/ttyS3 Connecting to /dev/ttyS3 ... Welcome to rshell. Use Control-D (or the exit command) to exit rshell. /home/cedric> Exception in thread AutoConnect: Traceback (most recent call last): File "/usr/lib/python3.6/threading.py", line 916, in _bootstrap_inner self.run() File "/usr/lib/python3.6/threading.py", line 864, in run self._target(*self._args, **self._kwargs) File "/usr/local/lib/python3.6/dist-packages/rshell/main.py", line 256, in autoconnect_thread monitor.filter_by('tty') File "/usr/local/lib/python3.6/dist-packages/pyudev/monitor.py", line 172, in filter_by self._libudev.udev_monitor_filter_update(self) File "/usr/local/lib/python3.6/dist-packages/pyudev/_ctypeslib/_errorcheckers.py", line 91, in check_errno_on_nonzero_return raise exception_from_errno(errnum) ValueError: Invalid argument
I suspect this is because of the non-linux way of naming ports.