machdyne / blaustahl

Blaustahl Storage Device
Other
35 stars 6 forks source link

Not working with screen #2

Open bubiwahn opened 3 weeks ago

bubiwahn commented 3 weeks ago

Context:

I'm afraid it's not working properly in this context with "screen": after intial connect it scrambles content and freezes. Reconnect doesn't help. Ctrl-W does not toggle back and Ctrl-L, Ctrl-G, are not working. Are you sure that this configuration is supported? I switched to minicom as it appears much more stable.

machdyne commented 3 weeks ago

Hello. I haven't seen those issues with screen on Linux or OS X. I will try to reproduce this, if you can provide any other relevant info it would be appreciated.

For example, after exiting screen:

$ stty -F /dev/ttyACM0 -a

and

$ showkey -a

for CTRL-W, CTRL-L, CTRL-G.

Thanks.

bubiwahn commented 3 weeks ago
andi@wolfram:~$ showkey -a

Press any keys - Ctrl-D will terminate this program

^S       19 0023 0x13
^G        7 0007 0x07
^L       12 0014 0x0c
^W       23 0027 0x17
andi@wolfram:~$ stty -F /dev/ttyACM0 -a
speed 9600 baud; rows 0; columns 0; line = 0;
intr = ^C; quit = ^\; erase = ^?; kill = ^U; eof = ^D; 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 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

Reproduce by just hitting Ctrl-S, after that, screen is frozen an does not accept any input. I had to kill it using Ctrl-A Ctrl-C.

bubiwahn commented 3 weeks ago

sorry, I gave you the wrong data. Here is the right one for this interface:

okay:

andi@wolfram:~$ stty -F /dev/ttyACM1 -a
speed 9600 baud; rows 0; columns 0; line = 0;
intr = ^C; quit = ^\; erase = ^?; kill = ^U; eof = ^D; 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 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

error state:

andi@wolfram:~$ stty -F /dev/ttyACM1 -a
stty: /dev/ttyACM1: Device or resource busy
machdyne commented 3 weeks ago

Under screen you should be able to un-freeze with CTRL-Q after freezing with CTRL-S. Not sure if that's the main issue you're seeing, as it wouldn't necessarily account for scrambled content.

bubiwahn commented 3 weeks ago

Oh, I understand: There's a conflict between Crtl-S(screen: xoff) and Ctrl-S(blaustahl: Toggle Status bar). Is there a way arround?

machdyne commented 3 weeks ago

Right, I had forgotten that CTRL-S was being used for the status bar. That may not be ideal.

You should be able to disable software flow control with:

$ stty -ixon

Thanks for bringing this to my attention.

bubiwahn commented 3 weeks ago

Thanx, no problem. Perhaps another key is better suited for toggling status bar. Meanwhile I'm using minicom, that's working perfect.