Skip to content

How do I Open a Serial Port? #7

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

Closed
gsexton opened this issue Aug 1, 2021 · 2 comments
Closed

How do I Open a Serial Port? #7

gsexton opened this issue Aug 1, 2021 · 2 comments

Comments

@gsexton
Copy link
Contributor

gsexton commented Aug 1, 2021

I'm trying to figure out how to open a serial port, but not having a lot of luck.

The only thing that looks right is periph/hosts/serial/serial_go, but (leaving aside the port naming ttyS? idea is broken), func newPortDevFs(portNumber int) (*Port, error) doesn't seem to be exported, so I'm at a loss.

Can you give me an idea on how to you instantiate a serial port?

Thanks.

George

@maruel
Copy link
Member

maruel commented Aug 1, 2021

Hi!

Serial support needs to be implemented. Initially periph was not importing any other packages so the initial expectation was to implement it with raw API calls. Starting with periph v3 it's now fine to reuse previous implementations so that could be a way to go to have something up and running more quickly. My preference would be to not depend on cgo but it may be fine in practice. Would you want to work on such feature?

@gsexton
Copy link
Contributor Author

gsexton commented Aug 10, 2021

Thanks. I'll look at it after I get my current project done. I'm pretty new to golang, so I'm not sure how well I can do.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants