Kobil Kann Pro/Ser, libchipcard und HBCI

Install/Conf. Probleme, chipcardd2 startet 2x

 
Neuling
Avatar
Geschlecht: keine Angabe
Beiträge: 1
Dabei seit: 10 / 2006
Betreff:

Kobil Kann Pro/Ser, libchipcard und HBCI

 · 
Gepostet: 03.10.2006 - 10:58 Uhr  ·  #1
Hi,

ich hoffe mal, dass ich libchipcard korrekt auf mein Debian/etch installiert habe, u.a.:

aqbanking-tool 2.2.0-1
libaqbanking-data 2.2.0-1
libaqbanking-plugins-libgwenhywfar38 2.2.0-1
libaqbanking16 2.2.0-1
libchipcard2-0c2 2.1.7-2
libchipcard2-data 2.1.7-2
libchipcard2-libgwenhywfar38-plugins 2.1.7-2
libchipcard2-tools 2.1.7-2

Nach dem start:

$ /etc/init.d/libchipcard2-tools start

habe ich 2 damons zu laufen:
Code

$  ps aux|grep  ^chipcard
chipcard  2744  0.0  0.0   6820   744 pts/2    S    09:46   0:00 /usr/sbin/chipcardd2 --pidfile /var/run/chipcard2/chipcardd2.pid --logfile /var/log/chipcard2/chipcardd2.log --logtype file --loglevel debug --exit-on-error
chipcard  2745  0.0  0.2   7740  2360 pts/2    S    09:46   0:00 /usr/sbin/chipcardd2 --pidfile /var/run/chipcard2/chipcardd2.pid --logfile /var/log/chipcard2/chipcardd2.log --logtype file --loglevel debug --exit-on-error


mit

Code

$ cat /var/run/chipcard2/chipcardd2.pid
2744


$ chipcard-tool check
gibt eine Menge Fehler aus, anscheinend einen protokollmitschnitt. gestern Abend hatte ich es zumindest soweit (mit ps & kill etc.), dass er etwas sinnvolles ausgibt; auch war der Treiber geladen. Aber das war eben gestern Abend ...

Hier das init-script:

Code

PATH=/sbin:/bin:/usr/sbin:/usr/bin
DAEMON=/usr/sbin/chipcardd2
PIDFILE=/var/run/chipcard2/chipcardd2.pid
LOGGING="--logfile /var/log/chipcard2/chipcardd2.log --logtype file --loglevel debug"
#DAEMON_ARGS="--pidfile $PIDFILE --exit-on-error"
DAEMON_ARGS="--pidfile $PIDFILE $LOGGING --exit-on-error"
NAME=chipcardd2
DESC="libchipcard2 daemon"

test -x $DAEMON || exit 0

set -e

check_var_run() {
  if [ ! -d /var/run/chipcard2 ] ; then
    mkdir -p /var/run/chipcard2
    chown chipcard /var/run/chipcard2
  fi
}

case "$1" in
  start)
  echo -n "Starting $DESC: "
  check_var_run
  start-stop-daemon --start --quiet --pidfile $PIDFILE \
    --user chipcard --chuid chipcard \
    --exec $DAEMON -- $DAEMON_ARGS
  echo "$NAME."
  ;;
  stop)
  echo -n "Stopping $DESC: "
  start-stop-daemon --oknodo --stop --quiet --pidfile $PIDFILE \
    --user chipcard --exec $DAEMON
  echo "$NAME."
  ;;
  reload)
  echo "Reloading $DESC configuration files."
  start-stop-daemon --stop --signal 1 --quiet --pidfile \
    $PIDFILE --exec $DAEMON
  ;;
  restart|force-reload)
  echo -n "Restarting $DESC: "
  start-stop-daemon --oknodo --stop --quiet --pidfile $PIDFILE \
    --user chipcard --exec $DAEMON
  sleep 1
  check_var_run
  start-stop-daemon --start --quiet --pidfile $PIDFILE \
    --user chipcard --chuid chipcard --exec $DAEMON -- $DAEMON_ARGS
  echo "$NAME."
  ;;
  *)
  N=$0
  echo "Usage: $N {start|stop|restart|reload|force-reload}" >&2
  exit 1
  ;;
esac

exit 0


und /etc/chipcard2-server/chipcardd2.conf angepasst aus dem Examples:
Code

# if this is "0" then the server won't start
enabled="1"


# ===========================================================================
# Server Sockets
#
# These sections describe server points. You may use multiple of those
# sections (in that case the daemon will listen on multiple sockets).
# Please choose one of the sections below by removing the ".inactive" suffix.


# ---------------------------------------------------------------------------
# local server, using Unix Domain Sockets which can only be
# connected from the very same machine. This is the preferred mode on 
# *nix systems (like Linux, *BSD etc, but not on Windows which does not
# support Unix Domain sockets).
#
server {
  typ="local"                 
  addr="/var/run/chipcard2/chipcardd2.sock"
  
  #
  # The default is ti use the first server section as the address to expect
  # drivers to connect to. If there are multiple addresses the server is to
  # bind to than the following selects the server to use for drivers.
  #
  int useForDrivers="1"
  
  #
  # The same as above, except for services.
  #
  int useForServices="1"
} # server


# ---------------------------------------------------------------------------
# public server using TCP sockets (not encrypted, you should not
# use such a server with the chipcard daemon)
#
server.inactive {
  typ="public"
  addr="127.0.0.1"
  port="55555"
} # server


# ---------------------------------------------------------------------------
# private server using SSL secured sockets.
# New certificates are stored in the folder given by "newcertdir",
# received certificates are checked against those in "certdir"
# This is the recommended mode on systems which can't use "local" (e.g.
# Windows).
#
server.inactive {
  typ="private"
  addr="127.0.0.1"
  port="55555"
  certdir="/etc/chipcard2-server/certificates/valid"
  newcertdir="/var/lib/chipcard2-server/certificates/new"
  certfile="/etc/chipcard2-server/cert.pem"
} # server


# ---------------------------------------------------------------------------
# secure server using SSL secured sockets. In addition to mode
# "private" the certificates of the clients are checked against
# those stored in the "certdir". If the client certificate could
# not be found or is invalid the connection is aborted.
#
server.inactive {
  typ="secure"
  addr="127.0.0.1"
  port="55555"
  certdir="/etc/chipcard2-server/certificates/valid"
  newcertdir="/var/lib/chipcard2-server/certificates/new"
  certfile="/etc/chipcard2-server/cert.pem"
} # server

#
# this section describes some basic configuration variables.
# For any missing variable a reasonable default value is used
#



# ===========================================================================
# Paths
#
# Starting with version 1.9.16 Libchipcard2 no longer depends on hardcoded
# paths. Instead on Windows the Registry is consulted and this group.
# This group here takes precedence, so if present all paths are taken from 
# here.
#

Paths {

#  char ServiceExecDir=""
#  char DataDir=""
#  char NewCertDir=""
#  char TrustedCertDir=""
#  char LogDir=""

} # Paths




# ===========================================================================
# Remote Drivers
#
# Remote drivers are used with thin clients: In such a configuration there
# is a central chipcard daemon to which the card readers of all thin clients
# connect. This is going to be used by Gnumed.
#

# if 0 then remote drivers are not allowed to connect to the server 
# default: "0"
#
allowRemote="0"



# ===========================================================================
# Device Manager
#
# This group contains all data for the Device Manager. The Device Manager
# handles the allocation and management of the reader devices.
#

DeviceManager {

  # -------------------------------------------------------------------------
  # Autoconfiguration
  #
  
  #
  # if "1" then autoconfiguration (via USB scanning) is disabled
  # For autoconfiguration to work libchipcard2-server must be linked against
  # libUSB. This is automatically done if libusb is available at compile time.
  #
  int disableAutoConf="1"
  
  #
  # if "1" then scanning for PCI devices is disabled.
  #
  int disablePciScan="1"
  
  #
  # if "1" then scanning for raw USB devices is disabled.
  #
  int disableUsbRawScan="1"
  
  #
  # if "1" then scanning for raw USB serial devices (/dev/ttyUSBx) is disabled.
  #
  int disableUsbTtyScan="1"
  
  
  #
  # minimum time in seconds which has to elapse between two hardware scans
  # A value of "0" makes the chipcard daemon only scan once (thus allowing
  # only initial setup of already connected readers)
  #
  int hardwareScanInterval="2"

  #
  # driver blacklisting (drivers in this list are ignored)
  #
  #char driverBlackList="ccid_ifd"

  # -------------------------------------------------------------------------
  # Timout Values
  #

  #
  # time to wait until the driver is actually started
  #
  int driverStartDelay="0"
  
  #
  # timeout when starting a driver (in seconds)
  #
  int driverStartTimeout="10"

  #
  # timeout when restarting a driver after an error (in seconds)
  #
  int driverRestartTime="10"
  
  #
  # timeout when starting a reader (including driverStartTimeout, in seconds)
  #
  int readerStartTimeout="20"
  
  #
  # time after which a driver is shut down when idle (in seconds)
  #
  int driverIdleTimeout="10"

  #
  # time to wait until the reader is actually started
  #
  int readerStartDelay="1"
  
  #
  # time after which a reader is shut down when idle (in seconds)
  #
  int readerIdleTimeout="10"
  
  #
  # maximum execution time for a command (in seconds)
  #
  readerCommandTimeout="60"

  #
  # timeout when restarting a reader after an error (in seconds)
  #
  int readerRestartTime="10"


  # -------------------------------------------------------------------------
  # Drivers
  #
  # A driver section contains information about a driver and the readers
  # supported by this driver.
  #
  # Please note that you only need driver sections for serial readers (i.e.
  # readers which are connected to COM1-COMx). USB readers are autodetected.
  #
  # If you have an USB reader which is not recognized by Libchipcard you 
  # really should drop an email to martin@libchipcard.de containing the output
  # of the command "lsusb" and the following extra information:
  # - path and name of the driver
  # - location from where you downloaded the driver
  # - name of the card reader
  # That would allow me to add the driver to the list and hence to support
  # this card reader.
  #
  # However, if autoconfiguration is disabled (either by config file, see 
  # above or because libUSB is not available) you need a driver section and 
  # reader sections therein for every reader you want to use.
  #
  # To activate one of the examples below remove the ".inactive" suffix
  # (driver.inactive -> driver)
  
  
  # -------------------------------------------------------------------------
  # driver section for a Kobil Kaan Professional (serial)
  #
  # remove the ".inactive" of this group's name to enable the driver
  #

  driver {
    # the general type of the driver
    # Currently available are these:
    # - ctapi (for CTAPI type drivers)
    # - ifd (for lowlevel drivers written for PC/SC)
    # - ifdold (for lowlevel drivers written for old PC/SC)
    #
    char driverType="ctapi"
    
    # This name should not be modified, since this is the name used to lookup
    # the format of card commands in the cards XML files
    #
    char driverName="kobil_ctapi"
    
    # currently not used by the written drivers, but this is sent to the 
    # driver as a command line argument. New drivers might use this one.
    #
    #char driverDataDir="/var/lib/chipcard2/drivers/ctapi"
    char driverDataDir="/etc/chipcard2-server/drivers/kobil_ctapi"

    # path and name of the low-level driver file. This is the driver actually
    # provided by the manufacturer of the card reader
    #
    char libraryFile="/usr/lib/chipcard2-server/lowlevel/libct.so"

    # -----------------------------------------------------------------------
    # This is a sub-section under a driver section.
    # One driver can generally run multiple readers (as long as the same
    # libraryFile is used, i.e. all readers are of the same type).
    # However, you should only use one reader per driver, only then they are
    # all handled independantly (each driver runs in its own process)
    #

    reader {
      #
      # you should not alter this name, it is used to lookup the commands
      # special to this reader in the cards XML files
      #
      char readerType="kobilpro"
      
      #
      # reader name (send to the application and used for logging)
      #
      char readerName="Kobil1"
      
      #
      # normally each reader has one card slot. However, there are some
      # readers which have two (or might have even more). With chipcard2 the 
      # number of slots is not limited anymore.
      #
      int slots="1"
  
      #
      # needed for serial readers
      #
      char busType="serial"
      
      #
      # the meaning of the port value is completely defined by the driver:
      # - for CTAPI drivers this is the value given as CTN argument to CT_init
      # - for IFD drivers this value is given as CHANNEL in IFDHCreateChannel
      # In the case of a Kobil Kaan the value "1" stands for COM1.
      #
      int port="1"
      
      #
      # describes the capabilities of the reader (comma separated list),
      # currently available are:
      # - keypad (->reader has a built-in key pad)
      # - display (->reader has a built-in display)
      # Only add flags which are supported by your reader.
      #
      char flags="keypad","display"
    }
  }
} # DeviceManager




# ===========================================================================
# Card Manager
#
# This group contains all data for the Card Manager. The Card Manager
# handles the allocation and management of the chip cards which are inserted
# in readers.
#

CardManager {
  #
  # After this amount of seconds the reader a card is inserted in is allowed
  # to shut down.
  #
  int unusedTimeout="10"
  
  #
  # Keep a card at least this amount of seconds after it has been advertised
  # to a client.
  #
  int minimumKeepTime="20"
}



# ===========================================================================
# Service Manager
#
# This group contains all data for the Service Manager. The Service Manager
# handles the allocation and management of chipcard2 services.
#

ServiceManager {
  # -------------------------------------------------------------------------
  # Services
  #
  # A service basically is a chipcard client which is automatically started
  # by the chipcard server. It can be started on a users' demand (if a user
  # wants to use a service) or upon start of the server (if the flag 
  # "autoload" is given in the service section).


  #
  # time to wait until the service is actually started
  #
  int serviceStartDelay="0"
  
  #
  # timeout when starting a service (in seconds)
  #
  int serviceStartTimeout="10"

  #
  # timeout when restarting a service after an error (in seconds)
  #
  int serviceRestartTimeout="10"
  
  #
  # time after which a service is shut down when idle (in seconds)
  #
  int serviceIdleTimeout="10"

  
  # ---------------------------------------------------------------------------
  # Service section for German Medical Card Service
  #
  # This service is used by GnuMed to sample inserted German medical cards.
  # It is started when the chipcard server is started (due to the "autoload"
  # flag given below)
  
  service.inactive {
    char serviceType="kvks"
    char dataDir="/tmp"
    char flags="autoload" # this makes the server load this service upon
                          # its own start
  } # service
  
}


solange das wohl nicht läuft, brauche ich mit HBCI und KMyMoney wohl erst gar nicht anzufangen (da kam gestern auch eine Error Meldung beim Kontoabgleich per HBCI, aber das ist eine andere/weitere Geschichte).

Wie bekomme ich die chipcard hin? Für HBCI habe ich eine Chip-Karte und einen Pin Code; unter Startmoney 4/Win hatte es alles mal funktioniert.

Vielen Dank
Olaf
Benutzer
Avatar
Geschlecht: keine Angabe
Herkunft: Hamburg
Homepage: aqbanking.de/
Beiträge: 642
Dabei seit: 03 / 2005
Betreff:

Re: Kobil Kann Pro/Ser, libchipcard und HBCI

 · 
Gepostet: 06.10.2006 - 11:32 Uhr  ·  #2
Zitat geschrieben von olaf69

$ chipcard-tool check
gibt eine Menge Fehler aus, anscheinend einen protokollmitschnitt. gestern Abend hatte ich es zumindest soweit (mit ps & kill etc.), dass er etwas sinnvolles ausgibt; auch war der Treiber geladen. Aber das war eben gestern Abend ...


Wie sind denn die Meldungen?
Was wird in /var/log/chipcard2/drivers/.... geschrieben?

Gruss
Martin
Gewählte Zitate für Mehrfachzitierung:   0