-
Notifications
You must be signed in to change notification settings - Fork 2
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
Switch to github.com/jacobsa/go-serial #24
Comments
@martinhpedersen Currently, ptc-go uses tarm/serial, located in |
@blockmurder - Regarding I will have a look at github.com/jacobsa/go-serial. Thanks :) |
The new serial driver (jacobsa/go-serial) requests bauderate in unsigned integer. Update harenber/ptc-go to newest develop. Will be updated to new version as soon as possible. Closing harenber/ptc-go#24
I think we can close this issue now, after a lot of checking libraries, I ended up using https://github.com/albenik/go-serial which turned out to be stable, supported the baudrate and seems to be pure Go. |
https://github.com/albenik/go-serial currently doesn't compile on Darwin/OS X. I have a PR in to fix that, but @albenik hasn't responded to the other PR in that repo for several months and may be inactive. |
@xylo04 Indeed the project doesn't show much activity anymore. Would you have the time to take up the reponsibility and fork the code and take care of that? |
I hesitate to commit to maintaining a fork. Let me give it some thought. I was able to make that PR through whack-a-mole hacking, but I don't really deeply understand what this code does. If you believe golang/go#42241 (comment), albenik's approach of recreating the syscall bindings is unsupported, and it should be using the |
https://github.com/albenik/go-serial was forked from https://github.com/bugst/go-serial which is still active, so we could consider looking at that. |
I think I tried this one (bugst) and there was a show-stopper somewhere. I do not really remember, I tried a couple of serial libraries and nearly all had the problem that they did not support this non-standard baud rate we need for the P4 modems. But anyway, it's definitely worth a (2nd) look. |
In order to support custom baud rates (e.g. for P4 Dragon, see #3) we should switch from https://github.com/tarm/serial to https://github.com/jacobsa/go-serial/
I initially proposed https://github.com/mikepb/go-serial but as @martinhpedersen stated correctly in #3:
Seems like jacobsa/go can do without cgo: https://github.com/jacobsa/go-serial/blob/15cf729a72d49e837fa047a4142fa6e4d5ab45a1/serial/open_linux.go#L14
The text was updated successfully, but these errors were encountered: