[nut-Feature Requests][304329] Drivers: add a " -p" probe parameter

nut-featurerequests at alioth.debian.org nut-featurerequests at alioth.debian.org
Thu Jan 11 19:39:57 CET 2007


Feature Requests item #304329, was opened at 2007-01-11 05:11
Status: Open
Priority: 3
Submitted By: Arnaud Quette (aquette)
Assigned to: Nobody (None)
>Summary: Drivers: add a "-p" probe parameter 
Group: None
Category: None


Initial Comment:
having a "-p" parameter to probe for device, and exit upon completion would be a good thing for applications such as MGE PSP for autodetecting local UPS.

Ie, calling "usbhid-ups -p auto" would return
Detected a UPS: MGE UPS SYSTEMS/Evolution on bus ...
or No UPS detected.

Some notes:
- the output need to be standardized to be usable by external apps,
- the driver exits after having printed the above message, so after the first call to upsdrv_updateinfo() in drivers/main.c,
- the output message can be handled in drivers/main.c
- the MGE PSP currently rip the driver code (from usbhid-ups, mge-shut and mge-utalk) to do the device autodetection. This is obviously sub optimal and is in NUT scope, rather than application scope. 


----------------------------------------------------------------------

>Comment By: Peter Selinger (selinger-guest)
Date: 2007-01-11 14:39

Message:
This is more or less what the -x explore option does, except
it does not exit after the driver detection stage. (However,
it would be easy for a wrapper script to just terminate the
process after say 2 seconds). 

The output is not quite as you describe, but the relevant
information can be found by "grep". 

Keep in mind that by adding the option to usbhid-ups, you
will only detect devices that are supported by that driver.
Presumably these are different than the devices supported by
mge-shut and mge-utalk. 

-- Peter

----------------------------------------------------------------------

You can respond by visiting: 
http://alioth.debian.org/tracker/?func=detail&atid=411545&aid=304329&group_id=30602



More information about the NUT-tracker mailing list