MIN-Fakultät
Fachbereich Informatik
TAMS

TAMS Robots (:emenu:)

(:emenuend:)

TAMS Organisation (:emenu:)

(:emenuend:)

IT Infrastructure (:emenu:)

(:emenuend:)

PmWiki Docs

edit SideBar

ShadowHand / Peak-netdev

Notes about driver-installation and configuration for using the Shadow-hand with the PCI-bus CAN-controller card.

Introduction

The original PC supplied by Shadow robot is very slow overall, but uses a motherboard with VIA-chipset and special EPP parallel-port modes. This is used by the driver for the proprietary Shadow parallel-port CAN-bus dongle. To improve performance and reliability, we wanted to switch our setup to a standard PCI-bus CAN-bus controller.

The CAN-bus card in question is from PEAK Systems, www.peak-system.com. Linux drivers and documentation are available from their website at http://www.peak-system.com/fileadmin/media/linux/index.htm

Documentation about the current socketcan network-device kernel stuff is on file:///usr/src/linux/Documentation/networking/can.txt

Building and driver installation:

  • download the driver. At the time of writing, latest version was 7.2
  • download the driver manual.
  • create a new empty directory, unpack the driver tar.gz archive
  • compile the driver, with netdev support enabled:
    make NET=NETDEV_SUPPORT
  • if necessary, change the file permissions so that root can read
  • sudo make install
  • check that the modules (e.g. "pcan.ko") are installed under /lib/modules/<kernel>/... and that the udev rules have been installed.
  • sudo modprobe pcan
  • sudo ifconfig can0 up (net-dev devices, no entry under /dev)
  • if necessary, check that everything works:
    dmesg
    ifconfig
    cat /proc/pcan
    ls /dev/pcan0 /dev/pcan1 (old-style char-devices)

Utilities: socketcan-utils

  • download the socketcan-utils von berlios.de:
  • the device tree contains driver, kernel-patches, docs, and utilities
  • candump utility:
    cd can-utils
    make
    ./candump can0
  • test utilities:
    cd test
    make
    ./tst-rcv-own-msgs can0

Download and setup of the Shadow software

  • see AJMs documentation at file:///informatik/isr/tams/projects/robotSW/
  • setup Linux and RTAI patch
  • download Shadow trunk from their CVS:
    cvs -d :pserver:anonymouse@shadowrobot.dyndns.org:/cvs login
    sudo cvs -z3 -d :pserver:anonymouse@shadowrobot.dyndns.org:/dvs checkout hand
  • edit /usr/sorc/hand/Config.mk and select the entries matching our configuration
    SOCKETCAN=1
    PCAN=1
  • Shadow provides a semi-automatic setup via the following script:
   -> /usr/src/hand/scripts/setup_system.sh
  • compile the Shadow software.
  • Edit /etc/robot/interface and include one (hand) or two (hand+arm) lines for the PCAN adapter:
    0 pcan_hand hand
    1 pcan_hand hand
  • Copy the template startup-script from /usr/src/hand/rc.robot.socketcan to /etc/init.d/robot and modify to match the actual configuration.

History

  • 07.07.2011 - first entries