View unanswered posts    View active topics

All times are UTC - 6 hours





Post new topic Reply to topic  [ 35 posts ] 
Go to page 1, 2, 3  Next

Print view Previous topic   Next topic  
Author Message
Search for:
 Post subject: Lirc basics anyone?
PostPosted: Sat Jan 06, 2007 7:26 pm 
Offline
Joined: Tue Jan 02, 2007 9:00 pm
Posts: 76
Hi

I got my mythbox already working with sound and aceptable picture quality, after some months of working on it, now I want it to work with a remote control. Can anyone point me in the right direction, I've read everything but I can't find any page that teaches me the very basics of LIRC, I do not even know where to start... Can anybody tell me were to start? to I have to download it and compile it or it allready comes with KNOPPMYTH??? I would really apreciate your help. (Yes I am a newbie)


Top
 Profile  
 
 Post subject:
PostPosted: Sun Jan 07, 2007 12:39 am 
Offline
Joined: Mon Mar 13, 2006 2:28 am
Posts: 143
Location: Brisbane, Australia
You may or may not have to download and compile. I use the imon-pad remote, which did require a compile, but I've also used a leadtek remote, which didn't. So, let's start with what remote do you have, and which version of KnoppMyth are you running?


Top
 Profile  
 
 Post subject:
PostPosted: Sun Jan 07, 2007 11:34 am 
Offline
Joined: Tue Jan 02, 2007 9:00 pm
Posts: 76
Hi, thanks in advance for your help...

I have the pinnacle systems remote control, I think is pretty much the same one for PCTV cards, some have a smaller one, but this one is pretty much the "standard" remote for these cards (it does not have model number)

Image

My MYTHTV Version is 0.18.1.20050523-1 (this is what it says under system status)

Thanks again in advance for your help, I really appreciate it!


Top
 Profile  
 
 Post subject:
PostPosted: Sun Jan 07, 2007 11:49 am 
Offline
Joined: Mon Aug 29, 2005 4:04 pm
Posts: 729
Location: Philadelphia, PA US
Are you running KnoppMyth? If so what version?
Code:
 cat /etc/KnoppMyth-version


Newer versions of KM have a script to configure the major remotes.

From command line run
Code:
lirc-reconfig.sh


Then just choose the appropiate pinnacle remote.


Top
 Profile  
 
 Post subject:
PostPosted: Sun Jan 07, 2007 12:24 pm 
Offline
Joined: Tue Jan 02, 2007 9:00 pm
Posts: 76
Hi, thanks for your help.

When I run:
Quote:
cat /etc/KnoppMyth-version

it tells me

R5 ALPHA 30.1

When I run:
Quote:
cat /etc/KnoppMyth-version

and gives me the option for all the remotes, I choose option 29)Pinacle_Systems and then it gives me the following message...

Sorry, I don't have details on setting up your remote, Please contact Knoppmyth@gmail.com with details on your remote


Top
 Profile  
 
 Post subject:
PostPosted: Sun Jan 07, 2007 3:10 pm 
Offline
Joined: Mon Aug 29, 2005 4:04 pm
Posts: 729
Location: Philadelphia, PA US
Did you check out this post ? http://mysettopbox.tv/phpBB2/viewtopic. ... cle+remote


Top
 Profile  
 
 Post subject:
PostPosted: Sun Jan 07, 2007 4:52 pm 
Offline
Joined: Tue Jan 02, 2007 9:00 pm
Posts: 76
I did but I do not know how to do this first part (i'm a newbie)...

Quote:
1. Replace /etc/lirc/lircd.conf and /home/mythtv/.mythtv/lircrc (if needed reset rights with: chown mythtv:109 lircrc).
These files can be used for the conf file:
/usr/local/share/knoppmyth/remotes/pctv/etc/lircd.conf
or
/usr/share/lirc/remotes/pinnacle_systems/lircd.conf.pctv
The lircrc is not available in the distro; change manually (see below) or google.



He says REPLACE.... replace by what? and how do I replace theses files? If needed reset rights? how do I do this? and then, "these files can be used for the conf file" how? do I have to enter the content of these files into the conf file? do I have to move these files to the directory?


Top
 Profile  
 
 Post subject:
PostPosted: Sun Jan 07, 2007 6:17 pm 
Offline
Joined: Mon Aug 29, 2005 4:04 pm
Posts: 729
Location: Philadelphia, PA US
So 1stly do you know the linux basics? Copying a file, finding your KM's box's IP, ssh into your KM box?

I suggest you read this intro to some basics of linux 1st and the KnoppMyth manual.

http://knoppmythwiki.org/index.php?page=LinuxTips

I am not a lirc expert but this is how I understand it works.

Lirc communicates with your IRreciever, /etc/lirc/hardware.conf controls this communication piece.

Lirc uses the /etc/lirc/lircd.conf file to reconize the infrared signals sent by your remote and to convert the hexidecimal codes button presses into names. So I press the "Play" button and lircd.conf is configured to take that hex value (ie 0x0000000123) and assign it into a button name (ie PLAY). irw is a command line tool to troubleshoot if the reciever is picking up the remote codes.

Lirc uses the /home/mythtv/.lircrc file to send those button names to lircrc aware programs such as MythTV, Xine, and Mplayer. So that "PLAY" function may do a function in MythTV and another function in Xine or Mplayer.

That is how lirc works...

Reading that post on pinnacle R5D1 install.

Using the root user,

1st command is to backup all 3 files you are going to modify.

Code:
cp /etc/lirc/hardware.conf /etc/lirc/hardware.conf.bak
cp /etc/lirc/lircd.conf /etc/lirc/lircd.conf.bak
cp /home/mythtv/.mythtv/lircrc /home/mythtv/.mythtv/lircrc.bak


2nd command

Code:
pico /etc/lirc/hardware.conf


edit the file to do these two changes
Quote:
- Change DRIVER="default" to DRIVER="pinsys"
- Disable the line with MODULES by prefixing #.



3rd command

Code:
cp /usr/local/share/knoppmyth/remotes/pctv/etc/lircd.conf  /etc/lirc/lircd.conf

If it says file not found let me know, I have a R5D1 install I could grab file from.

4th

Jis said a lircrc file didn't exist for that remote. So you will have to create one.

Code:
pico /home/mythtv/.mythtv/.lircrc 

Paste that code Jis has marked as code into /home/mythtv/.lircrc

5th change the owner on all the files to mythtv user

Code:
chown mythtv /etc/lirc/hardware.conf
chown mythtv /etc/lirc/lircd.conf
chown mythtv  /home/mythtv/.mythtv/lircrc


That lircrc file is real basic may want to look on improving it.


Top
 Profile  
 
 Post subject:
PostPosted: Sun Jan 07, 2007 8:15 pm 
Offline
Joined: Tue Jan 02, 2007 9:00 pm
Posts: 76
spalVl I cannot thank you enough!!!!

I finally have the remote working, that file that jis has there does not exactly match the buttons of my remote though, its for a control that has a lot fewer keys than mine, but I guess it is just a matter of finding the right file for my remote and paste it on the .lircrc file. One last question if you happen to read this, is there a graphical web browser on the fluxbox backend? I could not find one and had to edit the .lircrc manually, since I did not have a place to copy it from...

Anyway, thank a lot for your help, I really appreciate you taking the time to explain this to me.


Top
 Profile  
 
 Post subject:
PostPosted: Sun Jan 07, 2007 8:50 pm 
Offline
Joined: Thu Mar 25, 2004 11:00 am
Posts: 9551
Location: Arlington, MA
Setting up some kind of ssh/vnc/nfs/samba access to your KM box so you can cut and paste is highly recommended. There is at least one good page on the wiki with details on setting up remote access for MS-Windows users. If you're browsing from some other OS, YMMV.


Top
 Profile  
 
 Post subject:
PostPosted: Sun Jan 07, 2007 8:59 pm 
Offline
Joined: Mon Aug 29, 2005 4:04 pm
Posts: 729
Location: Philadelphia, PA US
:D Glad to hear you got it working. Pay it forward by creating a great lircrc file and send it to the developers and for future release.

la_tengo_como_burro wrote:
but I guess it is just a matter of finding the right file for my remote.


If you can't find a lircrc file on the web, just create one from scratch. The one Jis is basic. Use something like this one as a template http://mysettopbox.tv/phpBB2/viewtopic.php?t=9926 and change the button names to ones in your lircd.conf.

Quote:
is there a graphical web browser on the fluxbox backend?


What tjc said, SSH and WinSCP are my most bestest friends...


Top
 Profile  
 
 Post subject:
PostPosted: Sun Jan 07, 2007 9:35 pm 
Offline
Joined: Tue Jan 02, 2007 9:00 pm
Posts: 76
I actualy found one .lircrc file on the web for my same remote and here it is...

Quote:
#
# contributed by Bart Alewijnse
#
# 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 0×000000000000003C
Power 0×000000000000002F
Chan+Play 0×000000000000003F
Chan-Stop 0×000000000000003E
Vol+FF 0×000000000000003B
Vol-Rew 0×000000000000003D
1 0×0000000000000031
2 0×0000000000000032
3 0×0000000000000033
4 0×0000000000000034
5 0×0000000000000035
6 0×0000000000000036
7 0×0000000000000037
8 0×0000000000000038
9 0×0000000000000039
Fullscreen 0×000000000000002D
0 0×000000000000003A
Info 0×000000000000002B
Preview 0×000000000000002E
Record 0×0000000000000027
Chan_Last 0×0000000000000025
F_TV 0×0000000000000026
F_TELETEXT 0×0000000000000029
F_RADIO 0×000000000000002A

#
# here are some extra buttons a new version of the remote seems to have
#
# contributed by Robbert Monna
#
# brand: Pinnacle Systems
# model: PCTV Remote (newest version?)
# supported devices: dongle on serial port (from TV-Card)
#
L 0×000000000000001F
Zoom 0×000000000000001E
vol+ 0×000000000000001B
vol- 0×000000000000000F
channel+ 0×0000000000000017
channel- 0×000000000000001C
middle 0×000000000000001A
Menu 0×000000000000001D
next 0×0000000000000019
undo 0×0000000000000016
pause 0×0000000000000015
redo 0×0000000000000013
Rewind 0×000000000000000E
Play 0×000000000000000D
Stop 0×000000000000000B
FForward 0×0000000000000007
EPG 0×0000000000000018

# 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 0×0000000000000082
Zoom 0×00000000000000B2
middle 0×0000000000000014

end codes
end remote

Then, make sure lircd is started at boot:

# chkconfig –level 345 lirc on
# service lircd start

And also, MythTV, when compiled with support for LIRC, can be configured to natively connect to the UNIX socket /dev/lircd that is managed by the lircd daemon by creating a file called “~/.mythtv/lircrc” with the following contents:

# lircrc.example.HauppaugeGrey-nativelirc
# 2003-09-17, Robert Kulagowski
# mailto:rkulagow@rocketmail.com
# Save this file in ~/.mythtv/lircrc

begin
prog = mythtv
button = Power
config = Esc
end

begin
prog = mythtv
button = Go
# Swap the PiP windows
config = N
end

begin
prog = mythtv
button = 1
config = 1
end

begin
prog = mythtv
button = 2
config = 2
end

begin
prog = mythtv
button = 3
config = 3
end

begin
prog = mythtv
button = 4
config = 4
end

begin
prog = mythtv
button = 5
config = 5
end

begin
prog = mythtv
button = 6
config = 6
end

begin
prog = mythtv
button = 7
config = 7
end

begin
prog = mythtv
button = 8
config = 8
end

begin
prog = mythtv
button = 9
config = 9
end

begin
prog = mythtv
button = 0
config = 0
end

begin
prog = mythtv
button = Menu
config = M
end
begin
prog = mythtv
button = undo
config = Esc
end

# Below are keys used with the Hauppauge Grey remote

#begin
# prog = mythtv
# This is the Red key
# We’ll use it for “Delete”
# button = Record
# config = D
#end

#begin
# prog = mythtv
# This is the Green key
# We’ll use it for “Information”
# button = Green
# config = I
#end

# Note the “repeat =” strings in the volume and channel.
# This means that if you hold down the key, every nth instance will be
# passed. This depends on your system, so you may want to increase or
# decrease this and see what happens. repeat = 1 is probably too
# fast.

begin
prog = mythtv
# Use it as a volume key
button = vol-
repeat = 3
config = F10
end

begin
prog = mythtv
button = vol+
repeat = 3
config = F11
end

begin
prog = mythtv
button = Chan+Play
repeat = 3
config = Up
end

begin
prog = mythtv
button = channel+
repeat = 3
config = Up
end

begin
prog = mythtv
button = Chan-Stop
repeat = 3
config = Down
end

begin
prog = mythtv
button = channel-
repeat = 3
config = Down
end

begin
prog = mythtv
button = Vol-Rew
# This is the “left” on the central diamond
repeat = 3
config = Left
end

begin
prog = mythtv
button = Vol+FF
# This is the “right” on the central diamond
repeat = 3
config = Right
end

begin
prog = mythtv
# Middle button on the diamond
button = middle
config = Return
end

begin
prog = mythtv
button = Mute
config = F9
end

#begin
# prog = mythtv
# Change focus for PiP (to change channel in the other window)
# button = Blank
# config = B
#end

begin
prog = mythtv
# Toggle PiP on/off
button = Fullscreen
config = V
end

#begin
# prog = mythtv
# button = Rew
# config = Left
#end

begin
prog = mythtv
button = Play
config = P
end

begin
prog = mythtv
button = FForward
config = Right
end

begin
prog = mythtv
button = Record
config = R
end

begin
prog = mythtv
# Teletext
button = Stop
config = T
end

begin
prog = mythtv
button = pause
config = P
end

#begin
# prog = mythtv
# button = Replay
# Use for backwards commercial skip
# config = Q
#end

begin
prog = mythtv
button = next
# Use for forward commercial skip
config = Z
end


I've used actualy used WinSCP before on this box, but what scares me is that I do not know hot to share directories under linux, etc. I'll guess I'll find out by playing with it... again, thanks a lot for all your help!!!


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jan 08, 2007 12:21 am 
Offline
Joined: Tue Jan 02, 2007 9:00 pm
Posts: 76
I messed up everything with WINSCP, I created a file in windows called lircrc and pasted the info for my control there and I replaced the one that I had with the new one using Winscp now nothing works, I've tried to restore it using the lircrc.bak file and it din't work, I tried following the instructions from the beginning and that did not work either, I do not understan what is the relation of the .lircrc file with the normal lircrc file. Does one replace the other at some point? and what is the file named lircrc~ I've been two here more than two hours trying to figure this out and nothing :( what did I do wrong???


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jan 08, 2007 10:19 am 
Offline
Joined: Mon Apr 10, 2006 3:48 pm
Posts: 997
Location: Lexington, Ky
You have come across a problem with files that are saved on a window platform. It wasn't winscp but your windows editor that hosed the file. Your window's editors put a dos "end of line" codes at the end of each line. Unix does like them a will fail to read the file correctly.

You need to edit the file once you have moved it to your myth box.

From a ssh session cat file "cat file_name" and you will see that you have ^M's at the end of each line.

To remove them I'd use vi (a unix editor) type:

vi file_name

then

:%s/^M//g

BE SURE YOU MAKE the ^M USING "CTRL-V CTRL-M" NOT BY TYPING "CARROT M"! This expression will replace all the ^M's that have carriage returns after them with nothing.

Once the ^M are gone you file will be ok


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jan 08, 2007 7:24 pm 
Offline
Joined: Tue Jan 02, 2007 9:00 pm
Posts: 76
Hi, first of all, thanks a lot for your help.

You were right the files and he ^M at the end, I removed all of them using your procedure and still the remote does not work. I am doing everything that was explained to me in previous posts. Do I have to run a command after i'm done with the configuration to have it working? Are .lircrc and lircrc files supposed to have the same content? What am I doing wrong???, i'm sure is something really simple that i'm not doing


Top
 Profile  
 

Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 35 posts ] 
Go to page 1, 2, 3  Next



All times are UTC - 6 hours




Who is online

Users browsing this forum: No registered users and 1 guest


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 post attachments in this forum

Jump to:  
Powered by phpBB® Forum Software © phpBB Group

Theme Created By ceyhansuyu