[collectd] Modbus support

Matt Baker matt at sevenone.com
Fri Jan 7 13:03:34 CET 2011


Hi Florian,

I managed to build against modbus 2.0.3 using the code checked out using the Git repository and this appears to function just fine.
Unfortunately though I discovered that the device I am using to do the Modbus conversion supports Modbus/TCP for interfaces connected directly, but provides a Modbus RTU over TCP for other external Modbus serial devices.

I am looking at either writing some code on the device to do a Modbus TCP to Modbus RTU conversion, or maybe it is possible to use the libmodbus in RTU mode over a TCP connection?

Before I start going into this too far I was wondering if you had any thoughts on how difficult it would be to modify collectd to do this?


Cheers,

Matt

> Hi Matt,
> 
> On Wed, Jan 05, 2011 at 09:25:00PM +1030, Matt Baker wrote:
>> Initially I tried against the latest unstable version of libmodbus,
>> 4.9.2 but found that running configure of collectd did not find the
>> modbus libraries unless I used 'force'.
> 
> unfortunately, the author of libmodbus breaks backwards compatibility
> often, especially in the releases after 2.0.3 which are marked
> "experimental". That's why those newer versions will only be supported
> when another "stable" version emerges.
> 
> The current master branch contains some compatibility code with 2.9.2,
> but this will be updated as libmodbus changes. Use 2.0.3 for now to be
> safe.
> 
>> Switching to libmodbus 2.0.3 and the configure run found everything
>> okay, but the compile is resulting in:
> 
> A fixed version of the code is available in the Git repository and will
> be released as 4.10.3 eventually. The commit fixing this is 491712a [0],
> you can download the fixed file from [1].
> 
> Just out of curiosity, can you share what you're using the plugin for?
> 
> Best regards,
> —octo
> 
> [0] <https://github.com/octo/collectd/commit/491712ab7dd36eb58fba23942f5edf4b76b50361>
> [1] <https://github.com/octo/collectd/raw/491712ab7dd36eb58fba23942f5edf4b76b50361/src/modbus.c>
> -- 
> Florian octo Forster
> Hacker in training
> GnuPG: 0x0C705A15
> http://octo.it/




More information about the collectd mailing list