LIRC and kernelsources


Forum: Other Help Topics
Topic: LIRC and kernelsources
started by: libretto

Posted by libretto on June 06 2005,20:43
Hi there,

I'm looking to use LIRC (Infrared control in Linux) on my lapotp, so I can control my MD deck.

I tried apt-getting the program but it failed (tried both stable and testing apt sources).

Then tried to install the LIRC source, it complains about there being no kernelsource. So grabbed the kernelsource.dsl, despite this the LIRC install program says there is a 'Makefile' but still no sources...

Do I need to compile the sources or something for the lirc install program to properly detect them??? If so how would I compile them, I'll admit to never having recompiled a kernel in my Linux trials (yet).

LIRC's suggested install command is:

'./setup.sh && make isntall'

Useful suggestions welcome. :D

Posted by clacker on June 06 2005,22:34
libretto,  I was working on a kernel remastering walkthrough when jonf beat me to it.  I can tell you that the Kernelsource.dsl only contains the header files (*.h), the patch file, and the .config file.  It doesn't contain the sources (*.c files).  You could try downloading the kernel source from www.kernel.org and then using the .config and make files from the kernelsource.dsl.

I'd also recomend loading the gnu-utils package first.  Sometimes it's some busybox replacement that gets you.

Posted by tempestuous on June 07 2005,09:48
At one point in my experiments with DSL, I set up LIRC.
I installed Knoppix 3.4 to hard drive and compiled the LIRC modules ... and yes, the kernel source needs to be present.
Get it from < http://developer.linuxtag.net/knoppix/i386/ >
But I DID NOT need to recompile the kernel.
The compilation will produce a deb file - /usr/src/modules/lirc-modules-2.4.26.deb

I then installed this deb file into DSL with dpkg.
I could then load the lirc_sir.o driver, specifying irq and io parameters.

But prior to all of this, you must set up your IrDA drivers.  IrDA drivers are already in DSL, at -
/lib/modules/2.4.26/kernel/drivers/net/irda/  and
/lib/modules/2.4.26/kernel/net/irda/ircomm/

You will need module-init-tools, irda-utils, and setserial debs to set things up.
I think I got these from < http://packages.debian.org/unstable/ > (?)
I can't remember any configuration details, but I have these IrDA resources bookmarked in my web browser -
< http://www.hpl.hp.com/personal/Jean_Tourrilhes/IrDA/IrDA.html >
< http://tuxmobil.org/Infrared-HOWTO/Infrared-HOWTO.html >
< http://irda.sourceforge.net >

I hope this helps.  Let us know how it goes.
Craig S[U][/U]

Posted by libretto on June 07 2005,12:20
Thanks for the replies. I will give it another go in the next few days.

Clacker, as the laptop is running a HD install, gnu-utils.dsl was one of the first/dsl packages i grabbed from the repositry  :;):

tempestuous, I understand your method of precompiling the modules, unfortunately I have not had luck getting knoppix to work as a hdd install (on the main box) so thats why i used DSL.  Although would clacker's above suggestion of grabbing the 'actual' appropriate kernel source (.c) files and then re-running the LIRC setup likely to work ???

P.S.: Of course I could try and re-apt-get the latest LIRC files and see if theres been any change  :laugh:

Posted by tempestuous on June 07 2005,15:15
I can't offer any advice about build problems associated with the source files from www.lirc.org, because I think I compiled from lirc-modules-source_xxx.deb at < http://packages.debian.org/unstable/utils/ >  The build process is different with this source - debian/rules binary-modules ...
Perhaps you could try this, too.

Should you use the full kernel source (30MB)? - sure, either for DSL+gnu-utils, or Knoppix.  The link I gave above is still correct.  It's the true Knoppix kernel source, and its configuration appears to be suitable for IrDA and LIRC.  No recompiling necessary.  It just needs to be in place for the LIRC source to reference while building.

But after all of this, would you like me just to email the final deb file to you?  Or upload it somewhere?
This file - lirc-modules-2.4.26_0.6.6-12+Custom.1.00_i386.deb is only 14KB.  I compiled it for native IrDA devices, for i386.

And as your username suggests, are you actually setting this up on a Toshiba Libretto?  This might explain the unsuccessful Knoppix HD install - it requires almost 3GB.

Posted by libretto on June 07 2005,18:43
I'm afraid I'm no longer in posession of my 70CT :( , my sister needed a laptop and I came across a nice IBM TP240 :)  Although it will be nice WHEN I get it back :D

When I tried installing knoppix it was on my main box.

If you could email me the files that would be most welcome (of course with some half-noob type installation instructions :;): )  you can get my email address from my forum details.

Just for reference I'm hoping to get this < MDTOCEditor > to work. :cool:

Posted by ke4nt1 on June 07 2005,20:44
I recently purchased 2 IBM 240's myself..
They seem to run DSL in toram from frugal nicely.
Both have 192MB ram...

Light and fast..  perfect for my needs..
I use an orinoco gold card, or an MA111 , for access.
SO far, I'm pleased with it's size-vs-performance..

73
ke4nt

Posted by tempestuous on June 08 2005,02:08
Libretto,
I will sent you the LIRC modules shortly.
Check your BIOS that your IrDA mode is set for standard (SIR) because apparently LIRC won't work in FIR mode.

After installing the lirc-modules deb, I believe you can load LIRC like this -
modprobe lirc_sir irq=10 io=0x3e8

You may also need to install setserial, to check that your system sees the IR port (in my case /dev/ttyS2) at the correct IRQ.  If it's wrong, you can force it there as such -
setserial /dev/ttyS2 irq 10
Some documentation also suggests that you should force the IR port to an undefined uart, as such -
setserial /dev/ttyS2 uart none

At this point you will want to run some diagnostics from an xterm to see if things are working.  I was experimenting with various IR communication tasks, but not remote control, so I can't help you here.
You may need to install irda-utils?  I'm not sure.

Regarding Minidisc TOC Editor, this is qt based, so you will need to install libqt3.
Good luck.

Posted by libretto on June 08 2005,20:47
Thanks for the files, althoguh according to one site te ibm 240x (model up from mine) uses the NSC PC87588 chip which is probably FIR :( will check.

However tried you .deb and am getting 'unresovled symbols' errors. Any thougts?

ke4nt, have you tried running wine on the 240? Also have you used the internal modem? Wouldn't mind an X21, its got built in LAN :;):

Posted by ke4nt1 on June 08 2005,21:50
Yes,
Wine works fine for me on the 240..
Somewhat slow on the celeron 300,
but things like solitare work just fine.

Haven't tried the internal modem yet..

73
ke4nt

Posted by tempestuous on June 09 2005,09:51
I forgot to mention that you need to run "update-modules" after installing the lirc-modules deb, but it appears you knew that.
In fact, I think the 'unresolved symbols' message appears at this stage.  Check the exact details of this error message - I recall that it may refer to some other modules (TV tuner card modules??) and has nothing to do with the lirc driver.

FIR-capable IrDA chips should be able to operate in the slower SIR mode, but you may have to change a BIOS setting to achieve this.

Try to load the lirc driver and see what happens -
modprobe lirc_sir irq=10 io=0x3e8  (these settings are correct for my hardware)

If there are no error messages, chances are you can now run one of the lirc utilities and start doing something useful with it.

Posted by libretto on June 09 2005,11:55
I didn't know about running 'update-modules'... :)

I was unable to copy the entire error message as I havent enabled middle button mouse emulation, yet.

The only IR related settings in the bios were, serial port number, IRQ and DMA.

Will have another go soon. Cheers again for the files.

Powered by Ikonboard 3.1.2a
Ikonboard © 2001 Jarvis Entertainment Group, Inc.