View unanswered posts    View active topics

All times are UTC - 6 hours





Post new topic Reply to topic  [ 11 posts ] 
Print view Previous topic   Next topic  
Author Message
Search for:
 Post subject: LIRC issue with R8
PostPosted: Mon Dec 23, 2013 9:50 pm 
Offline
Joined: Wed Mar 21, 2012 7:59 am
Posts: 63
I have got R8.0 mostly working, just in time for R8.1, with the exception of one big annoyance with getting my IR serial receiver to initialize at boot. I searched the forums and couldnt find anyone else with the issue, so here it goes:

I have my remote configured correctly on ttyS1 on Service Menu > Linhes Configuration > Remotes. When rebooting the system, the remote is non-responsive. To get it to work again, I need to go back into the "remotes" section of the Linhes configuration, change my serial port to an unused port such as ttyS0 or ttyS2, and hit finish so it saves the config. Then I must go back in again and change it back to the correct config, ttyS1, and hit finish. After this config is saved, then the remote is working again.

I am running the One4All URC-6131, with a custom lircd.conf and lircrc file, but I do not think that remote or the custom files are the issue, since I have been using them for years with no problem. I think the issue lies with having lirc initialize correctly during the boot process, so perhaps there is something with the startup script?

Here is a copy of my /var/log/lirc

(FYI - frontend is named 'love')

Code:
Dec 23 21:01:51 love lircd: caught signal
Dec 23 21:02:24 love lircd: lircd(default) ready, using /var/run/lirc/lircd
Dec 23 21:02:34 love lircd: accepted new client on /var/run/lirc/lircd
Dec 23 21:02:34 love lircd: could not get file information for /dev/remotes/serial_lirc
Dec 23 21:02:34 love lircd: default_init(): No such file or directory
Dec 23 21:02:34 love lircd: WARNING: Failed to initialize hardware
Dec 23 21:02:39 love lircd: accepted new client on /var/run/lirc/lircd


Then, here is what my log displays immediately after these lines, once I re-configure the serial port through the service menu

Code:
Dec 23 21:05:41 love lircd: accepted new client on /var/run/lirc/lircd
Dec 23 21:05:50 love lircd: caught signal
Dec 23 21:06:04 love lircd: lircd(default) ready, using /var/run/lirc/lircd
Dec 23 21:06:04 love lircd: accepted new client on /var/run/lirc/lircd
Dec 23 21:06:04 love lircd: accepted new client on /var/run/lirc/lircd


As you can see, there is a Warning and failure to initialize hardware during the boot portion of the log, but no such warning when I set the port manually.

Everything looks good in the /etc/systemconfig file and the /etc/modules.mythvantage file. I can post those two if helpful.

Any help or suggestions would be great, as I am stumped by this. I am even ok with just creating a script to initialize things properly upon boot if someone might be able to help me figure out how to to that.

Thanks


Top
 Profile  
 
 Post subject: Re: LIRC issue with R8
PostPosted: Tue Dec 24, 2013 8:13 am 
Offline
Site Admin
Joined: Fri Jun 11, 2004 7:58 am
Posts: 507
There is supposed to be a udev rule that sets up a link for each specific receiver into /dev/remotes/
It looks like this isn't happening on boot, so I will have to look into it.

There is a way to setup lirc exactly like you want and thats by creating the file
"/etc/runit/lirc.sh" and putting all your startup commands in it. The remote start up script will use that file and skip everything else in the rest of the file. /etc/runit/lirc.sh MUST NOT TERMINATE with a normal condition, if it does it will continue to be run every couple secs and then be disabled.

Code:
if [ -x /etc/runit/lirc.sh ]
then
    #program must not terminate.
    stat_runit "Starting remotes from /etc/runit/lirc.sh"
    echo "Starting remotes from /etc/runit/lirc.sh" >>$LOG
    /etc/runit/lirc.sh
else


http://www.linhes.org/projects/linhes/w ... unitlircsh

Finally instead of entering and leaving the service menu to force the config to be rerun, it's possible to force the reconfig with. "systemconfig.py -m ir".


Please open a bug about this so I don't forget.


Top
 Profile  
 
 Post subject: Re: LIRC issue with R8
PostPosted: Wed Dec 25, 2013 5:59 am 
Offline
Joined: Tue Jan 23, 2007 1:38 pm
Posts: 249
Location: Sweden
Thanks for this!
I have been scratching my head over this issue as well!

Thanks,
/Chris

_________________
LinHES R8.6.1
BE: AMD64X4, 4GB, Hauppauge usb tuners
FE1: Gigabyte F2A85X-UP4, nVidia GT640
FE2: Gigabyte GA-MA69GM-S2H, AthlonX2 4850E 2.5 GHz, 1GB, ASUS GEFORCE 7200GS 256MB
FE3: Asus Eeebox410


Top
 Profile  
 
 Post subject: Re: LIRC issue with R8
PostPosted: Thu Dec 26, 2013 3:58 pm 
Offline
Site Admin
Joined: Fri Jun 11, 2004 7:58 am
Posts: 507
Think I found the problem.

lirc_serial was being loaded at boot without parameters, so it defaults to com1. This of course doesn't work for anything but com1 so it would appear to fail.
That also explains why it worked from within the service menu, because it unloads and loads lirc_serial with the correct parameters.


A fix will be commited shortly.


Top
 Profile  
 
 Post subject: Re: LIRC issue with R8
PostPosted: Thu Dec 26, 2013 4:09 pm 
Offline
Joined: Wed Mar 21, 2012 7:59 am
Posts: 63
Thanks Jams. I tried to write a lirc.sh script to get things going correctly with no success (I am a noob), so I will wait for the update to hit the repo!


Top
 Profile  
 
 Post subject: Re: LIRC issue with R8
PostPosted: Thu Dec 26, 2013 4:22 pm 
Offline
Site Admin
Joined: Fri Jun 11, 2004 7:58 am
Posts: 507
for a quick test you could edit /etc/modules.mythvatnage and comment out lirc_serial . Either remove the line or place a # in front of it.

After rebooting it should work, that is if the values in /etc/systemconfig are correct for your com port.


Top
 Profile  
 
 Post subject: Re: LIRC issue with R8
PostPosted: Thu Dec 26, 2013 4:49 pm 
Offline
Joined: Wed Mar 21, 2012 7:59 am
Posts: 63
Cool, I will try that when I get home and report back. Thanks!


Top
 Profile  
 
 Post subject: Re: LIRC issue with R8
PostPosted: Thu Dec 26, 2013 10:25 pm 
Offline
Joined: Wed Mar 21, 2012 7:59 am
Posts: 63
Unfortunately, updating modules.mythvantage as suggested did not fix the issue. No change in outcome. Remote does not work after reboot, but changing to a different port, then changing back does fix it.


Top
 Profile  
 
 Post subject: Re: LIRC issue with R8
PostPosted: Fri Dec 27, 2013 11:01 am 
Offline
Site Admin
Joined: Fri Jun 11, 2004 7:58 am
Posts: 507
Pushed what might fix the problem, update the packages runit-scripts and optionally LinHES-config.
If LinHES-config is not updated that make sure that /etc/modules.mythvantage is removed each time after visiting the service menu.
Since your not on 8.1 I'm not for sure what else LinHES-config may drag in.

1) pacman -Sy runit-scripts
2) reboot
2.5) make note if the remote is working
3) cp /tmp/remotes.log /home/mythtv/remotes.log.boot
4) do whatever you normally do to get the remote to work
4.5) verify remote is working
5) cp /tmp/remotes.log /home/mythtv/remotes/log.works
6) email both logs to (jams @ linhes.org ) or attach them to ticket #950

The log file is overwritten every time remotes is started, so it's important to make copies for working and non-working.


Top
 Profile  
 
 Post subject: Re: LIRC issue with R8
PostPosted: Fri Dec 27, 2013 11:23 pm 
Offline
Joined: Wed Mar 21, 2012 7:59 am
Posts: 63
Updated the bug report.


Top
 Profile  
 
 Post subject: Re: LIRC issue with R8
PostPosted: Fri Jan 03, 2014 9:34 am 
Offline
Joined: Wed Mar 21, 2012 7:59 am
Posts: 63
Issue resolved thanks to the latest runit-scripts-8.1-7 created by Jams in the repo. Anyone else with this issue - see bug report for more info

http://linhes.org/issues/950


Top
 Profile  
 

Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 11 posts ] 


All times are UTC - 6 hours




Who is online

Users browsing this forum: No registered users and 25 guests


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:  
cron
Powered by phpBB® Forum Software © phpBB Group

Theme Created By ceyhansuyu