Modbus and serial comm
From WikiWiki
Here's a modbus library for linux based systems. I picked up the code from what appears to be an abandoned project, and modified it to work with the TS7xx0 RS 485 boards. It also supports standard RS 232 hardware. The original code is at http://pes.free.fr/. The reason I say it is abandoned is that the code hasn't been updated in about 4 years, and the author has not responded to my queries.
I've added specific drivers for the TS-7xx0 based boards, but the code is modular enough that other drivers should be easy to write. Also, additional protocols should be easy to add as long as they are 'query and response'....
Additional drivers welcome....
The modbus implementation is not perfect; it doesn't follow the spec for the various delays and some of the timeouts are too long. Modbus slave mode is broken. These should be easy enough to fix, though....
http://www.seiner.com/ts7000/modbus-0.0.2.tar.gz
Fixes and patches are welcome.
''''''' UPDATE '''''''
There are some bugs in the above tarball. The crc generator and tester are broken; they need to use unsigned ints. Also, the code fails to properly handle modbus error messages.
I have some of these fixes in testing, but don't expect a new release until after November 06.
