Fix for using USB dongles with auto-switch #63
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 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