-
Notifications
You must be signed in to change notification settings - Fork 181
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
Proprietary Modbus function and use of rawRequest/rawResponce #279
Comments
I add here a little example of what I'm searching to do with modbus-esp8266 library. This is a little extract of data communication:
In TX we have MBAP header (first 7 bytes), the remaining bytes are for a request using function code 0x41, subcommands 0x24, length is 0x2 bytes, payload is 0x01 and 0x00. Is possible to do this kind of proprietary modbus request (and process the reply from the slave device) using modbus-esp8266 library? If yes, is it possible to have a little help or an example? Thanks!!! |
Hi, I'm using with great satisfaction this little gem of library.
I have a request regarding an issue I was not able to solve by myself. I need to send a message with proprietary Modbus function code 0x41, as this special function code is used in Huawei inverters for many things (file upload/download, authentication, etc).
This function code is used in other open source libraries to perform user authentication through Modbus protocol. An example of this is contained in huawei_solar.py python files (source code available here: https://pypi.org/project/huawei-solar/#files).
I thought it was quite easy to fill a buffer with the proprietary sequence of bytes, call the rawRequest to send buffer to the device (leaving the job to create the MBAP header that prepends the buffer to the rawRequest function) and wait for a response from device with rawResponce (or even better use a callback). But I was not able to get a reply from Huawei inverter.
Emilianov (and others guru), any suggestion? Do you think is it possible to use this library for this kind of job?
Thanks!
The text was updated successfully, but these errors were encountered: