[sane-devel] Interested in writing a driver for...

m. allan noah anoah@pfeiffer.edu
Tue, 13 Apr 2004 12:48:33 -0400 (EDT)


  This message is in MIME format.  The first part should be readable text,
  while the remaining parts are likely unreadable without MIME-aware tools.
  Send mail to mime@docserver.cac.washington.edu for more info.

--1386611826-1974767226-1081874913=:26184
Content-Type: TEXT/PLAIN; charset=US-ASCII

search the archives of this mailing list. this topic gets discussed quite 
a bit. basically, you install a usb packet sniffer on windows machine, and 
do some string of simple operations in the windows software, like:

1. plug and un-plug device

2. plug device and take the smallest, lowest quality pic you can

3. plug device and change some setting in windows software, and take 
another pic, then another setting, another pic, etc.

then, copy the resulting sniffer log to your linux/unix box, and shred it 
for readability. (if using benoit's usbsnooper, (which i recommend) the 
attached script i wrote works well)

then, stare at the data, and see what patterns you can recognize.

then, write a small c program that uses libusb to send packets to the 
device in linux, one packet at a time, and see what happens.

if you dont burn the device up in the process :) you will end up with 
enough understanding of how it communicates to then look at writing a sane 
backend.

allan

On Mon, 12 Apr 2004, Greg Apessos wrote:

> my Ezonics EZCam USB III webcam.  What got me interested was finding a
> reference to the EZCam USB II not being supported on the sane-project's
> site, http://www.sane-project.org/unsupported/biolux-654.html.  While
> it isn't a scanner, maybe my work could be useful to someone else.  But
> the difficulty is I don't know how to approach the problem.
> 
> >From the little bits that I've gleamed, I monitor the communication with
> the camera on Windows, and get an idea of how messages are sent to it.
> >From that I start to build something useful.
> 
> Are there guides, tutorials, something that could be helpful?  I don't
> necessarily need step-by-step instructions, just an outline like, program
> X will capture the communication with the camera, library Y can be used to
> communicate with the webcam under Linux, etc.
> 
> Any help in the right direction would be great.
> 
> -Greg
> 
> 

-- 
"so don't tell us it can't be done, putting down what you don't know.
money isn't our god, integrity will free our souls" - Max Cavalera

--1386611826-1974767226-1081874913=:26184
Content-Type: TEXT/PLAIN; charset=US-ASCII; name="spike4.pl"
Content-Transfer-Encoding: BASE64
Content-ID: <Pine.LNX.4.44.0404131248330.26184@thanatos.pfeiffer.edu>
Content-Description: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iIG1zXG5cbiI7DQogICAgICAgIH0N
CiAgICAgICAgZWxzaWYgKCAkbGluZSA9fiBtL1VTQkRfVFJBTlNGRVJfRElS
RUNUSU9OX0lOLyApIHsNCiAgICAgICAgICAkZGlyPSdpbic7DQogICAgICAg
ICAgJGRhdGE9KCk7DQogICAgICAgIH0NCiAgICAgICAgZWxzaWYgKCAkbGlu
ZSA9fiBtLy0tIFVSQl9GVU5DVElPTl9CVUxLX09SX0lOVEVSUlVQVF9UUkFO
U0ZFUi8gKSB7DQogICAgICAgICAgJHR5cGU9J0InOw0KICAgICAgICB9DQog
ICAgICAgIGVsc2lmKCAkbGluZSA9fiBtL1BpcGVIYW5kbGUuKmVuZHBvaW50
ICgweFxkKykvKXsNCiAgICAgICAgICAkZXA9JDE7DQogICAgICAgIH0NCiAg
ICAgICAgZWxzaWYgKCAkbGluZSA9fiBtIC8gIChbMC05YS1mXXs4fTogKShb
MC05YS1mIF0qKS8gKSB7DQogICAgICAgICAgcHVzaChAeyRkYXRhfSwgJDEg
LiAkMik7DQogICAgICAgIH0NCg0KICAgICAgICBpZiAoICRsaW5lID1+IG0v
XFsoXGQrKSBtc1xdLyApew0KICAgICAgICAgICRsVGltZT0kMTsNCiAgICAg
ICAgfQ0KDQogICAgICAgICRlcD1+cy9eMHgwKy8vOw0KICAgIH0NCg0KICAg
IGlmKCRkaXIgZXEgJ2luJyl7DQogICAgICAgIHByaW50ICJVcmIgJHVyYiAo
JHR5cGUpIGVwPSRlcCAocmVhZCkgIjsNCiAgICB9DQogICAgZWxzZXsNCiAg
ICAgICAgcHJpbnQgIlVyYiAkdXJiICgkdHlwZSkgZXA9JGVwICh3cml0ZSkg
IjsNCiAgICB9DQogICAgcHJpbnQgJGxUaW1lLSRmVGltZSAuICIgbXNcbiI7
DQoNCiAgICBmb3JlYWNoIG15ICRsaW5lIChAeyRkYXRhfSkgew0KICAgICAg
ICAgICAgcHJpbnRmKCIgJXMiLCAkbGluZSk7DQogICAgICAgICAgICBwcmlu
dCAiXG4iOw0KICAgIH0NCg0KICAgICRsYXN0VXJiTFRpbWU9JGxUaW1lOw0K
DQp9DQoNCmV4aXQgMDsNCg==
--1386611826-1974767226-1081874913=:26184--