LinuxQuestions.org
Have you heard the LinuxQuestions.org Podcast?
Go Back   LinuxQuestions.org > Forums > Linux > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices

Tags used in this thread
Popular LQ Tags , , , , , ,

Reply
 
Thread Tools
Old 05-22-2007, 03:37 PM   #1
broxtor
Member
 
Registered: Jul 2003
Location: The Netherlands
Distribution: Kubuntu Dapper
Posts: 90
Thanked: 1
Scanjet 5100c in Kubuntu Feisty


[Log in to get rid of this advertisement]
I had my HP Scanjet 5100c scanner working in Kubuntu Dapper (2.6.17) by compiling the ppscsi modules. Now, I recently upgraded to Feisty (2.6.20) and now I'm having problems to get my scanner to work again. I tried using the same modules I compiled for Dapper (ppscsi and epst), but that won't work. So I tried to compile new ones, but that doesn't work either. Apperently since kernel 2.6.19 linux/config.h does no longer exist in the linux headers and I do need that to compile the modules. I tried to workaround this bij doing a "ln -s autoconf.h config.h" in the /usr/src/linux-headers-'uname -r'/include/linux/ folder. That is a solution for one error I get during building, but I also get another error of which I don't know how to solve it.
The output is as follows:
Code:
make -C /lib/modules/`uname -r`/build M=`pwd` modules
make[1]: Map '/usr/src/linux-headers-2.6.20-15-generic' wordt binnengegaan
  CC [M]  /usr/src/ppscsi-beta2/ppscsi.o
/usr/src/ppscsi-beta2/ppscsi.c:1148:39: fout: macro "INIT_WORK" kreeg 3 argumenten, maar heeft er slechts 2 nodig
/usr/src/ppscsi-beta2/ppscsi.c: In functie ‘ppsc_detect’:
/usr/src/ppscsi-beta2/ppscsi.c:1148: fout: ‘INIT_WORK’ undeclared (first use in this function)
/usr/src/ppscsi-beta2/ppscsi.c:1148: fout: (Each undeclared identifier is reported only once
/usr/src/ppscsi-beta2/ppscsi.c:1148: fout: for each function it appears in.)
make[2]: *** [/usr/src/ppscsi-beta2/ppscsi.o] Fout 1
make[1]: *** [_module_/usr/src/ppscsi-beta2] Fout 2
make[1]: Map '/usr/src/linux-headers-2.6.20-15-generic' wordt verlaten
make: *** [all] Fout 2
For the none Dutch folks: It complaints about INIT_WORK that gets 3 arguments, although it needs only two. Does someone know how to fix this? I read that the ppscsi modules are no longer maintained, so waiting for a new version doesn't seem to be an option.
broxtor is offline  
Tag This Post , , , ,
Reply With Quote
Old 06-02-2007, 01:52 AM   #2
haydnc
LQ Newbie
 
Registered: Jun 2007
Posts: 8
Thanked: 0
I just put these instructions together today after struggling through this exact problem on my Ubuntu Feisty setup. I think they should work equally well for Kubuntu.

I have managed to get ppscsi to work properly in feisty. I'm posting the full instructions I've typed up here for anyone else who stumbles across them. The individual parts of this all exist out there on the net, but I've not found anywhere that puts the whole lot together, so here goes:

How to make a HP ScanJet 5100/5200C work with (K)Ubuntu? Feisty (Kernel 2.6.20)

1. Make sure that you have the kernel headers installed:

Code:
sudo apt-get install linux-headers-`uname -r`
2. Download the latest(?) version of ppscsi from http://penguin-breeder.org/kernel/download/ : ppscsi-beta2-20060424.tar.gz

3. Once downloaded extract the file:
tar zxvf ppscsi-beta2-20060424.tar.gz

This next bit is from translated instructions on the spanish Ubuntu website:

Quote:
When extracted and running make we get two significant errors as per the above website:

… /ppscsi-beta2/ppscsi.h: 16: 26: error: linux/config.h: The directory file does not exist or

… /ppscsi-beta2/ppscsi.c: 1148: 39: error: macro “INIT_WORK” received 3 arguments, but it only took 2

Analysis:

The file linux/config.h this obsolete and macro “INIT_WORK” at the moment receives two arguments.

That is to say, the file config.h is replaced at the moment by the file autoconf.h
Solution:

4. Open ppscsi.h in the editing program of your choice.
Change the where it says #include <linux/config.h> to read #include <linux/autoconf.h>
This is on line 16 of the copy of ppscsi.h that I'm working with.

5. Save and close ppscsi.h and open ppscsi.c

Change the following lines:
static void ppsc_tq_int (void *data)
change to
static void ppsc_tq_int (struct work_struct *data)
(Note: This is line 191 in the copy of ppscsi.c I'm working with)

INIT_WORK (&pha->wq, ppsc_tq_int, pha);

change to
INIT_WORK (&pha->wq, ppsc_tq_int);
(Note: This is line 1148 in the copy of ppscsi.c I'm working with)

6. Save and close ppscsi.c and run make. This should produce a set of .ko files, including the all important (to us anyway) ppscsi.ko and epst.ko.

7. Since the Makefile for ppscsi has no instructions for installing these files we need to copy them to their new location manually:
Code:
sudo cp ppscsi.ko epst.ko /lib/modules/`uname -r`/kernel/drivers/parport
8. Next we need to tell the kernel that they exist:
Code:
sudo depmod
9. Lastly we need to load the modules:
Code:
sudo modprobe ppscsi
sudo modprobe epst
This will make the scanner useable until next time the computer is rebooted.

In order to make sure that the scanner is recognised from the moment you boot up it is necessary to edit /etc/modules and add the following two lines to the end of the file:
Code:
ppscsi
epst
My apologies if this seems a little cluttered, but hopefully it should work as well for you as it did for me.
haydnc is offline     Reply With Quote
Old 06-02-2007, 02:26 AM   #3
broxtor
Member
 
Registered: Jul 2003
Location: The Netherlands
Distribution: Kubuntu Dapper
Posts: 90
Thanked: 1

Original Poster
Thumbs up

Thank you very much! This did the trick. I got it to work now!
broxtor is offline     Reply With Quote
Old 07-06-2007, 03:09 PM   #4
jimbo54321
LQ Newbie
 
Registered: Jul 2007
Posts: 2
Thanked: 0
hi all.

what do you mean in number 6 and run make
jimbo54321 is offline     Reply With Quote
Old 07-06-2007, 05:40 PM   #5
broxtor
Member
 
Registered: Jul 2003
Location: The Netherlands
Distribution: Kubuntu Dapper
Posts: 90
Thanked: 1

Original Poster
Hi Jimbo,

This means that you have to open a terminal (e.g. konsole) and cd to the folder where you extracted the source (after you ran through steps 1 to 5). Then in the terminal type "make" (without quotes, or sudo make in case the directory is writeable for your current user). This will compile the neccesary binaries. After that continu with step 7.
broxtor is offline  
Tag This Post , , , ,
Reply With Quote
Old 07-07-2007, 01:24 AM   #6
jimbo54321
LQ Newbie
 
Registered: Jul 2007
Posts: 2
Thanked: 0
cheers, it works a treat,

switched from m$ about 6 weeks ago now and this was the last real reason i booted into m$ regularly.

BYE BYE BILL he he

do i need to keep the ppscsi-beta2 folder now and does it need to stay in same place or is it no longer needed.

also dont have a clue what i've just done and am eager to learn. i have read most areas on the ubuntu official pages and on ubuntu wiki. is there any decent sites to visit to help us noobs

thanks again

jimbo

Last edited by jimbo54321; 07-07-2007 at 01:46 AM..
jimbo54321 is offline     Reply With Quote
Old 07-08-2007, 02:37 PM   #7
haydnc
LQ Newbie
 
Registered: Jun 2007
Posts: 8
Thanked: 0
Hi Jimbo.

You no longer need the ppscsi-beta2 folder as in step 7 you copied the files you created into the modules folder for your kernel.

Keep hold of the instructions and the original source files though as you'll probably need to repeat this whole process next time a major update to the kernel comes out.
haydnc is offline     Reply With Quote
Old 08-19-2007, 01:39 PM   #8
labyrinthH5
LQ Newbie
 
Registered: Aug 2007
Posts: 1
Thanked: 0
Hello, there!

Up to modprobing, everything works fine for me.

I can modprobe ppscsi without a problem, but not epst:

Quote:
FATAL: Error inserting epst (/lib/modules/2.6.20-16-generic/kernel/drivers/parport/epst.ko): No such device
The file does exist, though:

Quote:
installateur@hans-desktop:/etc/sane.d$ ls -la /lib/modules/2.6.20-16-generic/kernel/drivers/parport/
insgesamt 520
drwxr-xr-x 2 root root 4096 2007-08-19 19:27 .
drwxr-xr-x 44 root root 4096 2007-08-18 16:00 ..
-rw-r--r-- 1 root root 190777 2007-08-19 19:27 epst.ko
-rw-r--r-- 1 root root 11292 2007-06-07 22:59 parport_ax88796.ko
-rw-r--r-- 1 root root 8224 2007-06-07 22:59 parport_cs.ko
-rw-r--r-- 1 root root 45104 2007-06-07 22:59 parport.ko
-rw-r--r-- 1 root root 48048 2007-06-07 22:59 parport_pc.ko
-rw-r--r-- 1 root root 12184 2007-06-07 22:59 parport_serial.ko
-rw-r--r-- 1 root root 186418 2007-08-19 19:27 ppscsi.ko
Why does modprobe say "No such DEVICE", anyway?

Can you help me here?

Thank you and thanks for the howto!

Klaus
labyrinthH5 is offline     Reply With Quote
Old 08-30-2007, 04:45 AM   #9
hrossm
LQ Newbie
 
Registered: Aug 2007
Posts: 3
Thanked: 0
Smile Worked for me (Kubuntu 7.04)

No problems at all,
Many thanks for this post, it was just what I was looking for,
Ross
hrossm is offline     Reply With Quote

Reply

Bookmarks


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
upgrade to feisty (kubuntu), proxies... greenmuzz Ubuntu 0 05-03-2007 11:54 AM
Kubuntu Feisty - question about php and DB_DataObject dickgregory Ubuntu 3 04-24-2007 08:22 PM
LXer: Kubuntu 7.04 (Feisty Fawn) Released LXer Syndicated Linux News 0 04-20-2007 07:01 AM
Beryl install - Kubuntu Feisty and Nvidia btmiller Linux - Desktop 4 04-15-2007 05:08 AM
Scanjet 5100C under Slackware ! Cdzin Slackware 2 05-04-2006 01:25 PM


All times are GMT -5. The time now is 08:43 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
RSS2  LQ Podcast
RSS2  LQ Radio
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration