Richard Gregory
2010-Jan-13 15:36 UTC
[Nut-upsdev] patch for support Liebert GXT2 ESP2 protocol
Hi All, Attached is a patch against nut-2.4.1 that adds a driver for the ESP2 protocol, as used by the serial port found on the Liebert GXT2. This driver is mostly based on: http://www.csc.liv.ac.uk/~greg/projects/liebertserial with additional bit field information from Spiros Ioannou. liebert.c at the above url has been tested by a few people to return the correct status data. Besides me, this driver (which is based on liebert.c) has been tested by one other. I've not yet had confirmation of the OB LB flags, my GXT2 is in a production setup. Richard +-- --+ | Biological Sciences, Room 231 | | http://www.csc.liv.ac.uk/~greg | +-- --+ -------------- next part -------------- A non-text attachment was scrubbed... Name: nut-2.4.1-liebertgxt2.patch.gz Type: application/gzip Size: 6883 bytes Desc: not available URL: <http://lists.alioth.debian.org/pipermail/nut-upsdev/attachments/20100113/def8772b/attachment.bin>
Arjen de Korte
2010-Jan-13 21:55 UTC
[Nut-upsdev] patch for support Liebert GXT2 ESP2 protocol
Citeren Richard Gregory <R.Gregory op liverpool.ac.uk>:> Attached is a patch against nut-2.4.1 that adds a driver for the ESP2 > protocol, as used by the serial port found on the Liebert GXT2.Thanks for this driver. We really appreciate this. A couple of remarks: 1) Don't patch Makefile.in files (these will be generated by autoconf) 2) Have a look at the developer documentation, especially - docs/developers.txt ('Portability', 'Indenting', 'Spaghetti') - docs/new-drivers.txt The dstate_setinfo() function takes a formatted string (there is no need for snprintf() here). Especially for experimental drivers, use lots of debugging. If people attempt to add other models and get unexpected results, we want to know what is happening. The upsdebugx() and upsdebug_with_errno() functions are your friend. Try to cut down on casting of variables. Best regards, Arjen -- Please keep list traffic on the list