Hi there, been using NUT for ages and recently upgraded to a new server; while I'm waiting for a USB->Serial adapter for Solaris to arrive, I thought I'd play with the newhidups, as the APC UPS I have has a USB port and the new server doesn't have a serial port.... I've got Solaris 10 & newhidups working with the ugen driver up to a point, and that is a read overrun while probing the UPS itself. It seems this has been spotted before and there was a post back in February about problems reading UPS information from an APC UPS. Is there any progress on this issue ? I had to make some simple updates to get newhidups to compile on Solaris; is anyone interested in getting these rolled into NUT and for a text document on how to configure nut/newhidups/Solaris 10 ? Many regards marty ----- Marty Lee e: marty@upstart-solutions.co.uk Technical Director v: +44 131 476 3775 Upstart Solutions Ltd f: +44 871 433 8922 Scotland, UK w: http://www.upstart-solutions.co.uk
Hello Marty, 2006/3/6, Marty Lee <marty@upstart-solutions.co.uk>:> > Hi there, > > been using NUT for ages and recently upgraded to a new server; while > I'm waiting > for a USB->Serial adapter for Solaris to arrive, I thought I'd play > with the > newhidups, as the APC UPS I have has a USB port and the new server > doesn't have > a serial port.... > > I've got Solaris 10 & newhidups working with the ugen driver up to a > point, > and that is a read overrun while probing the UPS itself. It seems > this has been > spotted before and there was a post back in February about problems > reading UPS > information from an APC UPS. > > Is there any progress on this issue ? > > I had to make some simple updates to get newhidups to compile on > Solaris; is > anyone interested in getting these rolled into NUT and for a text > document on > how to configure nut/newhidups/Solaris 10 ?I didn't had much time to continue on this point, so yes, any (verbose) feedback is welcome... Arnaud -- Linux / Unix Expert - MGE UPS SYSTEMS - R&D Dpt Network UPS Tools (NUT) Project Leader - http://www.networkupstools.org/ Debian Developer - http://people.debian.org/~aquette/ OpenSource Developer - http://arnaud.quette.free.fr/
Marty Lee wrote:> > > Hi there, > > been using NUT for ages and recently upgraded to a new server; while > I'm waiting > for a USB->Serial adapter for Solaris to arrive, I thought I'd play > with the > newhidups, as the APC UPS I have has a USB port and the new server > doesn't have > a serial port.... > > I've got Solaris 10 & newhidups working with the ugen driver up to a > point, > and that is a read overrun while probing the UPS itself. It seems > this has been > spotted before and there was a post back in February about problems > reading UPS > information from an APC UPS. > > Is there any progress on this issue ?I assume you are referring to the problem where the UPS announces the wrong length for its report descriptor (but lsusb reads the correct length). I know the cause of this problem and how to fix it, but I am away from my hardware (travelling) until the end of March, so I cannot seriously work on fixing this bug until I am back.> I had to make some simple updates to get newhidups to compile on > Solaris; is > anyone interested in getting these rolled into NUT and for a text > document on > how to configure nut/newhidups/Solaris 10 ?Yes, please! -- Peter
I just realised that Marty sent it privately... ---------- Forwarded message ---------- From: Marty Lee <marty@upstart-solutions.co.uk> Date: 7 mars 2006 10:49 Subject: Re: [Nut-upsdev] newhidups / Solaris 10 / APC RM1500 To: Arnaud Quette <aquette.dev@gmail.com> Arnaud,>> I had to make some simple updates to get newhidups to compile on >> Solaris; is >> anyone interested in getting these rolled into NUT and for a text >> document on >> how to configure nut/newhidups/Solaris 10 ? > > I didn't had much time to continue on this point, so yes, any > (verbose) feedback is welcome... > > ArnaudTo get NUT 2.0.3 to compile on Solaris 10, I needed to do the following: 1. u_int16_t is not defined in the build environment and libusb.h uses uint_16_t too. I've added the following to libhid.h #ifndef u_int16_t typedef uint16_t u_int16_t; #endif #ifndef u_int8_t typedef uint8_t u_int8_t; #endif 2. 'nanosleep' is in the 'rt' library, so I had to set up LDFLAGS in drivers/Makefile to include '-lrt' - this is obviously itching for a 'configure' test to make sure that nanosleep is found somewhere appropriate 3. On Solaris 10, the libusb stuff is in /usr/sfw by default, and configure finds it ok. It doesn't add a -R/usr/sfw/lib, so at run time, the libraries are no longer found. By setting 'LIBUSB_LIBS = -R/usr/sfw/lib -L/usr/sfw/lib' in drivers/Makedile things worked fine. Again, something that could be added to configure as a Solaris specific. 4. I had to add extra Makefile targes to drivers/Makefile, to ensure things got compiled with the correct library flags: mge-hid.o: $(CC) $(CFLAGS) $(LIBUSB_CFLAGS) -c mge-hid.c apc-hid.o: $(CC) $(CFLAGS) $(LIBUSB_CFLAGS) -c apc-hid.c belkin-hid.o: $(CC) $(CFLAGS) $(LIBUSB_CFLAGS) -c belkin-hid.c Hope this helps; if there are any 'test' builds available, let me know how to find them and I'll check things work ok. I've downloaded the CVS version, and from what I can tell, things seem the same as 2.0.3 Many regards marty -- Marty Lee e: marty@upstart-solutions.co.uk Technical Director v: +44 131 476 3775 Upstart Solutions Ltd f: +44 871 433 8922 Scotland, UK w: http://www.upstart-solutions.co.uk -- Linux / Unix Expert - MGE UPS SYSTEMS - R&D Dpt Network UPS Tools (NUT) Project Leader - http://www.networkupstools.org/ Debian Developer - http://people.debian.org/~aquette/ OpenSource Developer - http://arnaud.quette.free.fr/