Make sure you can check all these boxes before submitting your issue—Thank you!
– [x] The submitted code is available under the GNU GPL version 2 with the “or later” clause
– [x] You have certified that this is the case by including a “Signed-off-by” message in each commit
– [x] You used your real name and a working e-mail address in this message
I’ve been trying to get my new WJ200 VFD working but the module kept segfaulting. It seems this is a really old issue, so I’m having a go at fixing it. Taking inspiration from this forum post I changed a buffer size to work better with libmodbus:
Not absolutely sure what I’m doing, but I tested this with the v2.4.7 tag and latest master
and it works fine, whereas before the module would segfault on initialisation. Is this because something in libmodbus changed?
Signed-off-by: James Waples jamwaffles@gmail.com
评论 (3)
#2 – andrewsuzuki 于 2019-09-19
Hi @jamwaffles, I’m curious as to why you set the size of bits to 16.
The libmodbus documentation on
#3 – jamwaffles 于 2019-09-19 IIRC, because the forum post said so :grin:. I tested the 16 byte buffer and it worked in my situation so I left it at that. It could probably be improved by someone that knows more about modbus than I do.
#1 – jepler 于 2016-07-23
Thank you for your contribution. I have applied your fix to 2.6, 2.7, and master branches. The result will appear shortly on github.