Hi,<br>&nbsp;&nbsp; I&#39;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>&nbsp;&nbsp;&nbsp; checking for HP5550/5590/7650 chipset ...<br>
&lt;This USB chip looks like a HP5550/5590/7650 (result from sane-backends 1.0.19)&gt;<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&#39;ve started modifying the hp5590 backend driver in an attempt to get it working:<br><br>SANE_DEBUG_HP5590=50 scanimage -L&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <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 &lt;<a href="mailto:hostcc@gmail.com">hostcc@gmail.com</a>&gt;<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-&gt;id: SILITEKIElwood<br>
[hp5590] init_resp-&gt;dpi_x: 24585&nbsp;&nbsp;&nbsp; &lt;--- custom debug msgs i&#39;ve put in<br>[hp5590] init_resp-&gt;dpi_y: 24585&nbsp;&nbsp;&nbsp; &lt;--- will have to find out why the dpi is wrong later<br>[hp5590] init_resp-&gt;id: SILITEKIElwood<br>
[hp5590] init_resp-&gt;dpi_x: 24585<br>[hp5590] init_resp-&gt;dpi_y: 24585<br>[hp5590] hp5590_init_scanner: Vendor id mismatch for scanner HP5550 - required&nbsp; &#39;SILITEKIPenguin&#39;, got &#39;SILITEKIElwood&#39;<br>[hp5590] sane_hp5590_get_devices, local only: 0<br>
[hp5590] Found 0 devices<br><br>Now I&#39;ve modified hp5590_cmds.c<br>static const struct hp5590_model<br>hp5590_models[] = {<br>&nbsp; {<br>&nbsp;&nbsp;&nbsp; SCANNER_HP4570,<br>&nbsp;&nbsp;&nbsp; 0x03f0, 0x1305, &quot;SILITEKIElwood&quot;,<br>&nbsp;&nbsp;&nbsp; &quot;4570&quot;, &quot;Workgroup scanner&quot;<br>
&nbsp; },<br>&nbsp; {<br>&nbsp;&nbsp;&nbsp; SCANNER_HP5550,<br>&nbsp;&nbsp;&nbsp; 0x03f0, 0x1205, &quot;SILITEKIPenguin&quot;,<br>&nbsp;&nbsp;&nbsp; &quot;5550&quot;, &quot;Workgroup scanner&quot;<br>&nbsp; },<br>&nbsp; {<br>&nbsp;&nbsp;&nbsp; SCANNER_HP5590,<br>&nbsp;&nbsp;&nbsp; 0x03f0, 0x1705, &quot;SILITEKIPenguin&quot;,<br>
&nbsp;&nbsp;&nbsp; &quot;5590&quot;, &quot;Workgroup scanner&quot;<br>&nbsp; },<br>&nbsp; {<br>&nbsp;&nbsp;&nbsp; SCANNER_HP7650,<br>&nbsp;&nbsp;&nbsp; 0x03f0, 0x1805, &quot;SILITEKIArnold&quot;,<br>&nbsp;&nbsp;&nbsp; &quot;7650&quot;, &quot;Document scanner&quot;<br>&nbsp; }<br>};<br><br>and modified hp5590_cmds.h<br>
enum hp_scanner_types<br>{<br>&nbsp; SCANNER_NONE = 0,<br>&nbsp; SCANNER_HP4570,<br>&nbsp; SCANNER_HP5550,<br>&nbsp; SCANNER_HP5590,<br>&nbsp; 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&#39;t figured out yet.<br><br>&nbsp; Is there a standalone framework (C program linking to one of the backend drivers) that I can use to debug my driver?&nbsp;&nbsp; Or do I figure out why there are no debug symbols in my CVS copy of the sane backends I built?&nbsp; Google searches are failing me on how to debug this driver....&nbsp; any pointers would be appreciated!<br>
-- Markham<br>