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

Modbus user-defined function codes (IDFGH-6561) #8205

Open
fredj0207 opened this issue Jan 7, 2022 · 1 comment
Open

Modbus user-defined function codes (IDFGH-6561) #8205

fredj0207 opened this issue Jan 7, 2022 · 1 comment
Assignees
Labels
Resolution: Duplicate This issue or pull request already exists Status: Done Issue is done internally Type: Feature Request Feature request for IDF

Comments

@fredj0207
Copy link

Is your feature request related to a problem? Please describe.

We need to support user-defined function codes as defined in Modbus protocol.
The freeModbus library allows to do it through the eMBRegisterCB however the IDF freeModbus component does not give access to this function (no public API) and the total number of supported functions is very limited (16).

Describe the solution you'd like

  • Have a public API to register CB in freemodbus component
  • Have a way to support more function codes than 16 in the component
@fredj0207 fredj0207 added the Type: Feature Request Feature request for IDF label Jan 7, 2022
@espressif-bot espressif-bot added the Status: Opened Issue is new label Jan 7, 2022
@github-actions github-actions bot changed the title Modbus user-defined function codes Modbus user-defined function codes (IDFGH-6561) Jan 7, 2022
@alisitsyn
Copy link
Collaborator

alisitsyn commented Jan 11, 2022

Hello @fredj0207 ,

Thank you for your feature request to add this functionality. The ESP_Modbus supports just common read/write functions for now. Registration of custom function codes and handlers is planned to be supported after ESP-IDF v5.0.
For now, I would propose you to modify the component CMakeLists.txt file and expose the private include paths for your project.

UPDATE: the approach to override some sources of the component
the approach to override function handler or add custom handler in user application with eMBRegisterCB

@espressif-bot espressif-bot added Status: Done Issue is done internally Resolution: Duplicate This issue or pull request already exists and removed Status: Opened Issue is new labels Mar 5, 2024
@alisitsyn alisitsyn self-assigned this Dec 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Resolution: Duplicate This issue or pull request already exists Status: Done Issue is done internally Type: Feature Request Feature request for IDF
Projects
None yet
Development

No branches or pull requests

3 participants