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

Incompatibility with baudrate-less serial drivers on Windows #137

Open
y3nd opened this issue Feb 4, 2025 · 7 comments
Open

Incompatibility with baudrate-less serial drivers on Windows #137

y3nd opened this issue Feb 4, 2025 · 7 comments

Comments

@y3nd
Copy link

y3nd commented Feb 4, 2025

Like explained here for another software, some drivers requires that no baudrate is set for the serial port, otherwise the driver can crash an output an error, and ser2net is not usable.

Here is the error from the underlying gensio:

unhandled OS error in gensio_win_setup_comport:857: A device attached to the system is not functionning. (31)

This is the case for ublox F9x devices when using the integrated USB interface.

Proposed solution : allow to set the baudrate to None to be compatible with those specific drivers.

@cminyard
Copy link
Owner

cminyard commented Feb 4, 2025

There is already a "dev" gensio that I believe does what you want. So instead of serialdev, use dev.

@y3nd
Copy link
Author

y3nd commented Feb 4, 2025

Using dev instead produces the same error. It looks like the DCB configuration is overconstraining the driver causing it to error out.

C:\Users\x\dev\tests\ser2net>ser2net -c ser2net.yaml -d -l
info: Unhandled OS error in gensio_win_setup_commport:857: A device attached to the system is not functioning.
 (31)

@cminyard
Copy link
Owner

cminyard commented Feb 4, 2025

Hmm. If you use dev, it shouldn't be calling that code. It seems that the device is advertising itself as a serial port, and that the windows code I have here is just trusting it; the information about whether it's "dev" or "serialdev" is not passed in. Fortunately, that can be solved pretty easily.

@cminyard
Copy link
Owner

cminyard commented Feb 4, 2025

Ok, I have pushed up a patch to the gensio repository that should solve this. Unfortunately, I cannot ultimately test it, as I don't have any hardware like that. Can you give it a try?

@cminyard
Copy link
Owner

cminyard commented Feb 8, 2025

Any news on this? I'd like to get a release out for a different issue, but I'd like to make sure this is fixed, too.

@y3nd
Copy link
Author

y3nd commented Feb 9, 2025

Sorry I don't have the compilation setup right know so I won't be able to test it. I went developing an alternative using Golang and https://github.com/bugst/go-serial

I can try a prerelease or the release you want to publish.

@cminyard
Copy link
Owner

Ok, I went ahead and did a release of gensio 2.8.12 and ser2net 4.6.4. If you could test it, that would be great. I think I got everything, but I can't test and be sure. Sorry this didn't work out of the box for you.

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