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

Line break causes terminal to suspend silently #86

Open
mdhayter opened this issue Dec 30, 2016 · 2 comments
Open

Line break causes terminal to suspend silently #86

mdhayter opened this issue Dec 30, 2016 · 2 comments

Comments

@mdhayter
Copy link

Just got a HiFive1 board (https://www.crowdsupply.com/sifive/hifive1) which generates a line break whenever the reset button is pushed (power supply is cycled so the input to the FTDI serial-USB is low for a while). In other terminal programs like screen or minicom in Linux the line break is ignored. But in beagle term there is no further communication after the line break. The documentation suggests that after an error chrome.serial will put the connection in a paused state.

To check this is what is happening I added an error listener to registerConnectBtnEvent_.

        chrome.serial.onReceiveError.addListener(function(info) {
          if (info && info.error) {
            inputOutput.print('[' + info.error + ']');
	    chrome.serial.setPaused(info.connectionId, false, 
                                    function() {});
          }
        });

This seems to work, printing [break] when the line break happens (I also set the parity incorrectly and it seems to work for parity errors too).

Not sure if this is the best fix (especially where there are a bunch of errors) but it works for my case.

@codewithtyler
Copy link

codewithtyler commented Dec 30, 2016

Have you tried intercepting the input? You would need an if statement to check for a line break. You would then only continue if the if statement fails then that should fix your issue because you'd be ignoring the line break.

@ric96
Copy link

ric96 commented Mar 8, 2020

same with poplar dev board. Power cycling causes terminal to suspend. soft reboots are fine.

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

3 participants