Bug #328

R6 with serial IR Blaster, irsend: hardware does not support sending

Added by bzImage8 about 15 years ago. Updated over 13 years ago.

Status:Closed Start date:
Priority:Normal Due date:
Assignee:jams % Done:

0%

Category:- Spent time: -
Target version:-

Description

Serial blaster don't work and change_chan.sh reports:

irsend: hardware does not support sending

Here is the forum thread describing this problem:

http://mysettopbox.tv/phpBB2/viewtopic.php?t=19772

History

Updated by bzImage8 about 15 years ago

Got it working after discovering the following:

/usr/LH/bin/load-modules-mythvantage.sh sets the ttyS0 parameters and loads the lirc_serial module, this is called on /etc/rc.sysinit in the line 87, here is a subset of the code:

83 # Load modules from the MODULES array defined in rc.conf 84 if ! [ "$load_modules" = "off" ]; then 85 if [ -f /proc/modules ]; then 86 stat_busy "Loading Modules" 87 /usr/LH/bin/load-modules-mythvantage.sh 88 for mod in "${MODULES[@]}"; do 89 if [ "$mod" = "${mod#!}" ]; then 90 /sbin/modprobe $mod 91 fi 92 done

But at this point in rc.sysinit ttyS0 does not exists, so it must be loaded after all the drivers are loaded, modified the rc.sysinit script, removed the line 87 and moved the /usr/LH/bin/load-modules-mythvantage.sh after the depmod, this is in the about the line 345 or so.

345 status "Updating Module Dependencies" /sbin/depmod -A 346 347 /usr/LH/bin/load-modules-mythvantage.sh 348 349 # Flush old locale settings

Also the /usr/LH/bin/load-modules-mythvantage.sh does wrong checks for the serial config.. in there in the lines 32 or so:

original file:

32 if [ x$module = xlirc_serial ] 33 then 34 if [ x$ReceiverType = xSerial ] 35 then 36 case $ReceiverSerialport in 37 ttyS0) FLAGS="io=0x3 f8 irq=4";; 38 ttyS1) FLAGS="io=0x2 f8 irq=3" ;; 39 ttyS2) FLAGS="io=0x3 e8 irq=4" ;; 40 ttyS3) FLAGS="io=0x2 f8 irq=3" ;; 41 esac 42 /usr/bin/setserial /dev/$Rec eiverSerialport uart none 2$ 43 /sbin/modprobe lirc_serial $ FLAGS 2>/dev/null 44 fi 45 fi

it checks the /etc/systemconfig file values, here is an snip of that file on my linhes installation:

#IR settings Remotetype="hauppauge-grey-g3" ReceiverType="Hauppauge" HostLircWait="" ReceiverSerialport="" HostTransmitproto_1="dish301_311" HostTransmitproto_2="none" HostTransmitproto_3="none" HostTransmitproto_4="none" HostBlasterType="Serial" HostSerialPort_blasterlirc="ttyS0" Hostnumblaster="1" rootSSH=""

It must check for $HostBlasterType not $ReceiverType (according to my /etc/systemconfig file) so those lines must be:

if [ x$module = xlirc_serial ] then if [ x$HostBlasterType = xSerial ] then case $HostSerialPort_blasterlirc in ttyS0) FLAGS="io=0x3f8 irq=4";; ttyS1) FLAGS="io=0x2f8 irq=3" ;; ttyS2) FLAGS="io=0x3e8 irq=4" ;; ttyS3) FLAGS="io=0x2f8 irq=3" ;; esac /usr/bin/setserial /dev/$HostSerialPort_blasterlirc uart none 2$ /sbin/modprobe lirc_serial $FLAGS 2>/dev/null fi fi

After this changes it will create a /dev/lircd1 device (in my case) wich you can use on the /usr/bin/change_chan.sh

Here is my change /usr/bin/change_chan.sh (change the REMOTE_NAME to whatever remote codes you have)

#!/bin/sh REMOTE_NAME=301 cmd="$1" case $cmd in [0-9]*) for digit in $(echo $1 | sed -e 's/./& /g'); do irsend --device=/dev/lircd1 SEND_ONCE $REMOTE_NAME $digit sleep 0.3 # If things work OK with sleep 1, try this for faster channel changes: # sleep 0.3 done ;; *) irsend --device=/dev/lircd1 SEND_ONCE $REMOTE_NAME $cmd ;; esac # /usr/bin/fix_audio.sh &

Updated by jams about 15 years ago

The initial design didn't include for supporting a serial blaster that was not also used as a receiver. The next release should fix this.

Modifing rc.sysinit should not be required, /usr/LH/bin/load-modules-mythvantage.sh is run twice to account for the missing ttySX.

Updated by jams about 15 years ago

modified load-modules-mythvantage.sh to not load lirc_serial if the setserial command failed.

Updated by iscraigh almost 15 years ago

On the latest update 6.0.0.7 updated May 4
This is still a challenge, in order to get it working I have to go into the services menu change serial ports, let it reconfigure, go back in and reset to the correct port. I must do this every reboot.
Ati all in wonder remote (usb) and serial irblaster.

EDIT:When the blaster works the ati all in wonder does not, I will hang on before doing the manual fixes so I can test any patches

Craig

Updated by iscraigh almost 15 years ago

I just did an update today and my irblaster is again not working despite using the fixes that used to work. If I look in dev I see lirc lirc0 and lircd
altering my change_chan.sh script to use each device lirc and lirc0 get connection refused
lircd fails silently.

[root@hdbe /]# change_chan.sh 12 irsend: could not connect to socket irsend: Connection refused irsend: could not connect to socket irsend: Connection refused [root@hdbe /]# change_chan.sh 12 irsend: could not connect to socket irsend: Connection refused irsend: could not connect to socket irsend: Connection refused [root@hdbe /]# change_chan.sh 12

Why can't we set it up the way 5.5 was setup it worked great.

Any suggestions as to how I might get this functioning again or any more info that may be needed to help trouble shoot this.

I am just using the irblaster no remote (I gave up on the ati remote and irblaster at the same time)

Thanks

Craig

Updated by iscraigh almost 15 years ago

just more info from var/log/lirc
Jul 19 21:51:08 hdbe lircd: accepted new client on /dev/lircd Jul 19 21:51:08 hdbe lircd: could not get file information for /dev/lirc0 Jul 19 21:51:08 hdbe lircd: default_init(): No such file or directory Jul 19 21:51:08 hdbe lircd: WARNING: Failed to initialize hardware Jul 19 21:55:51 hdbe lircd: lircd(default) ready Jul 19 21:56:11 hdbe lircd: accepted new client on /dev/lircd Jul 19 21:56:11 hdbe lircd: removed client Jul 19 21:56:11 hdbe lircd: accepted new client on /dev/lircd Jul 19 21:56:11 hdbe lircd: removed client Jul 19 21:56:19 hdbe lircd: accepted new client on /dev/lircd Jul 19 21:56:19 hdbe lircd: removed client Jul 19 21:56:20 hdbe lircd: accepted new client on /dev/lircd Jul 19 21:56:20 hdbe lircd: removed client Jul 19 21:59:31 hdbe lircd: accepted new client on /dev/lircd Jul 19 21:59:31 hdbe lircd: removed client Jul 19 21:59:31 hdbe lircd: accepted new client on /dev/lircd Jul 19 21:59:31 hdbe lircd: removed client Jul 19 22:00:06 hdbe lircd: accepted new client on /dev/lircd Jul 19 22:00:06 hdbe lircd: removed client Jul 19 22:00:06 hdbe lircd: accepted new client on /dev/lircd Jul 19 22:00:06 hdbe lircd: removed client Jul 19 22:12:50 hdbe lircd: accepted new client on /dev/lircd Jul 19 22:12:50 hdbe lircd: removed client Jul 19 22:13:09 hdbe lircd: accepted new client on /dev/lircd Jul 19 22:13:09 hdbe lircd: removed client Jul 19 22:13:23 hdbe lircd: accepted new client on /dev/lircd Jul 19 22:13:23 hdbe lircd: removed client

Although it accepts the client it does not change the channel

Updated by grg3 over 14 years ago

I thought I had my 5.5 to 6 upgrade all finished and this issue got me as well. I have restored my 5.5 so I will have a working install and I will do a test install on extra disk to troubleshoot. This is a showstopper for me as I rely on my serial blaster to change the channel on my satellite receiver. Anybody else have their serial blaster working? What is a good alternative to a serial blaster?

Updated by grg3 over 14 years ago

I tried upgrading again. This time I purchased a MCE remote only to find that it is a phillips ehome type that supports remote control but no blasting. So.... Back to the PVR-150 and Serial IR Blaster. Again, the remote works fine, but no go on the blaster.

I have tried to carefully check my remote names to make sure that there are no typos. I have come to the conclusion that the problem is the serial port, but I can't for the life of me figure out what is wrong. I looked at the LIRC page on ArchWiki and this seemed to confirm that this may be the issue. On the other hand, maybe I am just confused. Can we dare hope to have serial blaster support in R6? I will go back to R5.5 again.

dmesg | grep serial

serial8250: ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A
tveeprom 0-0050: Hauppauge model 26032, rev C199, serial# 8005046
lirc_serial: port 03f8 already in use
lirc_serial: use 'setserial /dev/ttySX uart none'
lirc_serial: or compile the serial port driver as module and
lirc_serial: make sure this module is loaded first

Updated by kebe over 14 years ago

I have a streamzap remote and a serial blaster. I've been digging around trying to get the blaster to work. I've found the following:

1) there is a typo in /etc/sv/lircd/run
the line

/usr/bin/setserial /dev/serial_port uart none
should be /usr/bin/setserial /dev/$serial_port uart none

this typo keeps the lirc_serial module from loading

2) I've also had to edit /etc/sv/lircd/run by changing the line

for i in `seq 1 $num_lirc`
to i="1"

and then commenting out the lines with "do" and "done"

Now it works for my setup.

Updated by grg3 over 14 years ago

That is really good news! Let me try again with those edits. I can follow the $serial_port change easily. As far as the other part:

Change this:

for i in `seq 1 $num_lirc` do CMD="/usr/sbin/lircd -r -d /dev/lirc$i --output=/dev/lircd$i --pidfile=/var/run/lircd$i.pid --listen=876$i" printhl " Device $i" #echo $CMD $CMD >>$LOG 2>>$LOG LASTCMD="--connect=localhost:876$i $LASTCMD " done

To:

for i="1" # do CMD="/usr/sbin/lircd -r -d /dev/lirc$i --output=/dev/lircd$i --pidfile=/var/run/lircd$i.pid --listen=876$i" printhl " Device $i" #echo $CMD $CMD >>$LOG 2>>$LOG LASTCMD="--connect=localhost:876$i $LASTCMD " # done

Is that correct?

Thanks!

Updated by grg3 over 14 years ago

Well I got it to change channel once and that is it. At least lirc_serial starts now. Still no blasting for me.

Thank goodness for Clonezilla! I have had to restore 5.5 three times now.

Updated by kebe over 14 years ago

Almost.

Change
for i="1"
to just

i="1"

I don't know what the

--listen=8761

or

LASTCMD="--connect=localhost:8761 $LASTCMD "

do.

Well, I know what the code does, I just don't know why it's there. I removed them from my script and things still work.

Updated by kebe over 14 years ago

I've made a minimalist /etc/sv/lircd/run script by stripping out everything that's not needed.

#!/bin/bash exec 2>&1 export TERM=linux . /etc/rc.conf . /etc/rc.d/functions LOG=/tmp/lirc.log if [ -f $LOG ] then rm -f $LOG fi . /etc/systemconfig stat_runit "Starting lirc" [ -e /etc/sv/lircd/.runtime ] || mkdir -p /etc/sv/lircd/.runtime serial_port=$HostSerialPort_blasterlirc if [ -n "$serial_port" ] then #/dev/ttyS0 (COM1), port 0x3f8, irq 4 #/dev/ttyS1 (COM2), port 0x2f8, irq 3 #/dev/ttyS2 (COM3), port 0x3e8, irq 4 #/dev/ttyS3 (COM4), port 0x2e8, irq 3 case $serial_port in ttyS0) FLAGS="io=0x3f8 irq=4" ;; ttyS1) FLAGS="io=0x2f8 irq=3" ;; ttyS2) FLAGS="io=0x3e8 irq=4" ;; ttyS3) FLAGS="io=0x2e8 irq=3" ;; esac /usr/bin/setserial /dev/$serial_port uart none sleep 0.5 /sbin/modprobe lirc_serial $FLAGS sleep 0.5 fi CMD="/usr/sbin/lircd -r -d /dev/lirc1 --output=/dev/lircd1 --pidfile=/var/run/lircd1.pid" printhl " Device 1" $CMD >>$LOG 2>>$LOG LCMD="/usr/sbin/lircd -r -n -d /dev/lirc0 --output /dev/lircd" exec $LCMD >>$LOG 2>>$LOG

This assumes:
- The receiver is not serial and the driver has already been loaded - it will use /dev/lirc0 and /dev/lircd

- The transmitter is serial and the correct serial port has been entered into /etc/systemconfig - it will use /dev/lirc1 and /dev/lircd1

/usr/bin/change_chan.sh must be modified so that the irsend lines look like this:

irsend -d /dev/lircd1 SEND_ONCE $REMOTE_NAME $digit

and

irsend -d /dev/lircd1 SEND_ONCE $REMOTE_NAME $cmd

Updated by jams over 14 years ago

Any changes you make to the run script will be overwritten on the next update.
Instead of making mass changes to the lircd runit script, make your changes here:
/etc/runit/lirc.sh

Updated by grg3 over 14 years ago

OK! jams, you lost me now. Is there an update pending that will get irblasting working? This task has been open since April, so it would be great to see it completed.

I don't see lirc.sh in /etc/runit. Are you suggesting using the modifications above as lirc.sh? This will prevent it being overwritten again by code that does not work?

Updated by grg3 over 14 years ago

OK! jams, you lost me now. Is there an update pending that will get irblasting working? This task has been open since April, so it would be great to see it completed.

I don't see lirc.sh in /etc/runit. Are you suggesting using the modifications above as lirc.sh? This will prevent it being overwritten again by code that does not work?

Updated by jams over 14 years ago

"Is there an update pending that will get irblasting working?"
Probably, this was working for me some time ago, but looks like somebody broke it. When I get time I will look at it some more, although it appears that you guys have already found one of the problems.

"I don't see lirc.sh in /etc/runit. Are you suggesting using the modifications above as lirc.sh? This will prevent it being overwritten again by code that does not work?"
The file does not exist, however if it does exist the run file will source it instead of continuing. Look at the top of the run file, notice the check for the file and the if statement. The thing to watch out for is that lirc.sh must not return unless the process has died or stopped.

Updated by grg3 over 14 years ago

Any help would be appreciated. I would like to keep my serial blaster until I have to get a new motherboard!

Updated by grg3 over 14 years ago

Finally! Success!

I finally had time to day to attempt upgrade again. kebe thanks for the script changes! They worked!

jams Thanks for the tips regarding the lirc.sh! That is where I place the above script.

Changing channels is a wonderful thing.

Updated by vxagent over 14 years ago

This procedure worked for me. However, some of the changes were overwritten after performing an update. They were easily corrected. Silver Hauppauge remote and serial IR blaster both work at the same time now.

Updated by jams about 14 years ago

if you use /etc/runit/lirc.sh the changes will not be overwritten. Thats the entire point of that file.

Updated by douw about 14 years ago

This seems to work and I'll test it tonight. But what about us poor sods that uses a combined receiver/transmitter blaster?

kebe wrote:

This assumes:
- The receiver is not serial and the driver has already been loaded - it will use /dev/lirc0 and /dev/lircd

[EDIT] Ok, tested and both transmit and receive seems to work ok.

Updated by jams over 13 years ago

  • Status changed from In Progress to Closed

Also available in: Atom PDF