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

Make it cross-platform #7

Open
spth opened this issue Sep 14, 2020 · 2 comments
Open

Make it cross-platform #7

spth opened this issue Sep 14, 2020 · 2 comments

Comments

@spth
Copy link
Owner

spth commented Sep 14, 2020

OpenRabbit currently uses Linux-isms. Since it requires direct access to DTR, etc it can't just use the portable POSIX functionality instead. Also, it would be nice to have Windows support.
Thus a serial port abstraction layer is needed. Options include:

@tomlogic
Copy link
Collaborator

I wrote a cross-platform (Windows/POSIX) serial port library for https://github.com/digidotcom/xbee_ansic_library. It includes control over RTS and reading of CTS, but I did not implement an API to control DTR. I imagine you could extend it with an ioctl on POSIX and the appropriate EscapeCommFunction() on Windows (like I did in xbee_ser_set_rts()).

But libserialport looks like a more complete solution.

@spth spth changed the title Make it cross-platoform Make it cross-platform Sep 15, 2020
@spth
Copy link
Owner Author

spth commented Sep 15, 2020

As far as I know, POSIX does not support explicit control of DTR. So for DTR, we'd need different solutions for individual POSIX systems (like the Linux ioctl Openrabbit uses now), though I think FreeBSD and OpenBSD are very similar to Linux wrt. the API for DTR.
An advantage of libserialport is that it is already is part of Debian, other GNU/Linux distributions, and in the OpenBSD and FreeBSD ports.
However, AFAIK, libserialport does not yet support Hurd and I don't know of libserialport Windows packages. Also, while libserialport is under active development (and maintained by the sigrok project, so it won't go away anytime soon), they haven't made a release in years.

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

2 participants