Re: Backend for BearPaw 2400

From: Henning Meier-Geinitz (hmg-ml@gmx.de)
Date: Fri Jan 19 2001 - 12:44:00 PST

  • Next message: Laurent-jan: "Re: How to Run Parallel Port Scanner as Non-Root????"

    Hi,

    On Fri, Jan 19, 2001 at 09:29:00PM +0100, Slawek Kolasinski wrote:

    > I would like to write a backend for Mustek BearPaw 2400 on USB -
    > if no one else is already working on it.

    I'm writing a backend for the Bearpaw 1200. As the Scanners are
    probably quite similar (9831 versus 9832) they can be supported by one
    backend. At the moment I can read and write registers, turn on the
    lamp, move the slider and reset the scanner. All this seems to work
    for the 2400, too, as far as I can tell from the first tests. I will
    email you more information and my code.

    Some documentation about the chip is at
    http://www.geocities.com/SiliconValley/Mouse/5403/

    > I read some docs and I also looked through some backends sources. I
    > can't understand one thing. How can I send some configuration data to
    > my scanner using only the special file /dev/usb/scanner0? I mean that
    > my scanner has 127 registers and I have to choose somehow which
    > register I want to read/write.

    For some reason this isn't explained in the documentation of the
    National Semiconductor Merlin 9831/9832 chip. At least I couldn't find
    it. It's simple (copied from my mail a few days ago:)

    You need just simple reads and writes to the /dev/usbscanner or
    whatever file.

    Byte 0: read (1) or write (0). Use incremental write/read: add 2.
    Byte 1: register number
    Byte 2: bytes to write/read MSB
    Byte 3: bytes to write/read LSB

    For a write just add the buffer you want to send (e.g. for writing to
    one register, you would have 5 bytes total). For a read, write the
    four bytes and read as many bytes as specified after that.

    > I figured out that ESCape (0x1B)
    > character has samoe special meaning because it's always sent as the
    > first byte - how does it work? Could someone answer me?

    That maybe correct for the HP scanners. For the Bearpaw 2400 and 1200
    it doesn't have a special meaning. By the way, the Bearpaw 1200F seems
    to be a completely different scanner, it uses a chip named "Mustek
    1509".

    Bye,
      Henning

    --
    Source code, list archive, and docs: http://www.mostang.com/sane/
    To unsubscribe: echo unsubscribe sane-devel | mail majordomo@mostang.com
    



    This archive was generated by hypermail 2b29 : Fri Jan 19 2001 - 13:00:16 PST