Jump to content

tuto mandrake 10.1 and Lirc serial


Guest nethy
 Share

Recommended Posts

I am looking for a tuto to implement lirc (serial) on a mandrake 10.1.

I have read a quite simple tuto done by aRTee (thanks you) but it was not for lirc_serial_home

 

http://www.mandrake.tips.4.free.fr/configuration101.html

 

could someone help me to implement lirc serial on my mandrake 10.1 (i am a newbies)

 

thanks

Edited by nethy
Link to comment
Share on other sites

The kernel recompile is probably not necessary.

 

In the normal Mandrake kernel, the modules fail to get compiled.

In the configuration the lirc code is selected to be compiled as modules. But they don't get compiled, due to some bug.

 

I have compiled them myself, by taking the code from the mandrake 2.6.7 multimedia kernel, sticking that into the kernel source tree in place of the original non compiling lirc code, and compiled the modules.

 

See also the bugreport:

http://qa.mandrakesoft.com/show_bug.cgi?id=10826

 

 

You will find those modules at the aforementioned link, including the lirc_serial_home.ko module.

 

 

To the topic starter, have you taken the necessary modules, ran

depmod -a

after placing them?

 

What else have you tried?

And how did the system respond?

Link to comment
Share on other sites

aRtee

i try that but when i check if lirc serial is responding : mode2 the answer is " This program is only intended for receivers supporting the pulse/space layer.

Note that this is no error, but this program simply makes no sense for your

receiver."

 

just to make a recap i do this to my config

 

1) i change /etc/sysconfig/lircd :

DRIVER=default

 

# Hardware driver module to load

#HWMOD=lirc_dev

#HWMOD=lirc_i2c

HWMOD=lirc_serial

 

# The device node that communicates with the IR device.

# if you are using lirc_serial, set DEVICE to /dev/ttyS[0-9]

# where 0-9 is the serial port your IR receiver is plugged

 

# with devfs enabled

#DEVICE=/dev/lirc/0

DEVICE=/dev/lirc/serial

 

# without devfs

#DEVICE=/dev/lirc

 

# Serial port for the receiver (for serial driver)

# COM1 (/dev/ttyS0)

COM_PORT=/dev/ttyS0

DRIVER_OPTS="irq=4 io=0x3f8"

 

# COM2 (/dev/ttyS1)

#COM_PORT=/dev/ttyS1

#DRIVER_OPTS="irq=3 io=0x2f8"

 

2) i creted a directory with missing files

 

mkdir -p /lib/modules/2.6.8.1-12mdk/kernel/3rdparty/lirc

 

3) i put your files (found at http://www.mandrake.tips.4.free.fr/lib/mod...3rdparty/lirc/)

 

4) and do :

depmod -a

mknod /dev/lirc/0 c 61 0

service lircd start

service lircmd start

 

service start ok but when i check if it working (going into mode2) it seems to doesnt working

 

have you an idea?

 

Thanks

Link to comment
Share on other sites

Ok, first, you have to put lirc_serial_home instead of lirc_serial into /etc/sysconfig/lircd

 

second, I don't think that for you you need to make mknod /dev/lirc/0 c 61 0, but even so, you are referring to DEVICE=/dev/lirc/serial - this reference must be to the lirc device.

 

You only have to do the depmod -a once (to let the kernel know there are new or changed modules).

 

What happens if you do:

modprobe lirc_serial_home

?

 

Check if any device node is created at /dev/lirc

ll /dev/lirc*

 

Another issue: the lircd file is wrong, use this one instead (substitute your /etc/rc.d/init.d/lircd with this code):

 

#!/bin/sh
#
# lircd         Linux Infrared Remote Control daemon
#
# chkconfig:    2345 65 35
# description:  LIRC is a package that allows you to decode and send
#               infra-red signals of many (but not all) commonly used
#               remote controls.
#
# processname:  lircd
# pidfile:      /var/run/lircd.pid
# config:       /etc/lircd.conf
# config:       /etc/sysconfig/lircd

# Source function library
. /etc/rc.d/init.d/functions

# Get service config
[ -f /etc/sysconfig/lircd ] && . /etc/sysconfig/lircd

MODULEPATH="/lib/modules/`uname -r`/kernel/3rdparty/lirc"

# See how we were called.
case "$1" in

 start)    # Check if the service is already running?
           if [ ! -f /var/lock/subsys/lircd ]; then

               # Release serial port.
               if [ "${HWMOD}" = "lirc_serial_animax" -o \
                    "${HWMOD}" = "lirc_serial_home" -o \
                    "${HWMOD}" = "lirc_serial_irdeo" -o \
                    "${HWMOD}" = "lirc_serial_irdeo_rem" ]; then

                   if lsmod | grep -q ^lirc_serial; then

                       modprobe -r serial

                   else

                       setserial ${COM_PORT} uart none

                   fi

               fi

               # Load the hardwaredriver
               if [ -z "${HWMOD}" ] || lsmod | grep -q ${HWMOD}; then

                   true

               else

                   modprobe ${HWMOD} ${DRIVER_OPTS} > /dev/null

               fi

               gprintf "Starting Linux Infrared Remote Control daemon:"

               OPTIONS=""
               [ -n "${DRIVER}" ] && OPTIONS="--driver=${DRIVER}"
               [ -n "${DEVICE}" ] && OPTIONS="${OPTIONS} --device=${DEVICE}"

               daemon lircd ${OPTIONS}

               RETVAL=$?
               [ "${RETVAL}" -eq 0 ] && touch /var/lock/subsys/lircd

           else

               gprintf "Starting Linux Infrared Remote Control daemon:"
               failure         
               
           fi

           echo
          ;;

 stop)     # Stop daemons.
           if [ -f /var/lock/subsys/lircd ]; then

               gprintf "Stopping Linux Infrared Remote Control daemon:"

               killproc lircd

               rm -f /var/lock/subsys/lircd >/dev/null 2>&1

               # Unload the hardwaredriver
               if [ -z "${HWMOD}" ] || lsmod | grep -q ${HWMOD}; then

                   modprobe -r ${HWMOD} > /dev/null

               fi

               echo

           else

               gprintf "Stopping Linux Infrared Remote Control daemon:"
               failure
               echo
               exit 1

           fi
          ;;

 status)   status lircd
          ;;

 restart)  test -f /var/lock/subsys/irexec && RESTART_IREXEC=yes
           test -n "${RESTART_IREXEC}" && /etc/rc.d/init.d/irexec stop
           
           test -f /var/lock/subsys/lircmd && RESTART_LIRCMD=yes
           test -n "${RESTART_LIRCMD}" && /etc/rc.d/init.d/lircmd stop
           
           $0 stop
           $0 start
           
           test -n "${RESTART_LIRCMD}" && /etc/rc.d/init.d/lircmd start
           test -n "${RESTART_IREXEC}" && /etc/rc.d/init.d/irexec start
          ;;

 reload)   gprintf "Reloading Linux Infrared Remote Control daemon:"
           killproc lircd -HUP
           echo
          ;;

 *)        gprintf "$0 {start|stop|status|restart|reload}\n"
           exit 1
          ;;

esac

exit ${RETVAL}

 

 

If all goes well you should be able to do

service lircd start

service lircmd start

Link to comment
Share on other sites

i try and when i do

 

modprobe lirc_serial_home i get

 

WARNING: Error inserting lirc_dev (/lib/modules/2.6.8.1-12mdk/kernel/3rdparty/lirc/lirc_dev.ko): Invalid module format

FATAL: Error inserting lirc_serial_home (/lib/modules/2.6.8.1-12mdk/kernel/3rdparty/lirc/lirc_serial_home.ko): Invalid module format

 

i check for node

 

ll /dev/lirc*

prw-r--r-- 1 root root 0 nov 4 16:48 /dev/lircm|

 

/dev/lirc:

total 0

crw-r--r-- 1 root root 61, 0 nov 7 13:39 0

Link to comment
Share on other sites

Make sure you're using the modules from here:

http://www.mandrake.tips.4.free.fr/lib/mod.../3rdparty/lirc/

 

and not those from the 10.1CE kernel.

 

If you're not sure, do

modinfo lirc_dev

or

modinfo lirc_serial_home

to find out which ones you have.

 

vermagic should correspond with your kernel.

Do

uname -r

to find out which kernel you're running.

 

 

Hope this helps.

Link to comment
Share on other sites

you was right i was using bad file version.

 

I remplace every files by right one.

 

now when i do modinfo lirc_dev

filename: /lib/modules/2.6.8.1-12mdk/kernel/3rdparty/lirc/lirc_dev.ko

description: LIRC base driver module

author: Artur Lipowski

license: GPL

vermagic: 2.6.8.1-12mdk 686 gcc-3.4

depends:

 

but i still get

 

depmod -a

[root@vdr /]# modprobe lirc_serial_home

FATAL: Error inserting lirc_serial_home (/lib/modules/2.6.8.1-12mdk/kernel/3rdparty/lirc/lirc_serial_home.ko): Device or resource busy

Link to comment
Share on other sites

lsmod

 

Module                  Size  Used by
lirc_dev               10440  0
nls_iso8859-15          4224  1
isofs                  31352  1
md5                     3584  1
ipv6                  230916  8
rfcomm                 32348  0
l2cap                  19876  5 rfcomm
bluetooth              39076  4 rfcomm,l2cap
snd-seq-oss            31232  0
snd-seq-midi-event      6080  1 snd-seq-oss
snd-seq                47440  4 snd-seq-oss,snd-seq-midi-event
snd-pcm-oss            49480  0
snd-mixer-oss          17376  1 snd-pcm-oss
snd-intel8x0           30124  1
snd-ac97-codec         69392  1 snd-intel8x0
snd-pcm                81800  2 snd-pcm-oss,snd-intel8x0
snd-timer              20356  2 snd-seq,snd-pcm
snd-page-alloc          7400  2 snd-intel8x0,snd-pcm
gameport                3328  1 snd-intel8x0
snd-mpu401-uart         5856  1 snd-intel8x0
snd-rawmidi            19300  1 snd-mpu401-uart
snd-seq-device          6344  3 snd-seq-oss,snd-seq,snd-rawmidi
snd                    45988  13 snd-seq-oss,snd-seq,snd-pcm-oss,snd-mixer-oss,snd-intel8x0,snd-ac97-codec,snd-pcm,snd-timer,snd-mpu401-uart,snd-rawmidi,snd-seq-device
soundcore               7008  1 snd
af_packet              16072  0
floppy                 55088  0
eth1394                17000  0
8139too                20928  0
mii                     4224  1 8139too
ide-cd                 37280  1
cdrom                  37724  1 ide-cd
ohci1394               30788  0
ieee1394              292056  2 eth1394,ohci1394
loop                   12520  0
sis-agp                 5796  1
agpgart                27752  1 sis-agp
ehci-hcd               26244  0
ohci-hcd               18468  0
usbcore               103172  4 ehci-hcd,ohci-hcd
ext3                  120680  3
jbd                    49080  1 ext3

i do rmmod lirc_dev

 

but when i retry

modprobe lirc_serial_home

FATAL: Error inserting lirc_serial_home (/lib/modules/2.6.8.1-12mdk/kernel/3rdparty/lirc/lirc_serial_home.ko): Device or resource busy

Link to comment
Share on other sites

Hmm, reading back I think the problem may be that you created the node by hand on the wrong name -- well, wrong for your module; you followed my instructions for a different device/driver.

 

If

ls -l /dev/lirc

shows

crw-r--r-- 1 root root 61, 0 Nov 8 19:31 0

(with likely a different date), it means that there is a /dev/lirc/0 device, with node numbers 61, 0, but not as it is supposed at /dev/lirc/serial or maybe by now /dev/lirc/serial_home.

 

If my assumptions are correct that this file exists because you made it, and this is blocking, then you have to remove the node, with a

rm

command.

 

I hope this is the problem, that's the only thing I've been able to come up with..

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...