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

Hi. Is it possible to edit communication parameters such as parity, stop bits and data length in ModbusMaster library (Version bump to v2.0.1)? Thank You. #167

Open
pklg opened this issue Jan 8, 2022 · 3 comments

Comments

@pklg
Copy link

pklg commented Jan 8, 2022

ModbusMaster version

[Version of the project where you are encountering the issue]

Arduino IDE version

[Version of Arduino IDE in your environment]

Arduino Hardware

[Hardware information, including board and processor]

Platform Details

[Operating system distribution and release version]


Scenario:

[What you are trying to achieve and you can't?]

Steps to Reproduce:

[If you are filing an issue what are the things we need to do in order to repro your problem? How are you using this project or any resources it includes?]

Expected Result:

[What are you expecting to happen as the consequence of above reproduction steps?]

Actual Result:

[What actually happens after the reproduction steps? Include the error output or a link to a gist if possible.]


Feature Request

Narrative:

As a [role]
I want [feature]
So that [benefit]

Acceptance Criteria:

Scenario 1: Title
Given [context]
  And [some more context]...
When  [event]
Then  [outcome]
  And [another outcome]...
@pklg pklg changed the title Hi. Is it possible to edit communication parameters such as parity, stop bits and data length in ModbusMaster library? Thank You. Hi. Is it possible to edit communication parameters such as parity, stop bits and data length in ModbusMaster library (Version bump to v2.0.1)? Thank You. Jan 8, 2022
@noiasca
Copy link

noiasca commented Jan 11, 2022

Imho this makes no sense.
When you call .begin() you hand over a reference to your Serial object.

void begin(uint8_t, Stream &serial);

the library has nothing to do with parity, stopbits or data length. If you want to change this kind of parameters, just adopt the paramters of your Serial interface.

@Hantuch
Copy link

Hantuch commented Jan 19, 2022

Those parameters are determined on both ends of client & server serial comm. , and since modbusmaster only takes a Serial object, not create it, the change needs to be done on those side, not here, just as @noiasca said

Although I did encounter a problem whilst using Arduino's own SoftwareSerial (not hardware mind you), which didn't have the options for parity & stop bits, in which case I found another more suitable software serial library here in Github

@pklg
Copy link
Author

pklg commented Jan 19, 2022 via email

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

3 participants