Hi,<br> I've started modifying the hp5590 driver to work with my hp scanjet 4570c<br>I think the hp5590 is pretty close to the 4570 given the following:<br>sane-find-scanner -v -v -v<br> checking for HP5550/5590/7650 chipset ...<br>
<This USB chip looks like a HP5550/5590/7650 (result from sane-backends 1.0.19)><br><br>found USB scanner (vendor=0x03f0 [Hewlett-Packard], product=0x1305 [hp scanjet scanner], chip=HP5550/5590/7650) at libusb:001:005<br>
<br>So I've started modifying the hp5590 backend driver in an attempt to get it working:<br><br>SANE_DEBUG_HP5590=50 scanimage -L <br>sanei_debug] Setting debug level of hp5590 to 50.<br>
[hp5590] SANE backed for HP 4570/5550/5590/7650 1.0.2<br>[hp5590] (c) Ilia Sotnikov <<a href="mailto:hostcc@gmail.com">hostcc@gmail.com</a>><br>[hp5590] attach_usb_device: Opening USB device<br>[hp5590] attach_usb_device: USB device opened<br>
[hp5590] hp5590_init_scanner<br>[hp5590] hp5590_cmd: USB-in-USB: command : 0012<br>[hp5590] hp5590_control_msg: USB-in-USB: core data: no<br>[hp5590] hp5590_control_msg: USB-in-USB: sending control msg<br>[hp5590] hp5590_control_msg: USB-in-USB: checking acknowledge for control message<br>
[hp5590] hp5590_get_ack<br>[hp5590] hp5590_get_ack: USB-in-USB: accepted<br>[hp5590] hp5590_control_msg: USB-in-USB: checking if confirmation was acknowledged<br>[hp5590] hp5590_get_ack<br>[hp5590] hp5590_get_ack: USB-in-USB: accepted<br>
[hp5590] hp5590_verify_last_cmd: USB-in-USB: command verification requested<br>[hp5590] hp5590_control_msg: USB-in-USB: core data: no<br>[hp5590] hp5590_control_msg: USB-in-USB: sending control msg<br>[hp5590] hp5590_control_msg: USB-in-USB: checking acknowledge for control message<br>
[hp5590] hp5590_get_ack<br>[hp5590] hp5590_get_ack: USB-in-USB: accepted<br>[hp5590] hp5590_control_msg: USB-in-USB: checking if confirmation was acknowledged<br>[hp5590] hp5590_get_ack<br>[hp5590] hp5590_get_ack: USB-in-USB: accepted<br>
[hp5590] hp5590_verify_last_cmd: USB-in-USB: command verification 0012, last command: 0012, core status: 0000<br>[hp5590] hp5590_verify_last_cmd: USB-in-USB: command verified successfully<br>[hp5590] init_resp->id: SILITEKIElwood<br>
[hp5590] init_resp->dpi_x: 24585 <--- custom debug msgs i've put in<br>[hp5590] init_resp->dpi_y: 24585 <--- will have to find out why the dpi is wrong later<br>[hp5590] init_resp->id: SILITEKIElwood<br>
[hp5590] init_resp->dpi_x: 24585<br>[hp5590] init_resp->dpi_y: 24585<br>[hp5590] hp5590_init_scanner: Vendor id mismatch for scanner HP5550 - required 'SILITEKIPenguin', got 'SILITEKIElwood'<br>[hp5590] sane_hp5590_get_devices, local only: 0<br>
[hp5590] Found 0 devices<br><br>Now I've modified hp5590_cmds.c<br>static const struct hp5590_model<br>hp5590_models[] = {<br> {<br> SCANNER_HP4570,<br> 0x03f0, 0x1305, "SILITEKIElwood",<br> "4570", "Workgroup scanner"<br>
},<br> {<br> SCANNER_HP5550,<br> 0x03f0, 0x1205, "SILITEKIPenguin",<br> "5550", "Workgroup scanner"<br> },<br> {<br> SCANNER_HP5590,<br> 0x03f0, 0x1705, "SILITEKIPenguin",<br>
"5590", "Workgroup scanner"<br> },<br> {<br> SCANNER_HP7650,<br> 0x03f0, 0x1805, "SILITEKIArnold",<br> "7650", "Document scanner"<br> }<br>};<br><br>and modified hp5590_cmds.h<br>
enum hp_scanner_types<br>{<br> SCANNER_NONE = 0,<br> SCANNER_HP4570,<br> SCANNER_HP5550,<br> SCANNER_HP5590,<br> SCANNER_HP7650<br>};<br><br>but my debug method is really slow of building the backend after putting custom debug statements in and copying the lib out to /usr/lib64/sane then running scanimage<br>
I would really like to run it under gdb and single step into it so I can display the structures.<br>However mastering the tech of using gdb with backend drivers is something I haven't figured out yet.<br><br> Is there a standalone framework (C program linking to one of the backend drivers) that I can use to debug my driver? Or do I figure out why there are no debug symbols in my CVS copy of the sane backends I built? Google searches are failing me on how to debug this driver.... any pointers would be appreciated!<br>
-- Markham<br>