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

Fix for using USB dongles with auto-switch #63

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

lmartorella
Copy link

Hi,
I'm using a USB dongle based on a RS232 driver and the RTS line that drives the line.
The current implementation is selecting the RS485 mode when RTU is used. However this cause an error, since the USB driver is not implementing the ioctl to enable the RS485 behavior (the dongle is actually a RS232 driver).
The error is not checked by the code, so I was not able to figure out the error (I added a check).
So I believe that the correct logic would be:

  • If no RTS setup is passed at the command line, the RTU must implement the RS485 logic.
  • If RTS setup (pin, polarity, etc..) is passed at the command line, the RTU should be opened in RS232 mode instead.

If you think that instead a new explicit command-line switch should be used instead, please let me know. The current proposed implementation has the advantage of not requiring any other setup.

Thanks, Luciano

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

Successfully merging this pull request may close these issues.

1 participant