Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 3 Aug 2011 23:16:39 -0500
From:      Antonio Olivares <olivares14031@gmail.com>
To:        Warren Block <wblock@wonkity.com>
Cc:        FreeBSD Questions <freebsd-questions@freebsd.org>
Subject:   Re: help setup an HP 3300C scanner
Message-ID:  <CAJ5UdcM3TES1NJUb91X3MrtqR74A2D+RxmCF7pHrQtxg87+f1w@mail.gmail.com>
In-Reply-To: <alpine.BSF.2.00.1108032133440.15916@wonkity.com>
References:  <CAJ5UdcM6OZe48v34o68YHBZsjW41zsKaS_fdOF14jZwneCeXjw@mail.gmail.com> <CAJ5UdcNaX7CR8=rFpRbUY3BrPdB7LVbDREOVoZ1EAQ90WQPKng@mail.gmail.com> <CAJ5UdcMAjJ3TP+cwWevmotbrXL1m8BiOZ_JkGkJFyBMH_s8wnw@mail.gmail.com> <alpine.BSF.2.00.1108032133440.15916@wonkity.com>

Next in thread | Previous in thread | Raw E-Mail | Index | Archive | Help
Warren,

On Wed, Aug 3, 2011 at 10:48 PM, Warren Block <wblock@wonkity.com> wrote:
> On Wed, 3 Aug 2011, Antonio Olivares wrote:
>
>> This as root though, but as simple user cannot do much :(, again xsane
>> tells me that no devices were found :(
>>
>> Suggestions/Advice/comments are welcome and appreciated.
>
> To hit some relevant points...
>
> The uscanner device is gone, no longer needed with FreeBSD-8.
>
> devfs.conf hasn't been effective for dynamic devices for me. =A0Copying t=
he
> clever technique from sysutils/scanbuttond/pkg-message.in, I use devd.con=
f
> to detect the scanner attach and detach devices and change permissions an=
d
> do whatever else is necessary. =A0Scanner users are a member of the saned
> group.
>
> # WB
> # detect Epson Perfection 1640SU scanner and start scanbuttond
> attach 20 {
> =A0 =A0 =A0 =A0device-name "ugen[0-9].[0-9]";
> =A0 =A0 =A0 =A0match "vendor" "0x04b8";
> =A0 =A0 =A0 =A0match "product" "0x010a";
> =A0 =A0 =A0 =A0action "usb_devaddr=3D`echo $device-name | sed 's#^ugen##'=
` && \
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0chown root:saned /dev/usb/${usb_devaddr}.*=
 && \
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0chmod 0660 /dev/usb/${usb_devaddr}.* && \
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0su saned -c '/usr/local/bin/scanbuttond \
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0-s /usr/local/etc/scanbuttond/buttonpresse=
d.sh \
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0-S /usr/local/etc/scanbuttond/initscanner.=
sh \
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0-b /usr/local/lib/libscanbtnd-backend_epso=
n.so'";
> };
>
> # WB
> # remove Epson Perfection 1640SU uscanner0 link and stop scanbuttond
> detach 20 {
> =A0 =A0 =A0 =A0device-name "ugen[0-9].[0-9]";
> =A0 =A0 =A0 =A0match "vendor" "0x04b8";
> =A0 =A0 =A0 =A0match "product" "0x010a";
> =A0 =A0 =A0 =A0action "/usr/bin/pkill scanbuttond";
> };
>
>

Thank you for your message.  I have added the following:

# AAO
# detect HP ScanJet 3300C
attach 20 {
       device-name "ugen[0-9].[0-9]";
       match "vendor" "0x03f0";
       match "product" "0x0205";
       action "usb_devaddr=3D`echo $device-name | sed 's#^ugen##'` && \
               chown root:saned /dev/usb/${usb_devaddr}.* && \
               chmod 0660 /dev/usb/${usb_devaddr}.* && \
               su saned -c '/usr/local/bin/scanbuttond \
               -s /usr/local/etc/scanbuttond/buttonpressed.sh \
               -S /usr/local/etc/scanbuttond/initscanner.sh \
               -b /usr/local/lib/libscanbtnd-backend_epson.so'";
};

# AAO
# remove HP ScanJet 3300C
detach 20 {
       device-name "ugen[0-9].[0-9]";
       match "vendor" "0x03f0";
       match "product" "0x0205";
       action "/usr/bin/pkill scanbuttond";
};



to file /etc/devd.conf and xsane still tells me that I do not have any devi=
ces?

I restarted devd service
# /etc/rc.d/devd restart
and I get :

quadcore# /etc/rc.d/devd restart
devd not running?
Starting devd.
devd: devd already running, pid: 801
/etc/rc.d/devd: WARNING: failed to start devd

I have also added myself to the "saned" group:

quadcore# cat /etc/group | grep 'saned'
saned:*:194:olivares

What else do I need to do?

Thank you for your help & suggestions.

Regards,

Antonio



Want to link to this message? Use this URL: <http://docs.FreeBSD.org/cgi/mid.cgi?CAJ5UdcM3TES1NJUb91X3MrtqR74A2D+RxmCF7pHrQtxg87+f1w>