Eric S. Raymond wrote: > > Peter Selinger <[EMAIL PROTECTED]>: > > One potential problem is that you are passing the parameters > > vendorid=0665 and subdriver=agiler when you start the driver manually, > > but you are passing no such parameters to upsdrvctl. You can put them > > into your ups.conf: > > > > [myups] > > driver = megatec_usb > > port = auto > > vendorid = 0665 > > subdriver = agiler > > Ah, now that seemed to do the trick. > > ---------------------------- snip ----------------------------------------- > [EMAIL PROTECTED]:/home/esr/svn/nut/trunk# upsdrvctl start myups > Network UPS Tools - UPS driver controller 2.1.0 > Network UPS Tools 2.1.0 - Megatec protocol driver 1.5.3 [megatec_usb] > Carlos Rodrigues (c) 2003-2007 > > Serial-over-USB transport layer for Megatec protocol driver [megatec_usb] > > Megatec protocol UPS detected. > ---------------------------- snip ----------------------------------------- > > Then it went into background. I was able to go through the rest of the > steps in your installation procedure, getting the expected. > > As I said, I'm not just here to solve my problem, I want to make > things easier for other in the future. What more general lesson can > we draw from this? What should be added to the installation > instructions? > > > This is another potential problem. Why did the driver exit here? Did > > you press Ctrl-C, or did it fail by itself? > > I interrupted it. Otherwise, looks like the driver would have looped > forever returning status info. > > > > Driver failed to start (exit status=1) > > > > Indeed, the message is not very helpful. The reason is that it doesn't > > happen very often, so nobody has yet cared to improve the output. > > Let's think about it now. We have a well-defined path to the error -- all > I have to do is delete those two lines in my ups.conf. What can be done > in the code to make it emit a message that isn't a blank stone wall? Or, > to put it another way, what can we do so that the users list will never > have to hear this question again?
Well, the actual driver should print some message at debug level 0 before croaking. Like "I didn't recognize this UPS; please try specifying the vendorid and/or subdriver parameters". I don't think it can be handled by upsdrvctl itself, as it can't know why some particular driver fails. The bad news is that it has to be done in each driver separately. Alexander, can you do that? Some other drivers, like newhidups, already do such a thing; see e.g. drivers/belkin-hid.c:404-408. -- Peter _______________________________________________ Nut-upsuser mailing list [email protected] http://lists.alioth.debian.org/mailman/listinfo/nut-upsuser

