AERFX2 PC104 linux driver

From Wiki for iCub and Friends
Revision as of 14:23, 24 November 2014 by Matteo.brunettini@iit.it (talk | contribs) (Created page with "== Files required to use the driver == Apart from the driver binary, some other files are required to load and use it === firmware === /etc/fx2/fx2aex.ihx === UDEV scripts ===...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Files required to use the driver

Apart from the driver binary, some other files are required to load and use it

firmware

/etc/fx2/fx2aex.ihx

UDEV scripts

/etc/fx2/load

#!/bin/bash
exec 1>>/var/log/fx2.log
exec 2>>/var/log/fx2.log
FIRMWARE="/etc/fx2/fx2aex.ihx"
# check path
echo "$1" | grep -q '^/dev/bus/'
if [ "$?" != "0" ] ; then
  #echo "Ignoring: '$1'"
  exit 0
fi
echo 
date
echo "Trying to load: '$1', waiting for device:"
for i in `seq 100` ; do
  if [ -e "$1" ] ; then
      break
  else
      sleep 0.1
  fi
done
if ! [ -e "$1" ] ; then
  echo "Device did not apper. Aborting!"
  exit 1
fi
echo "Device exists: $1"
echo "Waiting 1s before invoking fxload..."
sleep 1
echo -n "Firmware MD5: " ; md5sum "$FIRMWARE"
/sbin/fxload -v -t fx2 -I "$FIRMWARE" -D "$1"
/etc/udev/rules.d/33-fxload.rules