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

Connection to LoPy (through Pysense) stops #26

Closed
jellium opened this issue Jun 23, 2017 · 10 comments

Comments

Projects
None yet
3 participants
@jellium
Copy link

commented Jun 23, 2017

Hello,

Using a LoPy connected through a Pysense board, once the REPL prompt over serial is reached, the connection stops after a few seconds and Pymakr console outputs the following error:

> Failed to connect (Error: Error: Broken pipe, cannot drain). Click here to try again.

This error is not reproduced when reaching the REPL prompt with minicom.

This error is not reproduced in Pymakr when using an expansion board instead of a Pysense board.

Thank you.

@jellium

This comment has been minimized.

Copy link
Author

commented Jun 23, 2017

Hi again,
I suspect the error to be related to the latest release of the Pymakr package for Atom (version 1.0.2). I am pretty sure this error occurs since I updated the package yesterday.

@jellium

This comment has been minimized.

Copy link
Author

commented Jun 23, 2017

I confirm that the problem lies in version 1.0.2 of the Pymakr Atom package.
Downgrading to version 1.0.1 solves the issue. Yet I am curious to know what is wrong in version 1.0.2 for my LoPy-Pysense.

@RalphHogenbirk

This comment has been minimized.

Copy link
Member

commented Jun 26, 2017

hi @jellium, thanks for reporting this. I'm investigating what is causing the issue.

On which OS are you? From 1.0.2 on, I added a keep-alive for the serial. An issue in the serialport library could be the cause of this keep-alive not working on windows 10 specifically. Yet, on my virtual windows 10 machine it seems to be working using a pysense and wipy.

@tobru

This comment has been minimized.

Copy link

commented Jun 26, 2017

I'm facing the same issue on Arch Linux, so it doesn't seem to be a Windows 10 specific issue.

@jellium

This comment has been minimized.

Copy link
Author

commented Jun 26, 2017

Hi @RalphHogenbirk, thanks for the answer.
I am using Ubuntu (16.04).

@RalphHogenbirk

This comment has been minimized.

Copy link
Member

commented Jun 26, 2017

Before this 'broken pipe' error appears, are you able to use the REPL for a few seconds? Or is it never showing the '>>>'?

@jellium

This comment has been minimized.

Copy link
Author

commented Jun 26, 2017

I confirm that I can use the REPL for a few seconds (it does show the '>>>' before the error occurs). I tried to explain this in the opening post.
Thanks,

@RalphHogenbirk

This comment has been minimized.

Copy link
Member

commented Jun 26, 2017

After some more testing I got to reproduce it on windows and linux. There is an issue with the driver in the pysense/pytrack that makes the keep-alive message fail. On mac it should also fail, but the drivers on mac are probably ignoring the error that is produced, so there it ends up working like it should, from atoms perspective.

We'll brainstorm about a solution. At the very least I'll have workaround for you guys by the end of the day.

@jellium

This comment has been minimized.

Copy link
Author

commented Jun 26, 2017

Sweet, thanks for your feedback.
Again: downgrading to 1.0.1 can be a workaround (it is for me in the meantime before any fixing update).

@RalphHogenbirk

This comment has been minimized.

Copy link
Member

commented Jun 27, 2017

@jellium @tobru A small workaround is now on the develop branch, that disables the keep-alive (dtr) for linux and windows. You can either keep using v1.0.1 or the code on develop. The workaround will be included in the next release. We'll have to wait for a future pytrack/pysense usb driver update before we enable the dtr feature again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.