So, läuft.
Man sollte die pl2303.ko der TS209 nehmen und nicht den des Standardkernels
Ich doof :thumb:
Closed
So, läuft.
Man sollte die pl2303.ko der TS209 nehmen und nicht den des Standardkernels
Ich doof :thumb:
Closed
Tach, weiter gehts.
Fange jetzt mal von vorne an. Die 109 Pro II hat von Hause aus apcupsd unter /sbin/ liegen. die apcupsd.conf unter /etc/apcupsd/, So sieht jetzt meine autorun.sh aus:
#!/bin/sh# Treibermodule installieren/sbin/insmod /mnt/ext/usr/local/misc/usbserial.ko/sbin/insmod /mnt/ext/usr/local/misc/pl2303.ko# cp /mnt/HDA_ROOT/.config/ups.conf /etc/upscp /mnt/HDA_ROOT/.config/apcupsd.conf /etc/apcupsd/apcupsd.conf /sbin/apcupsd -c -f /etc/apcupsd/apcupsd.conf
Die Konfigurationen sind unter/mnt/HDA_ROOT/.config gsichert.
Starte ich die apcupsd kommt diese Meldung
[/var] # apcupsd -b -f /etc/apcupsd/apcupsd.conf apcupsd FATAL ERROR in smartsetup.c at line 177PANIC! Cannot communicate with UPS via serial port.Please make sure the port specified on the DEVICE directive is correct,and that your cable specification on the UPSCABLE directive is correct.
Die apcupsd.conf sieht so aus:
## apcupsd.conf v1.1 ##
#
# for apcupsd release 3.10.6 (12 September 2003) - redhat
#
# "apcupsd" POSIX config file
#
# ========= General configuration parameters ============
#
# UPSNAME xxx
# Use this to give your UPS a name in log files and such. This
# is particulary useful if you have multiple UPSes. This does not
# set the EEPROM.
#UPSNAME
#
# UPSCABLE [ simple | smart |
# 940-00(20B,20C,23A,24B,24C,24G,95A,95B,95C) |
# 940-15(24C) |
# ether, usb ]
# defines the type of cable that you have.
UPSCABLE smart
#
# Old types, still valid, are mapped to the new generic drives
# automatically
# UPSTYPE [ backups | sharebasic | netups |
# backupspro | smartvsups |
# newbackupspro | backupspropnp |
# smartups | matrixups | sharesmart ]
#
# *** NEW TYPES FOR GENERIC DRIVERS ***
# UPSTYPE [ dumb | apcsmart | net | usb | snmp | test]
# defines the type of UPS you have.
UPSTYPE apcsmart
#
#
#DEVICE <string> /dev/<serial port>
# name of your UPS device
#
# Here a table of the possible devices related with the UPS drivers.
#
# NOTE!!! for USB devices, please use a form indicated below
# including the [0-15] as written!
#
# Driver Device Description
# dumb /dev/tty** Serial character device
# apcsmart /dev/tty** Serial character device
# usb /dev/usb/hid/hiddev[0-15] If you follow our naming scheme
# usb /dev/usb/hiddev[0-15] On some systems
# net hostname:port Network link to a master apcupsd
# through NIS
# snmp hostname:port:vendor:community
# SNMP Network link to an SNMP-enabled
# UPS device. Vendor is the MIB used by
# the UPS device: can be "APC" or "RFC"
# where APC is the powernet MIB and RFC
# is the IETF's rfc1628 UPS-MIB.
# Port is usually 161.
DEVICE /dev/usb/ttyUSB0
#
#LOCKFILE <path to lockfile>
# path for serial port lock file
LOCKFILE /var/lock
#
Alles anzeigen
Auf dem Notebook mit Ubuntu 11.04 läuft es ohne zu meckern, auf der Qnap nicht .
Die usbserial.ko und pl2303.ko tauschen brachte nichts, ein verzweifelter Versuch eben . Werde die apcupsd nochmal aktualisieren. mal sehen.
Hat jemand eine Idee?
Weiter gehts.
Habe die Störenfriede POLLTIME, SCRIPTDIR, PWRFAILDIR und NOLOGINDIR erstmal rauskommentiert, um zu sehen was noch stört. Zudem war der Pfad vom device falsch. Es sollte heissen:
Starte ich die apcupsd kommt folgendes:
[~] # apcupsd FATAL ERROR in smartsetup.c at line 184PANIC! Cannot communicate with UPS via serial port.Please make sure the port specified on the DEVICE directive is correct,and that your cable specification on the UPSCABLE directive is correct.
Wie kann ich sehen, ob der USB-Adapter funktioniert? Lt dmesg wird er geladen. Oder liegt es an der Datenrate?
Mit dem Notebook läuft es mit der obrigen Konfiguration super, ohne etwas rauszukommenieren.
Nebenbei versuchte ich, alles über die Qnap per upsd zum laufen zu kriegen. Dank dieser Anleitung:
Re: Vorschläge zu IP Kameras & USV von Qnap erbeten
Beitragvon kasimodo » Mo 1. Feb 2010, 13:55
.
Vorschlag APC USV Unterstützung only RS232 -> RS232 to USB Adapter
Beispiel Gerät:
APC Smart-UPS 700VA 230V - http://www.apc.com/resource/include/techspec_index.cfm?base_sku=SU700INET
Geräteserie APC Smart-UPS die nur eine RS232 Schittstelle haben können über einen RS232toUSB Adapter unterstützt werden.
Kann leicht umgesetzt werden, da fast alles schon in der Firmware enthalten ist!
Voraussetzung dafür, die fehlenden Kernelmodule für den Adapter noch in die Firmware einbinden:
usbserial.ko
ftdi_sio.ko
pl2303..ko
Die Firmware bietet schon in der jetzigen Form die Unterstützung der APCUSV durch ntpd upsd oder apcupsd!
Für die Umsetzung über ntpd upsd wird noch der fehlende Treiber "apcsmart" zur Unterstützung der seriel angeschlossenen USV benötigt!
Die Anpassung der "/etc/ups/ups.conf" und die Auswahl "Anschluß über RS232toUSB" noch im Menu einbauen und fast fertig!(Bitte an Qnap: dabei gleich die "kleinen" Fehler im Startscript beseitigen! ;) )
Beispiel "/etc/ups/ups.conf" für APC-Smart-Ups an RS232 Adapter
Code: Alles auswählen
[qnapups]
driver=apcsmart
port = /dev/usb/ttyUSB0
cable = 940-0024C
desc = "Workstation"
pollinterval=1
Danke und Gruß
Gernot
Alles anzeigen
Danke an Gernod
Aber es läuft nicht. Muß ich die ttyUSB0 irgendwie einstellen?
Gruß
Hallo,
bin seit Tagen verzweifelt am basteln und verliere langsam die Lust. Linuxkentnisse sind mittelmässig, vieles wurden in div. Foren erlesen. Der NAS soll über einen PL2303 USB-Seriell Adapter mit einer APC Smart-UPS SC 450VA, der nur ein seriellen Anschluß hat, per apcupsd kommunizieren. Treiber sind eingebunden:
dmesg Auszug:
usbcore: registered new driver usbserialdrivers/usb/serial/usb-serial.c: USB Serial support registered for Genericusbcore: registered new driver usbserial_genericdrivers/usb/serial/usb-serial.c: USB Serial Driver core v2.0drivers/usb/serial/usb-serial.c: USB Serial support registered for PL-2303pl2303 2-1.3:1.0: PL-2303 converter detectedusb 2-1.3: PL-2303 converter now attached to ttyUSB0usbcore: registered new driver pl2303drivers/usb/serial/pl2303.c: Prolific PL2303 USB to serial adaptor driver v0.12rule type=2, num=0
Hier meine autorun.sh, sie liegt unter /share/HDA_DATA/.qpkg/autorun/autorun.sh:
#!/bin/shinsmod /share/HDA_DATA/.qpkg/Optware/lib/modules/usbserial.koinsmod /share/HDA_DATA/.qpkg/Optware/lib/modules/pl2303.kocp /share/HDA_DATA/.qpkg/Optware/etc/apcupsd/apcupsd.conf /etc/apcupsd/apcupsd.conf/sbin/apcupsd -f /etc/apcupsd/apcupsd.conf
Starte ich die autorun.sh kommt diese Meldung:
POLLTIMEParsing error at line 85 of config file /etc/apcupsd/apcupsd.conf.SCRIPTDIRParsing error at line 93 of config file /etc/apcupsd/apcupsd.conf.PWRFAILDIRParsing error at line 100 of config file /etc/apcupsd/apcupsd.conf.NOLOGINDIRParsing error at line 105 of config file /etc/apcupsd/apcupsd.conf.Terminating due to configuration file errors.
Hier die apcupsd.conf:
UPSCABLE smartUPSTYPE apcsmartDEVICE /dev/ttyUSB0POLLTIME 60LOCKFILE /var/lockSCRIPTDIR /opt/etc/apcupsdPWRFAILDIR /opt/etc/apcupsdNOLOGINDIR /opt/etc/apcupsd
unter /opt/etc/apcupsd/ ist vorhanden:
drwxr-xr-x 2 admin administ 4096 Jun 22 17:22 ./
drwxr-xr-x 4 admin administ 4096 Jun 20 21:38 ../
-rwxr--r-- 1 admin administ 3931 Nov 29 2010 apccontrol*
-rw-r--r-- 1 admin administ 12248 Jun 22 17:46 apcupsd.conf
-rw-r--r-- 1 admin administ 12242 Jun 22 17:22 apcupsd1.conf
-rwxr--r-- 1 admin administ 459 Nov 29 2010 changeme*
-rwxr--r-- 1 admin administ 486 Nov 29 2010 commfailure*
-rwxr--r-- 1 admin administ 487 Nov 29 2010 commok*
-rw-r--r-- 1 admin administ 662 Nov 29 2010 hosts.conf
-rw-r--r-- 1 admin administ 2344 Nov 29 2010 multimon.conf
-rwxr--r-- 1 admin administ 454 Nov 29 2010 offbattery*
-rwxr--r-- 1 admin administ 419 Nov 29 2010 onbattery*
Alles anzeigen
Stimmen die Pfade nicht? Wer weiß Rat?
Danke schonmal.
Estela
Keiner eine Idee?
Morgen,
habe die USV über die Web Management Card APC9606 soweit konfiguriert, daß die TS runterfährt oder in den Standby geht. Was nicht funktioniert ist die Angabe der Kapazität und der Schutzzeit. Kann die Hardware das nicht oder gibt es einen Trick dafür?
IP der TS sind für Webmanagement und SNMP in der USV eingetragen.
Gruß,
Morgem.
habe hier 109 Pro II mit Samba laufen. Nur sind einige Dateien unter Windows XP mit den Atrributen HSA vermerkt. Wie kann ich das unter Samba ändern?
MfG, Estela
EDIT:
Hab es gefunden, mit dem Befehl:
chmod -R -x+X konnte ich die ganzen Win Attribute zurücksetzen.
Gruß, Estela
Und, woran lag es?