Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Steps to load lirc?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
whygentoo
Tux's lil' helper
Tux's lil' helper


Joined: 14 Jun 2004
Posts: 107
Location: Stockholm

PostPosted: Fri Aug 06, 2004 9:32 pm    Post subject: Steps to load lirc? Reply with quote

I have read several post about lirc. But I´m not sure about the way to load lirc. I have compiled the kernel (2.4.25-gentoo-r1) with serial as a module, as often advised. I know my homebrew serialreciver and remote works, as I have been able to run it with winlirc.

Modprobe lirc_serial loads lirc_serial and lirc-dev. It looks good, dmesg gives the output:
lirc_dev: IR Remote Control driver registered, at major 61
lirc_serial: autodetected active low reciver
lirc_dev: lirc_register_plugin: sample_rate: 0

But I have not been able to get irrecord, irw or mode2 to work. Some posts talks about:
1) load serial/8250
2) setserial /dev/ttyS0 uart none
3) modprobe lirc_serial

Do I have to use setserial when serial is built as a module? What is the proper way to load lirc?
Back to top
View user's profile Send private message
detroitx
n00b
n00b


Joined: 22 Apr 2004
Posts: 5

PostPosted: Sat Aug 07, 2004 7:55 am    Post subject: Reply with quote

settings for lirc (com1) in
/etc/modules.d/lirc
Quote:

alias char-major-61 lirc_serial
alias /dev/lirc/lirc* lirc_serial
options lirc_serial irq=4 io=0x3F8

emerge options can be set in
/etc/make.conf
Quote:
LIRC_OPTS="--with-driver=serial --without-soft-carrier --with-transmitter --with-irq=4 --with-port=0x3F8"

you also need to create the devices nodes for lirc
Quote:
mknod -m 0660 /dev/lirc/lirc0 c 61 0


cu
Back to top
View user's profile Send private message
whygentoo
Tux's lil' helper
Tux's lil' helper


Joined: 14 Jun 2004
Posts: 107
Location: Stockholm

PostPosted: Thu Aug 12, 2004 7:35 am    Post subject: Reply with quote

Solved solved solved!

It turned out that the supply voltage was to low from the serial interface on the Via EPIA 5000 board. You who are familiar with the serial interface know that it´s possible to get a DC supply voltage around 8-12 volt by connecting to the serial interface pin 5 and 7, thats GND (Signal ground) and RTS (Request to send).

I activated the serial interface by modprobe lirc_serial and the messauring the ouput voltage. I got a 5 volt supply from my Via Epia 5000 board. I then switched board to my VIA ME6000 board. I did a modprobe lirc_serial an messaured the output voltage to my homebrew reciever. I got a 7.3 volt supply. And LIRC was up and running whitout any problem. I don´t know if it´s possble to recomstruct the serial reciver or if a parallell reciver would work with the Epia 5000 board. That is still to investigate. But it seems to me that the supply voltage is to low from the Via Epia 5000 serial interface. This is similar with the problem that some time happend to laptops: that the supply voltage is to low to operate the serial reciver, despite that it only consumes a few milliwatts.
Back to top
View user's profile Send private message
bkunlimited
l33t
l33t


Joined: 18 Jun 2004
Posts: 672

PostPosted: Thu Aug 12, 2004 9:44 am    Post subject: Reply with quote

@detroitx

I followd your steps above. but anyway when trying to modprobe lirc_serial i get the following error message:

Code:

FATAL: Error inserting lirc_serial (/lib/modules/2.6.7-gentoo-r11/misc/lirc_serial.ko): Device or resource busy


/dev/lirc/lirc0 exists:

Code:

crw-rw----  1 root root 61, 0 12. Aug 11:39 lirc0


currently loaded kernelmodules:

Code:

gentoo / # lsmod
Module                  Size  Used by
lirc_dev               14348  0
e100                   31104  0
intel_mch_agp           8848  0
rtc                    12360  0


does anyone have an idea of how to solve this problem?

I'm using self built kernel 2.6.7-gentoo-r11
Back to top
View user's profile Send private message
bkunlimited
l33t
l33t


Joined: 18 Jun 2004
Posts: 672

PostPosted: Thu Aug 12, 2004 11:15 am    Post subject: Reply with quote

ah i solved it by myself. sometimes it really helps to read the dmesg output :oops:

this solved the problem:

Code:

gentoo / # setserial /dev/ttyS0 uart none
gentoo / # modprobe lirc_serial
gentoo / # lsmod
Module                  Size  Used by
lirc_serial            13184  0
lirc_dev               14348  2 lirc_serial
e100                   31104  0
intel_mch_agp           8848  0
rtc                    12360  0
Back to top
View user's profile Send private message
b0fh
Guru
Guru


Joined: 16 Jun 2003
Posts: 426

PostPosted: Sun Aug 15, 2004 4:12 pm    Post subject: Reply with quote

Any idea where to put that setserial stuff when I want to load lirc-serial automatically?
Back to top
View user's profile Send private message
bkunlimited
l33t
l33t


Joined: 18 Jun 2004
Posts: 672

PostPosted: Mon Aug 16, 2004 11:41 am    Post subject: Reply with quote

hmm... i tried 2 different ways:

1) calling setserial command out of /etc/init.d/serial which is in runlevel "boot" -> no effect
2) calling setserial and modprobe lirc_serial from /etc/init.d/lircd before lirc gets started.
i also failed in second case... i have no idea why :(
Back to top
View user's profile Send private message
bkunlimited
l33t
l33t


Joined: 18 Jun 2004
Posts: 672

PostPosted: Fri Aug 20, 2004 9:39 am    Post subject: Reply with quote

maybe anyone has an idea where to put it??? :?:
Back to top
View user's profile Send private message
mrnegitoro
Tux's lil' helper
Tux's lil' helper


Joined: 30 Jun 2003
Posts: 77
Location: Vancouver, BC.

PostPosted: Tue Aug 24, 2004 5:53 pm    Post subject: Reply with quote

No word on where to put this code still?

Code:
setserial /dev/ttyS0 uart none
Back to top
View user's profile Send private message
bkunlimited
l33t
l33t


Joined: 18 Jun 2004
Posts: 672

PostPosted: Thu Sep 02, 2004 3:26 pm    Post subject: Reply with quote

i have a very strange problem: i can insert the module without any problems. but i can't get irw, mode2 or irxevent to work. any ideas why??
Back to top
View user's profile Send private message
mrnegitoro
Tux's lil' helper
Tux's lil' helper


Joined: 30 Jun 2003
Posts: 77
Location: Vancouver, BC.

PostPosted: Thu Sep 02, 2004 3:50 pm    Post subject: Reply with quote

Is your lircd running? :) Mine is located in /usr/local/sbin/
Back to top
View user's profile Send private message
mrnegitoro
Tux's lil' helper
Tux's lil' helper


Joined: 30 Jun 2003
Posts: 77
Location: Vancouver, BC.

PostPosted: Thu Sep 02, 2004 3:59 pm    Post subject: Reply with quote

Ok, I'm sure it is. Maybe it's a permissions problem? I like to state the obvious :D
Back to top
View user's profile Send private message
bkunlimited
l33t
l33t


Joined: 18 Jun 2004
Posts: 672

PostPosted: Thu Sep 02, 2004 4:57 pm    Post subject: Reply with quote

my lircd is running. it is located in /usr/sbin.
i don't think it is a permissions problem because no such error messages are reported. i created /dev/lirc with the following command:

Code:

mknod -m 0666 /dev/lirc c 61 0


i can paste some parts of /var/log/messages:

Code:

Sep  2 14:40:52 mediab0ne lirc_dev: IR Remote Control driver registered, at major 61
Sep  2 14:40:53 mediab0ne lirc_serial: auto-detected active low receiver
Sep  2 14:40:53 mediab0ne lirc_dev: lirc_register_plugin:sample_rate: 0
Sep  2 14:41:09 mediab0ne 0.7.0pre7[7329]: lircd(serial) ready


the only thing that i could imagine is the following:
obviously irxevent tries to connect to /dev/lirc. that's why i removed /dev/lirc/lirc0 and created /dev/lirc instead.
but that didn't change the behaviour of mode2.

Code:

Sep  2 15:01:06 mediab0ne 0.7.0pre7[7483]: caught signal
Sep  2 15:01:11 mediab0ne 0.7.0pre7[7588]: lircd(serial) ready
Sep  2 15:01:28 mediab0ne 0.7.0pre7[7588]: accepted new client on /dev/lircd
Sep  2 15:01:28 mediab0ne 0.7.0pre7[7588]: could not get file information for /dev/lirc/lirc0
Back to top
View user's profile Send private message
bkunlimited
l33t
l33t


Joined: 18 Jun 2004
Posts: 672

PostPosted: Thu Sep 02, 2004 10:38 pm    Post subject: Reply with quote

i tried the same configuration on a suse 9.1. it also did not work. but i got it running w/o problems with winlirc 0.6.5. so my question is: did i forget to load something on my gentoo?
Back to top
View user's profile Send private message
mrnegitoro
Tux's lil' helper
Tux's lil' helper


Joined: 30 Jun 2003
Posts: 77
Location: Vancouver, BC.

PostPosted: Thu Sep 02, 2004 10:58 pm    Post subject: Reply with quote

I installed lirc using a CVS version http://www.lirc.org/cvs.html. The CVS version created the Kernel modules, I didn't have to use a Kernel patch or anything like that. Excuse me if you used the CVS too, I didn't re-read this entire post. I'm looking for the post that turned me on to using the CVS when I find it I will post a link here... (stupid me didn't bookmark it).
Back to top
View user's profile Send private message
mrnegitoro
Tux's lil' helper
Tux's lil' helper


Joined: 30 Jun 2003
Posts: 77
Location: Vancouver, BC.

PostPosted: Thu Sep 02, 2004 11:00 pm    Post subject: Reply with quote

Here it is...

https://forums.gentoo.org/viewtopic.php?p=1448997
Back to top
View user's profile Send private message
bkunlimited
l33t
l33t


Joined: 18 Jun 2004
Posts: 672

PostPosted: Mon Sep 13, 2004 5:28 pm    Post subject: Reply with quote

unfortunately this was not the reason. i tried the cvs version as you suggested but the result was the same. the kernel module was built properly and i was able to load it and start the lirc daemon. but no application (either irw, or irxevent or mode2) showed any output :(
i'm lost... what could it be?
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum