Hi, On Fri, Dec 23, 2005 at 05:19:35PM +0100, JKD wrote: > I want to announce that it's available the first backend for hp scanjet > 3900 series (hp3900) at: > > http://sourceforge.net/projects/hp3900-series/ > > At this moment, code is a bit unstable so I think that it's very soon to > integrate backend in SANE project. But I want to give people the > oportunity to test backend with their scanners.
I don't have such a scanner but I had a quick look at the code nevertheless. Do you know which other scanners of the HP3900 series work with your backend? Do they have the same USB product ids? Are the other scanners as listed in hp3900.conf also tested and working? How well do the scanners work (complete, good, basic, minimal, see our scanner lists for details). I want to make a .desc file from that to correctly link to your page. To my mind the readme is a bit misleading. Setting BACKENDS is absolutely necessary, because you don't provide a patch for configure(.in) to add the backend to the lists of backends. When this code is ready for inclusion into sane-backends, please provide a patch against current CVS. Also, I'm not sure if the code for the stand-alone version should stay in the SANE backend when it's included. A manual page would be also nice. Please run the code through indent -gnu. In sane_init(), DBG_INIT() is called too late, it must be called before any call of DBG. Also I don't understand why you try to read your own version of a environment debug variable. Please don't do that, use the way which is provided by sanei_debug.h. This will break if debugging is disabled. something like my_debuglevel = DBG_LEVEL; should just work. What are these big lists of numbers in hp3900_config.h? Motor acceleration curves? I have to admit that I don't undertand what this file does. Looks like black magic a bit :-) Generally, .h files should not contain code (implementation). So I'd put actual code into .c files (which can also be included). UCHAR GetCCDTypeFromGPIO() Pah, ugly windows-type types. Why not use unsigned char (or SANE_Byte)? I get the following compilation warnings: hp3900_rts8822.h: In function 'fnf250': hp3900_rts8822.h:5383: warning: unused variable 'myimageresy' hp3900_rts8822.h:5382: warning: unused variable 'myresy' hp3900_rts8822.h:5381: warning: unused variable 'myimageresx' hp3900_rts8822.h:5380: warning: unused variable 'myresx' hp3900_rts8822.h:5372: warning: unused parameter 'buffer' hp3900_rts8822.h:5372: warning: unused parameter 'buffer_size' hp3900_rts8822.h:5372: warning: unused parameter 'transferred' hp3900_rts8822.h: In function 'CalibAdcOffset_RT': hp3900_rts8822.h:9446: warning: unused variable 'pos' hp3900_rts8822.h:9445: warning: unused variable 'gainmode' hp3900_rts8822.h:9444: warning: unused variable 'lf0ec' hp3900_rts8822.h:9443: warning: unused variable 'dbValues' hp3900_rts8822.h:9442: warning: unused variable 'myeax' hp3900_rts8822.h:9441: warning: unused variable 'op2' hp3900_rts8822.h:9441: warning: unused variable 'op1' hp3900_rts8822.h:9440: warning: unused variable 'myoffset' hp3900_rts8822.h: In function 'Calibration': hp3900_rts8822.h:9598: warning: unused parameter 'value' This is the error report I get from make libcheck: Libraries exporting 'illegal' symbols: *** backend/.libs/libsane-hp3900.a: 00009aa0 T AddStep 0000be70 T AllocGammaTable 00013800 T AutoRef 00009b50 T Bulk_Operation 0000c020 T CalculateRefs 00015c20 T CalibAdcOffset_RT 00015800 T CalibPAGain 00012920 T Calibrate_Malloc 00015d40 T Calibration 0000a840 T ChangeMotor 00006930 T Check_Constrains 0000ea80 T Compose_Triplet 0000eb50 T Convert_12_to_8bits 00014a40 T CreateCalBuffer 00014990 T Create_Fixed_CalBuffer 0000dc70 T Create_Reading_Buffers 00006ef0 T Data_BitSet 00009af0 T Data_Get 00009500 T Data_Set 0000deb0 T Destroy_Reading_Buffers 00010eb0 T DoOverDrive 00008780 T E800_FLIP_FLOP 0000ba20 T E810_E813_Control 000098e0 T E8D9_Control 0000a910 T EF08_Control 000086f0 T EnableButton 00009930 T Execute 00013040 T fn11b0 00012a90 T fn3820 00013200 T fn3fc0 00014670 T fn56d6 0000de20 T fn66d0 0000fae0 T fnaab0 000100d0 T fnb250 0000e900 T fnb930 0000e730 T fnbae0 0000e500 T fnbc20 0000e510 T fnbf40 0000e110 T fnc0e0 0000e0f0 T fnf250 00011330 T FreeCalBuffer 00014b90 T Free_Fixed_CalBuffer 0000df10 T Free_Gamma_Tables 00005fb0 T FreeImagingParams 00005fc0 T FreeIniParam 00005f80 T FreeMotorConfig 000052a0 T FreeScannerParams 00013e70 T funcion 000113a0 T funcion2ec0 00013300 T funcioncita 000106f0 T Get_AutoRef_Count 0000c8c0 T get_byte 000051c0 T GetCCDTypeFromGPIO 00008a30 T GetFixedPwm 00007050 T Get_Gain_And_Offset 00011170 T Get_GainMode 000090e0 T GetLampPwm 00008530 T Get_Lamp_Status 000041a0 T get_lvalue 00015bc0 T GetModelID 0000d810 T GetMotorFromResolution 00014010 T GetOneLineInfo 00013f10 T Get_PAG_Value 0000ec70 T Get_Scanner_Buffer_Size 0000c880 T get_shrd 00013b10 T Get_StartPos_and_Leftleading 00000dd0 T get_value 0000b0d0 T GoHomeMotor 00005fe0 T HP_OP_END_SCANNER 0000bd80 T HP_OP_INIT_SCANNER 00010f70 T Inc_AutoRef_Count 00016db0 T info_registers 0000b2d0 T InitBGeneral 00004e60 T InitProfileName 0000b660 T InitUSBData 00004880 T IRead_Buffer 000049f0 T IRead_Byte 000048e0 T IRead_Integer 00004970 T IRead_Word 00006aa0 T IsExecuting 00009390 T is_Lamp_at_home 0000bba0 T IsScannerLinked 00008810 T isTmaAttached 00004b00 T IWrite_Buffer 00004c30 T IWrite_Byte 00004b60 T IWrite_Integer 00004bd0 T IWrite_Word 0000c7c0 T Lamp_Off 0000c770 T Lamp_On 0000c810 T Lamp_Switch 00014be0 T LoadCalibParams 00008ce0 T LoadCheckStable 000088b0 T LoadFixedPwm 00006330 T LoadImagingParams 00006900 T LoadIniParam 00005ff0 T LoadMotorConfig 00009530 T LoadMotorCurve 000089e0 T LoadOverDriveTime 000057d0 T Load_Scan_Mode 00005300 T LoadScanModeParams 000058d0 T LoadScannerParams 000061a0 T LoadScanningConfig 00010ff0 T Load_StripCoords 000072d0 T LoadTimingParams 00000020 D MotorResource 00009e70 T MotorSetup 0000aba0 T MoveLampHome 0000ec00 T Notify_BufferSize_to_read 00004dd0 T OpenUsbDriver 00007210 T Operations_In_0077 0000dbe0 T Ops_in_0021 00007000 T Read_0077 0000f930 T Read_Block 000048c0 T Read_Buffer 00004cc0 T Read_Bulk 00004a40 T Read_Byte 000084d0 T Read_FE3E 00010650 T Read_Image 00004950 T Read_Integer 0000f470 T Read_NonColor_Block 000049d0 T Read_Word 00011070 T Relocate_Lamp 000085d0 T Reset_0070_To_0076 0000bad0 T RT_OP_Set_Lamp_Timer 00010930 T RT_OP_SET_PARAMETER 00016ce0 T RT_OP_START_SCAN 00016d70 T RTS8822_GetRegisters 0000ef40 T Scan_Read_BufferA 00014550 T SearchForPWM 00009c90 T Send_Motor_Steps 00008690 T Set_AutoRef_Count 00009a60 T Set_BigEndian_Value 00011860 T SetCalibrationTable 00005140 T Set_E950_Mode 00008bf0 T SetFixedPwm 00010740 T SetLamp 000108f0 T SetLamp2 0000dac0 T SetLampGainMode 00008e40 T Set_LER_SER 0000d890 T SetMultiExposure 00009160 T SetPwmDutyCycle 00008fd0 T SetPwmLampMode 00013bd0 T SetRefPos 00007a10 T SetScanParams 00013a80 T Set_StartPos_and_Leftleading 0000c8f0 T SetTiming 000092b0 T SetupLampPwm 000119c0 T SetUpRegisters 000077e0 T SetupScanMode 00014720 T showbuffer 00004590 T show_buffer 00009420 T show_MotorMove 00006d70 T show_ScanLowLevelConfig 00006b20 T show_ScanParams 00016060 T Start_Scan 0000df70 T StopScan 00000044 D timingfile 000047e0 T usb_ctl_read 00004a60 T usb_ctl_write 00000000 D usbdn 00000040 D usbfile 00008c50 T Use_Fixed_Pwm 00000050 D v1220 00000048 D v163f 0000004c D v3618 0000aad0 T WaitEndingAction 0000edb0 T Wait_for_desired_size 0000a9f0 T WaitForScanner 00006fb0 T Write_0077 00004b40 T Write_Buffer 00004d50 T Write_Bulk 00004ca0 T Write_Byte 00004bb0 T Write_Integer 00004c10 T Write_Word See doc/backend-writing.txt for details. Bye, Henning
