espmonitor can't work under WSL
Opened this issue · 7 comments
Under WSL1, the serial port COMX of the host can be accessed through /dev/ttySX. For example access COM11 via /dev/ttyS11. This mechanism works fine in esptool.py of esp-idf, but espmonitor can't work.
espmonitor /dev/ttyS10
error log:
ESPMonitor 0.7.0
Commands:
CTRL+R Reset chip
CTRL+C Exit
Opening /dev/ttyS11 with speed 115200
Error: Inappropriate ioctl for device
strace espmonitor /dev/ttyS10
strace log:
frank@DESKTOP-MMN9PRD:~$ strace espmonitor /dev/ttyS10
execve("/home/frank/.cargo/bin/espmonitor", ["espmonitor", "/dev/ttyS10"], 0x7fffd016aae8 /* 23 vars */) = 0
brk(NULL) = 0x7fffeb143000
arch_prctl(0x3001 /* ARCH_??? */, 0x7ffff21d32b0) = -1 EINVAL (Invalid argument)
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=47534, ...}) = 0
mmap(NULL, 47534, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f125df73000
close(3) = 0
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\360q\2\0\0\0\0\0"..., 832) = 832
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
pread64(3, "\4\0\0\0\20\0\0\0\5\0\0\0GNU\0\2\0\0\300\4\0\0\0\3\0\0\0\0\0\0\0", 32, 848) = 32
pread64(3, "\4\0\0\0\24\0\0\0\3\0\0\0GNU\0\363\377?\332\200\270\27\304d\245n\355Y\377\t\334"..., 68, 880) = 68
fstat(3, {st_mode=S_IFREG|0755, st_size=2029224, ...}) = 0
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f125df70000
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
pread64(3, "\4\0\0\0\20\0\0\0\5\0\0\0GNU\0\2\0\0\300\4\0\0\0\3\0\0\0\0\0\0\0", 32, 848) = 32
pread64(3, "\4\0\0\0\24\0\0\0\3\0\0\0GNU\0\363\377?\332\200\270\27\304d\245n\355Y\377\t\334"..., 68, 880) = 68
mmap(NULL, 2036952, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f125dd40000
mprotect(0x7f125dd65000, 1847296, PROT_NONE) = 0
mmap(0x7f125dd65000, 1540096, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x25000) = 0x7f125dd65000
mmap(0x7f125dedd000, 303104, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x19d000) = 0x7f125dedd000
mmap(0x7f125df28000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1e7000) = 0x7f125df28000
mmap(0x7f125df2e000, 13528, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f125df2e000
close(3) = 0
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\3405\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0644, st_size=104984, ...}) = 0
mmap(NULL, 107592, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f125dd20000
mmap(0x7f125dd23000, 73728, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x3000) = 0x7f125dd23000
mmap(0x7f125dd35000, 16384, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x15000) = 0x7f125dd35000
mmap(0x7f125dd39000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x18000) = 0x7f125dd39000
close(3) = 0
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/librt.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0 7\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0644, st_size=40040, ...}) = 0
mmap(NULL, 44000, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f125dd10000
mprotect(0x7f125dd13000, 24576, PROT_NONE) = 0
mmap(0x7f125dd13000, 16384, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x3000) = 0x7f125dd13000
mmap(0x7f125dd17000, 4096, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x7000) = 0x7f125dd17000
mmap(0x7f125dd19000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x8000) = 0x7f125dd19000
close(3) = 0
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libpthread.so.0", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\220\201\0\0\0\0\0\0"..., 832) = 832
pread64(3, "\4\0\0\0\24\0\0\0\3\0\0\0GNU\0O\305\3743\364B\2216\244\224\306@\261\23\327o"..., 68, 824) = 68
fstat(3, {st_mode=S_IFREG|0755, st_size=157224, ...}) = 0
pread64(3, "\4\0\0\0\24\0\0\0\3\0\0\0GNU\0O\305\3743\364B\2216\244\224\306@\261\23\327o"..., 68, 824) = 68
mmap(NULL, 140408, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f125dced000
mmap(0x7f125dcf4000, 69632, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x7000) = 0x7f125dcf4000
mmap(0x7f125dd05000, 20480, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x18000) = 0x7f125dd05000
mmap(0x7f125dd0a000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1c000) = 0x7f125dd0a000
mmap(0x7f125dd0c000, 13432, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f125dd0c000
close(3) = 0
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libdl.so.2", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0 \22\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0644, st_size=18816, ...}) = 0
mmap(NULL, 20752, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f125dce0000
mmap(0x7f125dce1000, 8192, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1000) = 0x7f125dce1000
mmap(0x7f125dce3000, 4096, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x3000) = 0x7f125dce3000
mmap(0x7f125dce4000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x3000) = 0x7f125dce4000
close(3) = 0
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f125dcd0000
arch_prctl(ARCH_SET_FS, 0x7f125dcd1240) = 0
mprotect(0x7f125df28000, 12288, PROT_READ) = 0
mprotect(0x7f125dce4000, 4096, PROT_READ) = 0
mprotect(0x7f125dd0a000, 4096, PROT_READ) = 0
mprotect(0x7f125dd19000, 4096, PROT_READ) = 0
mprotect(0x7f125dd39000, 4096, PROT_READ) = 0
mprotect(0x7f125e172000, 167936, PROT_READ) = 0
mprotect(0x7f125df6d000, 4096, PROT_READ) = 0
munmap(0x7f125df73000, 47534) = 0
set_tid_address(0x7f125dcd1510) = 20106
set_robust_list(0x7f125dcd1520, 24) = 0
rt_sigaction(SIGRTMIN, {sa_handler=0x7f125dcf4bf0, sa_mask=[], sa_flags=SA_RESTORER|SA_SIGINFO, sa_restorer=0x7f125dd023c0}, NULL, 8) = 0
rt_sigaction(SIGRT_1, {sa_handler=0x7f125dcf4c90, sa_mask=[], sa_flags=SA_RESTORER|SA_RESTART|SA_SIGINFO, sa_restorer=0x7f125dd023c0}, NULL, 8) = 0
rt_sigprocmask(SIG_UNBLOCK, [RTMIN RT_1], NULL, 8) = 0
prlimit64(0, RLIMIT_STACK, NULL, {rlim_cur=8192*1024, rlim_max=8192*1024}) = 0
poll([{fd=0, events=0}, {fd=1, events=0}, {fd=2, events=0}], 3, 0) = 0 (Timeout)
rt_sigaction(SIGPIPE, {sa_handler=SIG_IGN, sa_mask=[PIPE], sa_flags=SA_RESTORER|SA_RESTART, sa_restorer=0x7f125dd86210}, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=SA_RESTORER, sa_restorer=0x7f66d5826210}, 8) = 0
rt_sigaction(SIGSEGV, NULL, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=SA_RESTORER, sa_restorer=0x7f66d5826210}, 8) = 0
rt_sigaction(SIGSEGV, {sa_handler=0x7f125e0d1440, sa_mask=[], sa_flags=SA_RESTORER|SA_ONSTACK|SA_SIGINFO, sa_restorer=0x7f125dd86210}, NULL, 8) = 0
rt_sigaction(SIGBUS, NULL, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=SA_RESTORER, sa_restorer=0x7f66d5826210}, 8) = 0
rt_sigaction(SIGBUS, {sa_handler=0x7f125e0d1440, sa_mask=[], sa_flags=SA_RESTORER|SA_ONSTACK|SA_SIGINFO, sa_restorer=0x7f125dd86210}, NULL, 8) = 0
sigaltstack(NULL, {ss_sp=NULL, ss_flags=SS_DISABLE, ss_size=0}) = 0
mmap(NULL, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_STACK, -1, 0) = 0x7f125dcc0000
mprotect(0x7f125dcc0000, 4096, PROT_NONE) = 0
sigaltstack({ss_sp=0x7f125dcc1000, ss_flags=0, ss_size=8192}, NULL) = 0
brk(NULL) = 0x7fffeb143000
brk(0x7fffeb164000) = 0x7fffeb164000
openat(AT_FDCWD, "/proc/self/maps", O_RDONLY|O_CLOEXEC) = 3
prlimit64(0, RLIMIT_STACK, NULL, {rlim_cur=8192*1024, rlim_max=8192*1024}) = 0
fstat(3, {st_mode=S_IFREG|0444, st_size=0, ...}) = 0
read(3, "7f125dcc0000-7f125dcc1000 ---p 0"..., 4096) = 4096
read(3, ":00 731285 /home/fra"..., 4096) = 769
close(3) = 0
sched_getaffinity(20106, 32, [0, 1, 2, 3, 4, 5, 6, 7]) = 32
ioctl(0, TCGETS, {B38400 opost isig icanon echo ...}) = 0
ioctl(0, TCGETS, {B38400 opost isig icanon echo ...}) = 0
ioctl(0, TCGETS, {B38400 opost isig icanon echo ...}) = 0
ioctl(0, SNDCTL_TMR_START or TCSETS, {B38400 -opost -isig -icanon -echo ...}) = 0
ioctl(0, TCGETS, {B38400 -opost -isig -icanon -echo ...}) = 0
clone(child_stack=NULL, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0x7f125dcd1510) = 20107
ESPMonitor 0.7.0
wait4(20107,
Commands:
CTRL+R Reset chip
CTRL+C Exit
Opening /dev/ttyS10 with speed 115200
Error: Inappropriate ioctl for device
[{WIFEXITED(s) && WEXITSTATUS(s) == 1}], 0, NULL) = 20107
--- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=20107, si_uid=1000, si_status=1, si_utime=0, si_stime=0} ---
ioctl(0, TCGETS, {B38400 -opost -isig -icanon -echo ...}) = 0
ioctl(0, TCGETS, {B38400 -opost -isig -icanon -echo ...}) = 0
ioctl(0, SNDCTL_TMR_START or TCSETS, {B38400 opost isig icanon echo ...}) = 0
ioctl(0, TCGETS, {B38400 opost isig icanon echo ...}) = 0
sigaltstack({ss_sp=NULL, ss_flags=SS_DISABLE, ss_size=8192}, NULL) = 0
munmap(0x7f125dcc0000, 12288) = 0
exit_group(1) = ?
+++ exited with 1 +++
Can you try again, and pass -f
to strace? I think the strace output you posted shows only cargo
before it forks, so it doesn't contain the call that failed.
It seems to be the problem caused by WSL1 not supporting TIOCEXCL. Both esptool.py and minicom will not use TIOCEXCL, so they can work normally under WSL1. Is it necessary to use TIOCEXCL for rust's serial library? If it can be skipped, espmonitor and espflash will work under WSL1.
strace -f espmonitor /dev/ttyS10
strace log:
execve("/home/frank/.cargo/bin/espmonitor", ["espmonitor", "/dev/ttyS11"], 0x7fffef40efa0 /* 26 vars */) = 0
brk(NULL) = 0x7fffce161000
arch_prctl(0x3001 /* ARCH_??? */, 0x7fffd5e48db0) = -1 EINVAL (Invalid argument)
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=48307, ...}) = 0
mmap(NULL, 48307, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7ff2a3a03000
close(3) = 0
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\360q\2\0\0\0\0\0"..., 832) = 832
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
pread64(3, "\4\0\0\0\20\0\0\0\5\0\0\0GNU\0\2\0\0\300\4\0\0\0\3\0\0\0\0\0\0\0", 32, 848) = 32
pread64(3, "\4\0\0\0\24\0\0\0\3\0\0\0GNU\0\363\377?\332\200\270\27\304d\245n\355Y\377\t\334"..., 68, 880) = 68
fstat(3, {st_mode=S_IFREG|0755, st_size=2029224, ...}) = 0
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7ff2a3a00000
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
pread64(3, "\4\0\0\0\20\0\0\0\5\0\0\0GNU\0\2\0\0\300\4\0\0\0\3\0\0\0\0\0\0\0", 32, 848) = 32
pread64(3, "\4\0\0\0\24\0\0\0\3\0\0\0GNU\0\363\377?\332\200\270\27\304d\245n\355Y\377\t\334"..., 68, 880) = 68
mmap(NULL, 2036952, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7ff2a37d0000
mprotect(0x7ff2a37f5000, 1847296, PROT_NONE) = 0
mmap(0x7ff2a37f5000, 1540096, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x25000) = 0x7ff2a37f5000
mmap(0x7ff2a396d000, 303104, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x19d000) = 0x7ff2a396d000
mmap(0x7ff2a39b8000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1e7000) = 0x7ff2a39b8000
mmap(0x7ff2a39be000, 13528, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7ff2a39be000
close(3) = 0
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\3405\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0644, st_size=104984, ...}) = 0
mmap(NULL, 107592, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7ff2a37b0000
mmap(0x7ff2a37b3000, 73728, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x3000) = 0x7ff2a37b3000
mmap(0x7ff2a37c5000, 16384, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x15000) = 0x7ff2a37c5000
mmap(0x7ff2a37c9000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x18000) = 0x7ff2a37c9000
close(3) = 0
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/librt.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0 7\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0644, st_size=40040, ...}) = 0
mmap(NULL, 44000, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7ff2a37a0000
mprotect(0x7ff2a37a3000, 24576, PROT_NONE) = 0
mmap(0x7ff2a37a3000, 16384, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x3000) = 0x7ff2a37a3000
mmap(0x7ff2a37a7000, 4096, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x7000) = 0x7ff2a37a7000
mmap(0x7ff2a37a9000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x8000) = 0x7ff2a37a9000
close(3) = 0
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libpthread.so.0", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\220\201\0\0\0\0\0\0"..., 832) = 832
pread64(3, "\4\0\0\0\24\0\0\0\3\0\0\0GNU\0O\305\3743\364B\2216\244\224\306@\261\23\327o"..., 68, 824) = 68
fstat(3, {st_mode=S_IFREG|0755, st_size=157224, ...}) = 0
pread64(3, "\4\0\0\0\24\0\0\0\3\0\0\0GNU\0O\305\3743\364B\2216\244\224\306@\261\23\327o"..., 68, 824) = 68
mmap(NULL, 140408, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7ff2a377d000
mmap(0x7ff2a3784000, 69632, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x7000) = 0x7ff2a3784000
mmap(0x7ff2a3795000, 20480, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x18000) = 0x7ff2a3795000
mmap(0x7ff2a379a000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1c000) = 0x7ff2a379a000
mmap(0x7ff2a379c000, 13432, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7ff2a379c000
close(3) = 0
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libdl.so.2", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0 \22\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0644, st_size=18816, ...}) = 0
mmap(NULL, 20752, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7ff2a3770000
mmap(0x7ff2a3771000, 8192, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1000) = 0x7ff2a3771000
mmap(0x7ff2a3773000, 4096, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x3000) = 0x7ff2a3773000
mmap(0x7ff2a3774000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x3000) = 0x7ff2a3774000
close(3) = 0
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7ff2a3760000
arch_prctl(ARCH_SET_FS, 0x7ff2a3761240) = 0
mprotect(0x7ff2a39b8000, 12288, PROT_READ) = 0
mprotect(0x7ff2a3774000, 4096, PROT_READ) = 0
mprotect(0x7ff2a379a000, 4096, PROT_READ) = 0
mprotect(0x7ff2a37a9000, 4096, PROT_READ) = 0
mprotect(0x7ff2a37c9000, 4096, PROT_READ) = 0
mprotect(0x7ff2a3c02000, 167936, PROT_READ) = 0
mprotect(0x7ff2a39fd000, 4096, PROT_READ) = 0
munmap(0x7ff2a3a03000, 48307) = 0
set_tid_address(0x7ff2a3761510) = 4402
set_robust_list(0x7ff2a3761520, 24) = 0
rt_sigaction(SIGRTMIN, {sa_handler=0x7ff2a3784bf0, sa_mask=[], sa_flags=SA_RESTORER|SA_SIGINFO, sa_restorer=0x7ff2a37923c0}, NULL, 8) = 0
rt_sigaction(SIGRT_1, {sa_handler=0x7ff2a3784c90, sa_mask=[], sa_flags=SA_RESTORER|SA_RESTART|SA_SIGINFO, sa_restorer=0x7ff2a37923c0}, NULL, 8) = 0
rt_sigprocmask(SIG_UNBLOCK, [RTMIN RT_1], NULL, 8) = 0
prlimit64(0, RLIMIT_STACK, NULL, {rlim_cur=8192*1024, rlim_max=8192*1024}) = 0
poll([{fd=0, events=0}, {fd=1, events=0}, {fd=2, events=0}], 3, 0) = 0 (Timeout)
rt_sigaction(SIGPIPE, {sa_handler=SIG_IGN, sa_mask=[PIPE], sa_flags=SA_RESTORER|SA_RESTART, sa_restorer=0x7ff2a3816210}, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=SA_RESTORER, sa_restorer=0x7fd1a44c6210}, 8) = 0
rt_sigaction(SIGSEGV, NULL, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=SA_RESTORER, sa_restorer=0x7fd1a44c6210}, 8) = 0
rt_sigaction(SIGSEGV, {sa_handler=0x7ff2a3b61440, sa_mask=[], sa_flags=SA_RESTORER|SA_ONSTACK|SA_SIGINFO, sa_restorer=0x7ff2a3816210}, NULL, 8) = 0
rt_sigaction(SIGBUS, NULL, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=SA_RESTORER, sa_restorer=0x7fd1a44c6210}, 8) = 0
rt_sigaction(SIGBUS, {sa_handler=0x7ff2a3b61440, sa_mask=[], sa_flags=SA_RESTORER|SA_ONSTACK|SA_SIGINFO, sa_restorer=0x7ff2a3816210}, NULL, 8) = 0
sigaltstack(NULL, {ss_sp=NULL, ss_flags=SS_DISABLE, ss_size=0}) = 0
mmap(NULL, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_STACK, -1, 0) = 0x7ff2a3750000
mprotect(0x7ff2a3750000, 4096, PROT_NONE) = 0
sigaltstack({ss_sp=0x7ff2a3751000, ss_flags=0, ss_size=8192}, NULL) = 0
brk(NULL) = 0x7fffce161000
brk(0x7fffce182000) = 0x7fffce182000
openat(AT_FDCWD, "/proc/self/maps", O_RDONLY|O_CLOEXEC) = 3
prlimit64(0, RLIMIT_STACK, NULL, {rlim_cur=8192*1024, rlim_max=8192*1024}) = 0
fstat(3, {st_mode=S_IFREG|0444, st_size=0, ...}) = 0
read(3, "7ff2a3750000-7ff2a3751000 ---p 0"..., 4096) = 4096
read(3, ":00 731285 /home/fra"..., 4096) = 769
close(3) = 0
sched_getaffinity(4402, 32, [0, 1, 2, 3, 4, 5, 6, 7]) = 32
ioctl(0, TCGETS, {B38400 opost isig icanon echo ...}) = 0
ioctl(0, TCGETS, {B38400 opost isig icanon echo ...}) = 0
ioctl(0, TCGETS, {B38400 opost isig icanon echo ...}) = 0
ioctl(0, SNDCTL_TMR_START or TCSETS, {B38400 -opost -isig -icanon -echo ...}) = 0
ioctl(0, TCGETS, {B38400 -opost -isig -icanon -echo ...}) = 0
clone(child_stack=NULL, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLDstrace: Process 4403 attached
, child_tidptr=0x7ff2a3761510) = 4403
[pid 4403] set_robust_list(0x7ff2a3761520, 24 <unfinished ...>
[pid 4402] wait4(4403, <unfinished ...>
[pid 4403] <... set_robust_list resumed>) = 0
[pid 4403] write(1, "ESPMonitor 0.7.0\r\n", 18ESPMonitor 0.7.0
) = 18
[pid 4403] write(1, "\r\n", 2
) = 2
[pid 4403] write(1, "Commands:\r\n", 11Commands:
) = 11
[pid 4403] write(1, " CTRL+R Reset chip\r\n", 26 CTRL+R Reset chip
) = 26
[pid 4403] write(1, " CTRL+C Exit\r\n", 20 CTRL+C Exit
) = 20
[pid 4403] write(1, "\r\n", 2
) = 2
[pid 4403] write(1, "Opening /dev/ttyS11 with speed 1"..., 39Opening /dev/ttyS11 with speed 115200
) = 39
[pid 4403] openat(AT_FDCWD, "/dev/ttyS11", O_RDWR|O_NOCTTY|O_NONBLOCK) = 3
[pid 4403] ioctl(3, TIOCEXCL) = -1 ENOTTY (Inappropriate ioctl for device)
[pid 4403] ioctl(3, TIOCNXCL) = -1 ENOTTY (Inappropriate ioctl for device)
[pid 4403] close(3) = 0
[pid 4403] write(1, "Error: Inappropriate ioctl for d"..., 38Error: Inappropriate ioctl for device
) = 38
[pid 4403] write(1, "\n", 1
) = 1
[pid 4403] sigaltstack({ss_sp=NULL, ss_flags=SS_DISABLE, ss_size=8192}, NULL) = 0
[pid 4403] munmap(0x7ff2a3750000, 12288) = 0
[pid 4403] exit_group(1) = ?
[pid 4403] +++ exited with 1 +++
<... wait4 resumed>[{WIFEXITED(s) && WEXITSTATUS(s) == 1}], 0, NULL) = 4403
--- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=4403, si_uid=1000, si_status=1, si_utime=0, si_stime=0} ---
ioctl(0, TCGETS, {B38400 -opost -isig -icanon -echo ...}) = 0
ioctl(0, TCGETS, {B38400 -opost -isig -icanon -echo ...}) = 0
ioctl(0, SNDCTL_TMR_START or TCSETS, {B38400 opost isig icanon echo ...}) = 0
ioctl(0, TCGETS, {B38400 opost isig icanon echo ...}) = 0
sigaltstack({ss_sp=NULL, ss_flags=SS_DISABLE, ss_size=8192}, NULL) = 0
munmap(0x7ff2a3750000, 12288) = 0
exit_group(1) = ?
+++ exited with 1 +++
I believe the serial
crate is just doing whatever it's doing; I don't have control over that. Maybe file a bug over with them?
It should really be an issue to serial
. rust is very new to me, can you tell me the github repo URL of serial
? Thanks
Sure thing, I believe it's https://github.com/dcuddeback/serial-rs
Feel free to leave this issue open for others to find, and so we can remember to follow up if/when things get fixed in the serial library.
Thanks, I have submitted dcuddeback/serial-rs#68 to serial-rs.
if you don't think it is necessary to keep this issue, I will close it.
Probably better to leave it open.