I've got an N1240U/LiDE30 with the same problem as Clay above: the workaround script works for one scan, but gets the black output afterward.
For those who are able to get more than one scan, I took a page from ianrose and wrote a wrapper script that will continue to poke the scanner port as long as xsane (or the tool of your choice) is alive:
#!/bin/bash
# plustek-wrapper: finds a plustek USB device and keeps it alive while the
# wrapped program is running.
# Joel Berger <hikari (at) yumemiru (dot) org> 2007-04-15
# Requires:
# sane-utils (scanimage)
# sed
# gawk
# Detect device and store as $SANE_DEVICE
SANE_DEVICE=$( scanimage -L | \ grep plustek | \
sed 's/^.*plustek/plustek/' | \
sed "s/' is a.*//" | \
awk -F : '{print "/dev/bus/usb/" $3 "/" $4}'
)
if [ $SANE_DEVICE ] ; then
$* &
CHILD_PID=$!
while ps -p $CHILD_PID > /dev/null; do
cat $SANE_DEVICE > /dev/null
sleep 1
done
else
# If no plustek device is detected, bail out and run the program normally.
exec $*
fi
I've got an N1240U/LiDE30 with the same problem as Clay above: the workaround script works for one scan, but gets the black output afterward.
For those who are able to get more than one scan, I took a page from ianrose and wrote a wrapper script that will continue to poke the scanner port as long as xsane (or the tool of your choice) is alive:
#!/bin/bash
# plustek-wrapper: finds a plustek USB device and keeps it alive while the
# wrapped program is running.
# Joel Berger <hikari (at) yumemiru (dot) org> 2007-04-15
# Requires:
# sane-utils (scanimage)
# sed
# gawk
# Detect device and store as $SANE_DEVICE
grep plustek | \ plustek/ ' | \
SANE_DEVICE=$( scanimage -L | \
sed 's/^.*plustek/
sed "s/' is a.*//" | \
awk -F : '{print "/dev/bus/usb/" $3 "/" $4}'
)
if [ $SANE_DEVICE ] ; then
$* &
CHILD_PID=$!
while ps -p $CHILD_PID > /dev/null; do
cat $SANE_DEVICE > /dev/null
sleep 1
done
else
# If no plustek device is detected, bail out and run the program normally.
exec $*
fi