From a8daa04445e07e23c9fb5c6d641c814ec572d446 Mon Sep 17 00:00:00 2001
From: Gerardo Di Iorio <arete74@gmail.com>
Date: Sun, 30 Jan 2011 08:43:12 +0100
Subject: [PATCH 5/8] Apcupsd enable usb connection
 Signed-off-by: Gerardo Di Iorio <arete74@gmail.com>

---
 apctest.output                    |  100 +++++++++++++++++++++++++++++++++++++
 package/base/apcupsd/apcupsd.conf |    2 +
 2 files changed, 102 insertions(+), 0 deletions(-)
 create mode 100644 apctest.output

diff --git a/apctest.output b/apctest.output
new file mode 100644
index 0000000..9dbaa54
--- /dev/null
+++ b/apctest.output
@@ -0,0 +1,100 @@
+
+
+2011-01-30 08:21:34 apctest 3.14.8 (16 January 2010) unknown
+Checking configuration ...
+apctest FATAL ERROR in apctest.c at line 278
+Apcupsd cannot continue without a valid driver.
+apctest error termination completed
+
+
+2011-01-30 08:23:39 apctest 3.14.8 (16 January 2010) unknown
+Checking configuration ...
+Attached to driver: usb
+sharenet.type = DISABLE
+cable.type = CUSTOM_SMART
+
+You are using a SMART cable type, so I'm entering SMART test mode
+mode.type = USB_UPS
+Setting up the port ...
+Hello, this is the apcupsd Cable Test program.
+This part of apctest is for testing Smart UPSes.
+Please select the function you want to perform.
+
+1) Query the UPS for all known values
+2) Perform a Battery Runtime Calibration
+3) Abort Battery Calibration
+4) Monitor Battery Calibration progress
+5) Program EEPROM
+6) Enter TTY mode communicating with UPS
+Q) Quit
+
+Select function number: 1
+
+I am going to run through the series of queries of the UPS
+that are used in initializing apcupsd.
+
+Simulating UPSlinkCheck ...
+Wrote: Y Got: 
+
+getline failed. Apparently the link is not up.
+Giving up.
+
+1) Query the UPS for all known values
+2) Perform a Battery Runtime Calibration
+3) Abort Battery Calibration
+4) Monitor Battery Calibration progress
+5) Program EEPROM
+6) Enter TTY mode communicating with UPS
+Q) Quit
+
+Select function number: 6
+
+Enter an ESC character (or ctl-[) to exit.
+
+
+1) Query the UPS for all known values
+2) Perform a Battery Runtime Calibration
+3) Abort Battery Calibration
+4) Monitor Battery Calibration progress
+5) Program EEPROM
+6) Enter TTY mode communicating with UPS
+Q) Quit
+
+Select function number: 1
+
+I am going to run through the series of queries of the UPS
+that are used in initializing apcupsd.
+
+Simulating UPSlinkCheck ...
+Wrote: Y Got: 
+
+getline failed. Apparently the link is not up.
+Giving up.
+
+1) Query the UPS for all known values
+2) Perform a Battery Runtime Calibration
+3) Abort Battery Calibration
+4) Monitor Battery Calibration progress
+5) Program EEPROM
+6) Enter TTY mode communicating with UPS
+Q) Quit
+
+Select function number: q
+
+2011-01-30 08:24:39 End apctest.
+
+
+2011-01-30 08:26:20 apctest 3.14.8 (16 January 2010) unknown
+Checking configuration ...
+Attached to driver: usb
+sharenet.type = DISABLE
+cable.type = CUSTOM_SMART
+
+You are using a SMART cable type, so I'm entering SMART test mode
+mode.type = USB_UPS
+Setting up the port ...
+apctest FATAL ERROR in device.c at line 71
+Unable to create UPS lock file.
+  If apcupsd or apctest is already running,
+  please stop it and run this program again.
+apctest error termination completed
diff --git a/package/base/apcupsd/apcupsd.conf b/package/base/apcupsd/apcupsd.conf
index 16bc719..6e05224 100644
--- a/package/base/apcupsd/apcupsd.conf
+++ b/package/base/apcupsd/apcupsd.conf
@@ -12,4 +12,6 @@
 # GNU General Public License can be found in the file COPYING.
 # --- T2-COPYRIGHT-NOTE-END ---
 
+#enable usb
+var_append confopt " " "--enable-usb"
 var_append makeopt ' ' 'LD=g++'
-- 
1.7.1

