LinHES Forums
http://forums.linhes.org/

lirc_serial problem
http://forums.linhes.org/viewtopic.php?f=1&t=123
Page 1 of 1

Author:  pwood999 [ Sat Nov 15, 2003 7:57 pm ]
Post subject:  lirc_serial problem

I have got lirc to understand my remote, but I can't get it to load properly at boot time. The standard "serial" driver is getting there first and I get the error below:

lirc_dev: IR Remote Control driver registered, at major 61
lirc_serial: port 02f8 already in use
lirc_serial: use 'setserial /dev/ttySX uart none'
lirc_serial: or compile the serial port driver as module and
lirc_serial: make sure this module is loaded first

Lirc_serial is compiled as a module, but I don't know how to get it to run first.
If I do a "setserial /dev/ttyS1 uart none" and then run "lircd" I can see my remote ok with "irw".

How do I disable the serial and run lircd automatically every boot ?

I have already enabled irxevent in the GUI boot.

Thanks,
Pete

Author:  Dale [ Sat Nov 15, 2003 8:45 pm ]
Post subject:  Re: lirc_serial problem

pwood999 wrote:
I have got lirc to understand my remote, but I can't get it to load properly at boot time. The standard "serial" driver is getting there first and I get the error below:

lirc_dev: IR Remote Control driver registered, at major 61
lirc_serial: port 02f8 already in use
lirc_serial: use 'setserial /dev/ttySX uart none'
lirc_serial: or compile the serial port driver as module and
lirc_serial: make sure this module is loaded first

Lirc_serial is compiled as a module, but I don't know how to get it to run first.
If I do a "setserial /dev/ttyS1 uart none" and then run "lircd" I can see my remote ok with "irw".

How do I disable the serial and run lircd automatically every boot ?

I have already enabled irxevent in the GUI boot.

Thanks,
Pete


Pete, it sounds to me as if you need to disable that serial in the
BIOS before the boot.

Author:  pwood999 [ Sun Nov 16, 2003 6:32 am ]
Post subject: 

ahh but surely if I disable the serial port in the bios, then I won't be able to use my serial IR receiver.

What I need is to know how to disable the default kernel serial support. Then the lirc_serial module can grab the port without the errors.
(I already tried editing "/etc/modules.conf" but it didn't work)

or alternatively, how and where can I put the "setserial" & "lircd" commands so they run after boot up ?

Pete

Author:  swk [ Fri Nov 21, 2003 11:34 am ]
Post subject: 

Pete,

I had the same problem, but was able to resolve it as follows:

1. create a file in /etc/init.d called local
In this file is the line:
setserial /dev/ttyS0 uart none
2. chmod +x /etc/init.d/local
3. update-rc.d local defaults 34 (so it runs before lircd which is 35 on my box)

Hope this helps. I think another (maybe simpler) solution would be
to add the setserial line to the /etc/init.d/lircd file.

...Ken

Author:  pwood999 [ Fri Nov 21, 2003 12:46 pm ]
Post subject: 

I will try this later.

How / where do I find the correct numeric value you mention ?

Pete

Author:  swk [ Fri Nov 21, 2003 2:00 pm ]
Post subject: 

Look at:

/etc/rc3.d

There you will find all your "init 3" scripts that start up on boot. Will be something like S34lircd I think. Not in front of my box here.

Let me know if it works, otherwise I'll look closer at my setup for you.

...Ken

Author:  swk [ Fri Nov 21, 2003 7:27 pm ]
Post subject: 

Pete,

In addition to

setserial /dev/ttyS0 uart none

I also have

modprobe lirc_serial

to get the recompiled module loaded

(in my /etc/init.d/local file)

...Ken

Author:  pwood999 [ Sun Nov 23, 2003 4:30 am ]
Post subject: 

ok, in frustration, I re-installed a clean copy of KnoppMyth. I can now disable the generic serial stuff, make & install lirc, but I can't get past the mode2 tests.

Here's what I did:

Install KnoppMyth
install-nvidia.sh
selected the lirc and xv stuff from the knoppmyth menu
restored my database to get my videos & music back.
untar lirc*
cd /usr/src/lirc-0.7.0pre2
./setup.sh (selected homebrew on com2 & debug options)
make
make install
modprobe -r serial
modprobe lirc_serial
lircd
mode2

I get a response of:
lirc_serial: Interupt 3, port 02f8 obtained

but no space pulse data from the remote ?

I also tried this:
rmmod lirc_serial
modprobe lirc_serial
mode2

I get this in syslog: (so it seems to be installing ok.)

lirc_serial: cleaned up module
lirc_serial: in init_timing_params, freq=38000, duty_cycle=50, clk/jiffy=17432576, pulse=22937, space=22938, conv_us_to_clocks=1743
lirc_serial: auto-detected active high receiver
lirc_dev: lirc_register_plugin:sample_rate: 0


What am I missing ??

Thanks,
Pete

Author:  pwood999 [ Tue Nov 25, 2003 6:45 am ]
Post subject:  Success at Last. (was lirc_serial problem)

Ok, I have finally got it going. :D
Thanks to all for your help. I have learned lot along the way.

There were two problems :

1) The main problem was an incompatible(ish) serial IR receiver. It used pin 6 for data instead of pin 1, but worked for a while because of an intermittent short in the connector. Last night I rebuilt it according to the Lirc site and it worked fine. (Cost me 50 pence in components though ! )

2) The second problem was getting the modules to load correctly. I have solved it by letting debian install both the generic serial & lirc stuff. Then I disable serial and modprobe lirc_serial as suggested earlier. I have done all this in a "local" file placed in /etc/init.d/
This had to go in as 21 rather than 34 as suggested because myth was occaisionally accessing lircd first and the modprobe was failing.

Thanks,
Pete

Author:  swk [ Tue Nov 25, 2003 7:08 pm ]
Post subject: 

Pete,

Glad you got it working, I'm afraid I was holding back on posting because I had no other suggestions :oops:

I too have learned a lot along the way of trying to "pause live tv"!! But it has been worth it.

Cheers....Ken

Page 1 of 1 All times are UTC - 6 hours
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/