Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[solution] lirc with pctv remote control
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Multimedia
View previous topic :: View next topic  
Author Message
Sparkster
Apprentice
Apprentice


Joined: 06 Aug 2004
Posts: 205

PostPosted: Sun Dec 14, 2008 8:18 pm    Post subject: Reply with quote

Well, I tried tuxicated method with a few changes. Lirc doesn't support LIRC_OPTS, so I added this to /etc/make.conf
Code:

LIRC_DEVICES="pctv"

I compiled it this way:
Code:

fenix sparkster # LIRC_OPTS="--with-port=/dev/ttyS0" emerge lirc

Every step was OK, but when I run lircd and irw, it shows this output
Code:

fenix sparkster # lircd -n
lircd-0.8.3[18253]: lircd(pctv) ready
lircd-0.8.3[18253]: accepted new client on /dev/lircd
lircd-0.8.3[18253]: could not reset tty
lircd-0.8.3[18253]: caught signal
Terminado
fenix sparkster #


I am running a kernel 2.6.26-gentoo-r4, and lircd 0.8.3. My receiver is a pinnacle miro pctv serial too. Does anybody know where the error is?
Thanks.
Back to top
View user's profile Send private message
Jointy
Tux's lil' helper
Tux's lil' helper


Joined: 23 Dec 2005
Posts: 142
Location: Saarbrücken

PostPosted: Sat Apr 01, 2006 4:18 pm    Post subject: Reply with quote

at first special thanks to you....it works.....

Code:

emerge -av media-sound/alsamixergui
killall irexec
irexec&

_________________
[Host: Arko]
ASUS G1S
http://gentoo-wiki.com/HARDWARE_Asus_G1S
[Host: Pandora]
PIII 1Ghz (133) / 512MB
1x40GB & 60GB (mdRAID1)
Hardened Stage 1 Server
[Host: Plato]
verkauft (OpenSuse 11.0)
Back to top
View user's profile Send private message
gordin
Apprentice
Apprentice


Joined: 11 Oct 2002
Posts: 298
Location: Germany/KO

PostPosted: Sat Apr 01, 2006 11:35 am    Post subject: Reply with quote

1: put the following into /etc/lircrc
Code:

begin
        prog = irexec
        button = Power
        config = /sbin/halt
end

Rename "Power" to whatever you named the button you want to use for shutdown

for 2. install a mixer like amix and put
Code:

begin
        prog = irexec
        button = vol+
        config = /usr/bin/amixer set Master 1+
end
begin
        prog = irexec
        button = vol-
        config = /usr/bin/amixer set Master 1-
end


into /etc/lircrc (once again, rename vol+ and vol- to whatever you named your volume control buttons on the remote)


For more information have a look at "man irexec" and "man irxevent"
_________________
http://www.mockies.de/linuxppc
Back to top
View user's profile Send private message
Jointy
Tux's lil' helper
Tux's lil' helper


Joined: 23 Dec 2005
Posts: 142
Location: Saarbrücken

PostPosted: Sat Apr 01, 2006 10:06 am    Post subject: but how can I shutdown and control alsa Reply with quote

Hy @ll,

specially thanks to you. My Remote Controll works very good.....

Finally I needed only to emerge the lirc-0.7.2 with USE="LIRCD_OPTS=--with-driver=pctv" and start the deamon

But some questions be stayed:

1. How can I shutdown my system through the lircd ???

2. How can I controll my alsa sound globally, some programms need oss support and I use "-oss" in /etc/make.conf as USE Flag ???
(with this flag my TVTime don't have access to the mixer device, but the remotecontroil buttons are working)

^^have some an idea how can i controll my sound globally.....means master Out.....u know ???
Back to top
View user's profile Send private message
troebel
n00b
n00b


Joined: 02 Jan 2006
Posts: 42
Location: Doetinchem, Netherlands

PostPosted: Mon Jan 16, 2006 7:11 pm    Post subject: Reply with quote

You guys are AWESOME!! My remote WORKS, FINALLY!!!!!

I just have a small problem with qingy now... If I add lircd to runlevel "default" it starts like normal (i see "* lircd started" during boot), but my loginmanager is terribly slow and once I'm logged in, lircd is not running anymore. If I start lircd again it works.
If I remove lircd from the default runlevel, qingy is just as fast as normal again.
If anyone has a solution or an idea what might cause this please let me hear.

Thanks again for this thread :D
_________________
d|>_<|b
Back to top
View user's profile Send private message
tuxicated
Tux's lil' helper
Tux's lil' helper


Joined: 02 Nov 2004
Posts: 120

PostPosted: Sun Jan 15, 2006 10:44 am    Post subject: Reply with quote

I need 0.8.0 because I run a recent (2.6.14) kernel.

In the end I got everything working, so here is how I did it:

The configure error is very confusing, and it turns out that it is caused by not having the '--with-port' option set correctly. The PCTV driver support compiles perfectly when I have this in my /etc/make.conf:

Code:

LIRC_OPTS="--with-driver=pctv --with-port=/dev/ttyS0"


If your receiver is on COM2 in stead of COM1, you need to replace the ttyS0 with ttyS1. Another very confusing thing is that you do have to tell lircd not to use the PCTV driver, but a driver called pinsys. Really weird, this driver is not in the list of drivers that you can build and install...

So, in the /etc/conf.d/lircd file, you say:

Code:

LIRCD_OPTS="--driver=pinsys  --device=/dev/ttyS0"


Now make sure your kernel has serial port support loaded:

Code:

dik ~ # dmesg | grep ttyS
ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A
ttyS1 at I/O 0x2f8 (irq = 3) is a 16550A


if you do not see this output, you can try

Code:

modprobe 8250


or else you need to reconfigure your kernel and add the 8250 module. Next, you need the kernel to release its hold on the serial port:

Code:

setserial /dev/ttyS0 uart none


Now you can load the lirc_serial kernel module:

Code:

modprobe lirc_serial


and check if things are OK:

Code:

dik ~ # dmesg | grep lirc
lirc_dev: IR Remote Control driver registered, at major 61
lirc_serial: auto-detected active high receiver
lirc_dev: lirc_register_plugin: sample_rate: 0


Finally, edit /etc/lircd.conf and have it look exactly like this:

Code:

#
# contributed by Bart Alewijnse <scarfboy@yahoo.com>
#
# brand:             Pinnacle Systems
# model:             PCTV Remote (Perhaps other ones as well)
# supported devices: there's only one I know of. (serial)
#
# Mail me if your remote is only partly supported, or if it has different
# buttons than listed below.
#

begin remote

  name  PinnacleSysPCTVRemote
  bits            8
  eps             30
  aeps            100

  one             0     0
  zero            0     0
  gap             180000

  begin codes
    Mute                     0x000000000000003C
    Power                    0x000000000000002F
    Chan+Play                0x000000000000003F
    Chan-Stop                0x000000000000003E
    Vol+FF                   0x000000000000003B
    Vol-Rew                  0x000000000000003D
    1                        0x0000000000000031
    2                        0x0000000000000032
    3                        0x0000000000000033
    4                        0x0000000000000034
    5                        0x0000000000000035
    6                        0x0000000000000036
    7                        0x0000000000000037
    8                        0x0000000000000038
    9                        0x0000000000000039
    Fullscreen               0x000000000000002D
    0/AV                     0x000000000000003A
    Info                     0x000000000000002B
    Preview                  0x000000000000002E
    Record                   0x0000000000000027
    Chan_Last                0x0000000000000025
    F_TV                     0x0000000000000026
    F_TELETEXT               0x0000000000000029
    F_RADIO                  0x000000000000002A

#
# here are some extra buttons a new version of the remote seems to have
#
# contributed by Robbert Monna <rjmonna@kabelfoon.nl>
#
# brand:             Pinnacle Systems
# model:             PCTV Remote (newest version?)
# supported devices: dongle on serial port (from TV-Card)
#
          L                        0x000000000000001F
          Zoom                     0x000000000000001E
          vol+                     0x000000000000001B
          vol-                     0x000000000000000F
          channel+                 0x0000000000000017
          channel-                 0x000000000000001C
          middle                   0x000000000000001A
          Menu                     0x000000000000001D
          next                     0x0000000000000019
          undo                     0x0000000000000016
          pause                    0x0000000000000015
          redo                     0x0000000000000013
          Rewind                   0x000000000000000E
          Play                     0x000000000000000D
          Stop                     0x000000000000000B
          FForward                 0x0000000000000007
          EPG                      0x0000000000000018

# here are some more buttons that seem to be mapped differently from
# the ones above

# contributed by InterCeptor ceptor_7@freemail.hu
#
# brand:   Pinnacle Systems PCTV Pro Remote
# model no. of remote control: (I can't find any numbers on it)
# supported devices: serial
#

          9                        0x0000000000000082
          Zoom                     0x00000000000000B2
          middle                   0x0000000000000014


  end codes
end remote


You can also get the above configuration from the lirc sources. Now you can load lircd and add it to your boot scripts:

Code:

/etc/init.d/lircd start
rc-update add lircd default


Running

Code:

irw


and pressing some buttons should now show the names of each button you press.

One final hint: You can automate the releasing of the serial port on boot by adding a file called 'lirc' to /etc/modules.d and have it look like this:

Code:

pre-install lirc_serial setserial /dev/ttyS0 uart none


and don't forget to have the lirc_serial kernel module loaded on boot by adding it to /etc/modules.autoload.d/kernel-2.6.

Hopefully this mini-howto will make things a little more clear.
Back to top
View user's profile Send private message
gordin
Apprentice
Apprentice


Joined: 11 Oct 2002
Posts: 298
Location: Germany/KO

PostPosted: Sat Jan 14, 2006 7:11 pm    Post subject: Reply with quote

Hmm, it it some time ago that I configured lirc... I never had any problems with updates
Only thing I could imagine is that you have forgotten to compile generic serial support (CONFIG_SERIAL_8250, directly into the kernel or as a module)
On the other hand, lirc-0.8.0_pre1 is not stable... might be that it is broken for pctv
Have you tried version 0.7.0-r1 (last stable version in portage-tree). Or is there a certain reason that you want to install 0.8.0_pre1?
_________________
http://www.mockies.de/linuxppc
Back to top
View user's profile Send private message
tuxicated
Tux's lil' helper
Tux's lil' helper


Joined: 02 Nov 2004
Posts: 120

PostPosted: Sat Jan 14, 2006 5:00 pm    Post subject: Reply with quote

I also own a Pinnacle PCTV card with serial-port IR Receiver. But when I try to emerge Lirc (version 0.8.0_pre1) it says the pctv driver cannot be installed on my system:

Code:

checking for scsi/sg.h... yes
checking linux/input.h usability... yes
checking linux/input.h presence... yes
checking for linux/input.h... yes
checking sys/soundcard.h usability... yes
checking sys/soundcard.h presence... yes
checking for sys/soundcard.h... yes
configure: error: *** it is not possible to install the specified driver
        on this system


Does anybody know what the problem is? What else do I need to install the pctv driver?
Back to top
View user's profile Send private message
mndar
n00b
n00b


Joined: 04 Apr 2005
Posts: 49

PostPosted: Sun Oct 02, 2005 7:43 am    Post subject: Thnx Reply with quote

Thnx guyz. All your posts were helpful. It turns out lirc was working fine. I just had to create a symlink /dev/lirc0 to /dev/ttyS0. Thnx alib. I think adding LIRC_OPTS="--with-driver=pctv --with-port=/dev/ttyS0" in make.conf is a better idea. Also after doing that and emerging lirc, I didn't have to search of the pctv conf file, it was automatically installed in /etc/lircd.conf
_________________
Gentoo on Freerunner 2014-02-25 http://mndar.phpnet.us/freerunner/gentoo/
GStreamer XOverlay and VideoOverlay http://mndar.phpnet.us/gstreamer
Back to top
View user's profile Send private message
flax
n00b
n00b


Joined: 29 Apr 2004
Posts: 12

PostPosted: Sat May 01, 2004 8:00 pm    Post subject: Re: [solution] lirc with pctv remote control Reply with quote

gordin wrote:
First edit the ebuilt for lirc (at this time the file is /usr/portage/app-misc/lirc/lirc-0.7.0_pre2.ebuid) and replace --with-driver=serial with --with-driver=pctv and --with-port=0x3f8 with --with-port=/dev/ttyS0 (or to any other serial port device, where you have connected your receiver) in LIRC_OPTS. delete the entry --with-irq=4.

Instead of editing the ebuild you should add your LIRC_OPTS options to the /etc/make.conf file.

When doing it this way you don't have to update your ebuild again after an emerge sync. :wink:
Back to top
View user's profile Send private message
alitz
n00b
n00b


Joined: 29 Apr 2004
Posts: 1

PostPosted: Thu Apr 29, 2004 12:51 am    Post subject: Thanks! + more info Reply with quote

You're a lifesaver! Here is a little more info regarding my experience that may help someone...

1. You do not have to change the "Standard/generic (8250/16550 and compatible UARTs) serial support" for 2.4 kernels to module (M) from staticly compiled (*) in your kernel. It's hard to tell in the lirc docs whether or not it's necessary to do so. I believe the default in the 2.4 kernel is to staticly compile the serial support so you may not have to do anything here.

2. delete the /etc/conf.d/lircd file. It probably only has one line telling lircd to use /dev/lirc/lirc0 or similar as the device. you can make it work this way, but it's probably simpler to just use /dev/lirc.

3. if it doesn't already exist, create a symlink from /dev/lirc to /dev/ttyS0

4. I had to get the serial driver in the kernel to release it's hold on COM1 (/dev/ttyS0) before lircd could use it. to do this: root# setserial /dev/ttyS0 uart 16550a
You can tell if you need to do this or not when you try to test out irw. If you start irw and it dies immediately taking lircd with it check the lircd log (/var/log/lircd). If you see an entry like "caught signal" then irw killed your lircd. start lircd again, enter the setserial command above, and the try irw again. hopefully it will work for you like it did for me!

-ajl
Back to top
View user's profile Send private message
gordin
Apprentice
Apprentice


Joined: 11 Oct 2002
Posts: 298
Location: Germany/KO

PostPosted: Fri Dec 19, 2003 11:24 pm    Post subject: [solution] lirc with pctv remote control Reply with quote

I had problems with getting lirc working with my remote control from Pinnacle Sys. (connected to the serial port)
I couldn't find any helpfull entry in the forums.
So I rtfm. And rtfm again. And searched again. Rtfm once more and finally got it working :-)

First edit the ebuilt for lirc (at this time the file is /usr/portage/app-misc/lirc/lirc-0.7.0_pre2.ebuid) and replace --with-driver=serial with --with-driver=pctv and --with-port=0x3f8 with --with-port=/dev/ttyS0 (or to any other serial port device, where you have connected your receiver) in LIRC_OPTS. delete the entry --with-irq=4.
Then
Code:
emerge lirc

Now you need a lirc.conf appropiate for your remote.
The lircd.conf.pctv you can find somewhere on www.lirc.org didn't work for me. But you can give it a try.
I generate my own with
Code:
irrecord [outputfile]

You have to start lircd first
Code:
/etc/init.d/lircd start


copy [outputfile] to /etc/lircd.conf
restart lircd
start the program irw
When pressing a button on the remote control you should see the code on the console
_________________
http://www.mockies.de/linuxppc
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Multimedia 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