View unanswered posts    View active topics

All times are UTC - 6 hours





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

Print view Previous topic   Next topic  
Author Message
Search for:
PostPosted: Thu Jul 31, 2014 11:30 am 
Offline
Joined: Mon Apr 10, 2006 3:48 pm
Posts: 884
Location: Lexington, Ky
I'm working on getting an HD PVR 1212 up and running on LH 8.1 I've managed to get the device configured and can watch live TV and record from the channel that is selected on the cable box.

Now I'd like to get the ir blaster working.
I've had a look through the Mythtv wiki "Steps to Enable IR Transmitter".

I added a entry for the blaster in the lirc.conf file

Before loading lirc_zilog I can do
irsend LIST "" ""
and it returns
irsend: Hauppauge_350
irsend: blaster

I can modprobe lirc_zilog and it loads with no errors in dmesg
Code:
[   40.234796] lirc_zilog: module is from the staging directory, the quality is unknown, you have been warned.
[   40.235044] lirc_zilog: Zilog/Hauppauge IR driver initializing
[   40.238614] lirc_zilog: probing IR Rx on Hauppage HD PVR I2C (i2c-2)
[   40.238650] lirc_zilog: probe of IR Rx on Hauppage HD PVR I2C (i2c-2) done. Waiting on IR Tx.
[   40.238652] lirc_zilog: probe of IR Rx on Hauppage HD PVR I2C (i2c-2) done
[   40.238660] lirc_zilog: probing IR Tx on Hauppage HD PVR I2C (i2c-2)
[   40.299744] i2c i2c-2: lirc_dev: driver lirc_zilog registered at minor = 1
[   40.299748] lirc_zilog: IR unit on Hauppage HD PVR I2C (i2c-2) registered as lirc1 and ready
[   40.299751] lirc_zilog: probe of IR Tx on Hauppage HD PVR I2C (i2c-2) done
[   40.299777] lirc_zilog: initialization complete
.
Now I have some questions:

#1. How do I get this to load automatically at startup?

I created a /etc/lirc/hardware.conf as suggested and configure it for /dev/lirc1 which gets created when I load lirc_zilog. I also think I may need another process ie: lircd1 but have no idea how to get that created. It was mentioned in a ubuntu thread.

#2 is this the correct location hardware.conf and do I really need it? I have read somewhere that it may not be needed.

After running modprobe lirc_zilog and then trying irsend
Code:
[root@mythtv lirc]# irsend SEND_ONCE blaster 0_1_KEY_POWER
irsend: command failed: SEND_ONCE blaster 0_1_KEY_POWER
irsend: hardware does not support sending

Or this:
Code:
[root@mythtv lirc]# irsend -d /dev/lirc1 SEND_ONCE DTA100 KEY_1
irsend: could not connect to socket
irsend: Connection refused

#3 How do I get this to work? The above mentioned ubuntu thread it needed to be
Code:
irsend -d /dev/lircd1 SEND_ONCE DTA100 KEY_1

But since that isn't created I'm not sure.

#4 I also know I will need a channel change script and is wondering if there a recommended one out there somewhere. My STB is a scientific atlanta 4250hdc

If you have any other tips or suggestions let me know.

Thanks
Tim


Top
 Profile  
 
PostPosted: Sat Aug 02, 2014 7:55 pm 
Offline
Joined: Mon Apr 10, 2006 3:48 pm
Posts: 884
Location: Lexington, Ky
Note: If you add or remove hardware the lircd(x) number could change. You may have to go back and check with dmesg and update scripts.

Ok it's been a long weekend but this is how I made it work. I still need some help on how to have it do these steps at boot time but here goes.

After a reboot -

Load the HD_PVR Blaster driver by running:

modprobe lirc_zilog

use dmesg to see the results and get the device that it registered as, in my case lirc1

Start a second lircd using the following command:

/usr/sbin/lircd -r -d /dev/lirc1 --output=/var/run/lirc/lircd1 --pidfile=/var/run/lirc/lircd1.pid --listen=8761

After lircd1 is created run the stb power on script. My STB use 0_41 codes so you my have to adjust that number to the code needed for your STB.
----------------------

#!/bin/sh
###################
# power_on_stb.sh
###################

echo 0_1_KEY_POWER
irsend -d /var/run/lirc/lircd1 SEND_ONCE blaster 0_41_KEY_POWER
exit
----------------------

You also need a channel change script, so far this one is working well.

#!/bin/bash
###################
# channel_change.sh
###################

REMOTE_NAME=blaster
DEVICE=/var/run/lirc/lircd1
SLEEP_TIME="0.2"
STB=0_41

send () {
irsend --device=${DEVICE} SEND_ONCE ${REMOTE_NAME} ${STB}_${1}
sleep ${SLEEP_TIME}
}

for DIGIT in $(echo ${1} | sed -e 's/./& /g'); do
send KEY_${DIGIT}
done

send KEY_ENTER

#
# If your cable box is slow to change channels, sleep so that Mythtv doesn't
# move forward until after the resolution has changed
#
#sleep 3
exit
------------------------

Not sure is the best way to do it so any thoughts would be appreciated.

One thing I do see that I don't like are messages in dmesg that says:
Code:
[ 7257.927109] lirc_zilog: i2c_master_recv failed with -5 -- keeping last read buffer
[ 7257.971737] lirc_zilog: i2c_master_recv failed with -5 -- keeping last read buffer
[ 7259.141193] lirc_zilog: i2c_master_recv failed with -5 -- keeping last read buffer
[ 7259.185942] lirc_zilog: i2c_master_recv failed with -5 -- keeping last read buffer


This keeps repeating I think at ever command but not sure on that.

Tim

Note: If you add or remove hardware the lircd(x) number could change. You may have to go back and check with dmesg and update scripts.


Last edited by tscholl on Wed Jun 03, 2015 12:08 pm, edited 3 times in total.


Top
 Profile  
 
PostPosted: Fri Aug 15, 2014 1:49 pm 
Offline
Joined: Sun Jul 24, 2005 4:16 pm
Posts: 499
Location: Ft. Worth TX
I've been fooling with the IBM 9229 - LinHes 8.1.1 - Hauppauge HD PVR - serial port IR Blaster - Dish VIP211K combo for a week and a half with probably 16 hours fiddlin' with it No joy on the blaster ... the HD PVR works without much trouble.

I was trying to replace a production machine (Also IBM 9229) that went down when the hardware died. I'm embarrassed to say, I needed to get it going, and I fell back on my old reliable, the above combination running Mythbuntu 12.04, but I had a machine up and running (with the serial port IR blaster working) in a half hour).

Now the pressure's off & I want to explore both LinHes 8.1.1 and Mythbuntu 14.04 (Both of which work great with OTA HDHRs) Both currently have problems with the serial port blaster, so I'm going to fiddle with the HD PVR blaster. (First attempt crashed) and I just aquired an Iguanaworks blaster so I'll be experimenting with that too.

Only hitch is that the machine that went down (was going to be my new experimental machine) won't boot after a new motherboard and power supply.)

So I'll be hung up until I get another computer online.

(The production machines are all workin' and my motto with them is: "If it ain't broke- don't fix it !" ... :lol:


Top
 Profile  
 
PostPosted: Sun Aug 17, 2014 8:55 am 
Offline
Site Admin
Joined: Fri Jun 11, 2004 7:58 am
Posts: 507
For adding custom lirc startup have a look at the wiki for remote configuration. Specifically the parts about either lirc.sh or remotes/run.

lirc.sh is a complete replacement and will skip all the auto LinHES stuff for remotes.
remotes/run is meant more to supplement.


Top
 Profile  
 
PostPosted: Sun Aug 17, 2014 8:59 am 
Offline
Site Admin
Joined: Fri Jun 11, 2004 7:58 am
Posts: 507
snaproll, what sorts of problems with a serial blaster/receiver are you having?
Serial is one of devices I test with and it hasnt' given me any problems.

Not that serial really gave me problems, but I did move my setup completely commandIR based. Not having to guess the serial port does make setup easier.


Top
 Profile  
 
PostPosted: Sun Aug 17, 2014 11:03 am 
Offline
Joined: Sun Sep 05, 2004 7:06 pm
Posts: 677
I've had quite a bit of experience with serial just not with the blaster. Minicom is a program that will let you look at the serial port settings on your PC.
Your looking for information something like this

Serial Device: /dev/ttyS0
Bps/Par/Bits: 9600 8N1


Top
 Profile  
 
PostPosted: Sun Aug 17, 2014 5:03 pm 
Offline
Joined: Sun Jul 24, 2005 4:16 pm
Posts: 499
Location: Ft. Worth TX
jams wrote:
snaproll, what sorts of problems with a serial blaster/receiver are you having?
Serial is one of devices I test with and it hasnt' given me any problems.

Not that serial really gave me problems, but I did move my setup completely commandIR based. Not having to guess the serial port does make setup easier.


I'm only getting lirc0 for the remote, no lirc1 for the serial port.

This is what I get with a properly operating blaster on a Mythbuntu 12.04 setup:

greg@1204mythbuntu131:~$ ls -l /dev/lirc*
crw------- 1 root root 249, 0 Jul 18 10:32 /dev/lirc0
crw------- 1 root root 249, 1 Jul 18 10:32 /dev/lirc1
lrwxrwxrwx 1 root root 19 Jul 18 10:32 /dev/lircd -> /var/run/lirc/lircd
lrwxrwxrwx 1 root root 20 Jul 18 10:32 /dev/lircd1 -> /var/run/lirc/lircd1

I have been unable to get to that through the LinHes 'remotes' setup page.

It won't add lirc1 for the serial port blaster.


Top
 Profile  
 
PostPosted: Mon Aug 18, 2014 7:51 am 
Offline
Site Admin
Joined: Fri Jun 11, 2004 7:58 am
Posts: 507
Are the receiver and blaster different physical devices, meaning they each use their own serial port?
LinHES (via the menus) only supports one serial lirc interface. It would be possible to get the 2nd interface going but it requires some manual config file editing.


Top
 Profile  
 
PostPosted: Mon Aug 18, 2014 1:52 pm 
Offline
Joined: Sun Jul 24, 2005 4:16 pm
Posts: 499
Location: Ft. Worth TX
jams wrote:
Are the receiver and blaster different physical devices, meaning they each use their own serial port?
LinHES (via the menus) only supports one serial lirc interface. It would be possible to get the 2nd interface going but it requires some manual config file editing.


USB Receivers & Serial Port #1

I use the 'Streamzap receiver and remote 'cuz 'It always just works'

I'd prefer the RF Snapstream firefly 'cuz the flatscreen and computer are in different rooms.

Both remotes set up and work by themselves, but quit working when the serial port blaster is added, and the blaster never works.

The Serial port blaster setup is known good, 'cuz it works fine when I slip a hard drive running a Mythbuntu 12.04 setup into the same computer.


Top
 Profile  
 
PostPosted: Mon Aug 18, 2014 7:39 pm 
Offline
Joined: Tue Aug 15, 2006 11:14 am
Posts: 1196
Location: Orlando FL
does the serial blaster work if you unplug the streamzap reciever and turn off the remote in service menu->LinHES Settings-> remote?

_________________
My System


Top
 Profile  
 
PostPosted: Mon Aug 18, 2014 8:34 pm 
Offline
Joined: Sun Jul 24, 2005 4:16 pm
Posts: 499
Location: Ft. Worth TX
mattbatt wrote:
does the serial blaster work if you unplug the streamzap reciever and turn off the remote in service menu->LinHES Settings-> remote?

Tried that, no joy. lirc0 was running, but didn't pick up the serial port.

My change_channel.sh script was aimed at lirc1 but there wasn't one running.

Changing the script to point to lirc0 didn't work either ...


Top
 Profile  
 
PostPosted: Mon Aug 25, 2014 11:51 am 
Offline
Joined: Mon Apr 10, 2006 3:48 pm
Posts: 884
Location: Lexington, Ky
Jams
Quote:
For adding custom lirc startup have a look at the wiki for remote configuration. Specifically the parts about either lirc.sh or remotes/run.

lirc.sh is a complete replacement and will skip all the auto LinHES stuff for remotes.
remotes/run is meant more to supplement.


was thinking of adding a line to the remotes/run to handle the lird part but don't think thats the place to start the lirc_zilog

Any thoughts?


Top
 Profile  
 
PostPosted: Thu Aug 28, 2014 9:00 am 
Offline
Site Admin
Joined: Fri Jun 11, 2004 7:58 am
Posts: 507
long as the lirc process doesn't terminate it should be fine.


Top
 Profile  
 
PostPosted: Sat Aug 30, 2014 9:13 am 
Offline
Joined: Mon Apr 10, 2006 3:48 pm
Posts: 884
Location: Lexington, Ky
jams,

I tried adding a line at the end of /etc/sv/remotes/run for the script to loads the modules but it never runs it. What am I missing?


Top
 Profile  
 
PostPosted: Sun Aug 31, 2014 6:06 pm 
Offline
Site Admin
Joined: Fri Jun 11, 2004 7:58 am
Posts: 507
/etc/sv/remotes/run is the wrong file to edit, as it will be replaced by any system updates.

There are two options edit /etc/runit/lirc.sh or edit /etc/remote.run
Both of those options shortcut any of the logic added by linhes.
-lirc.sh will never be overwritten by the system
-remote.run is setup when selecting a remote. So if the template for that remote has a run file then it will overwrite /etc/remote.run


The remotes service (/etc/sv/remotes/run) will look for either of those files.

It first checks for /etc/runit/lirc.sh and if it finds that does NOTHING else but run that file.

If lirc.sh is not found the script then does a tiny bit of setup and then tries looks for /etc/remote.run. If remote.run is found it then executes everything in remote.run

The last line in either lirc.sh or remote.run must not terminate. Normally that means running lircd in debug mode (-n)

For example this is what either lirc.sh or remote.run would look like
Make sure either of those files has run permissions (chmod 755)


Code:
#!/bin/bash
#load the module
/usr/bin/modprobe  lirc_zilog

#start the lircd service
/usr/sbin/lircd -r -d /dev/lirc1 --output=/var/run/lirc/lircd1 --pidfile=/var/run/lirc/lircd1.pid --listen=8761

#fill in the remaining stuff the linhes normally does for you
#maybe load a module??

#Last lircd command that runs in debug mode so the session does not terminate
#look in /tmp/remotes.log to find out what the lircd command looks like
#/usr/sbin/lircd -r -n -d /dev/lirc0  --output=/var/run/lirc/lircd0










Top
 Profile  
 

Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 20 posts ] 
Go to page 1, 2  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:  
cron
Powered by phpBB® Forum Software © phpBB Group

Theme Created By ceyhansuyu