LIRC patch for USB-UIRT support

Interested in integrating USB-UIRT support into an application? Look here!

Moderator: jrhees

Postby tbrown » Mon Sep 27, 2004 12:37 pm

I have everything working, but with a few caveats. I am using this with a dish network set top box, and can successfully change channels. However, irsend times out when it sends a command, even though it completes successfully. If I use a different codeset, I do not get timeout errors. I suspect that the driver for the USB-UIRT isn't sending an ACK back, but I haven't trudged through the code enough to assertain if this is accurate. Below is a copy of my lircd.conf file:
Code: Select all
begin remote

  name DISH_3100
  bits           16
  flags SPACE_ENC
  eps            30
  aeps          100

  header        400  6100
  one           400  1700
  zero          400  2800
  ptrail        400
  gap          6200
  min_repeat      4
  toggle_bit      0

  frequency    40000

      begin codes
          power                    0x0000000000000800
          0                        0x0000000000004400
          1                        0x0000000000001000
          2                        0x0000000000001400
          3                        0x0000000000001800
          4                        0x0000000000002000
          5                        0x0000000000002400
          6                        0x0000000000002800
          7                        0x0000000000003000
          8                        0x0000000000003400
          9                        0x0000000000003800
          up                       0x0000000000006800
          cancel                   0x0000000000004800
      end codes

end remote


Any help that you can provide would be great, since it takes almost 5 seconds to do a channel change, and as such, is not very reliable. It works about 70% of the time.

Thanks!
Travis
tbrown
 
Posts: 2
Joined: Mon Sep 20, 2004 5:13 pm

Postby neveld » Wed Sep 29, 2004 6:05 pm

Hi tbrown,
I found a bug in the command delay calculations which were probably causing this. I've put up a new patch which fixes this and also gets rid of the bogus "checksum error" log messages. It is available here.
neveld
 
Posts: 7
Joined: Mon Aug 30, 2004 3:55 pm

Postby Guest » Wed Sep 29, 2004 11:13 pm

Hi neveld,

I still get a timeout on transmits :( Hopefully I'll have some time in the next day or 2 to help track this down. I got it to reliably change channels by mucking with the timeout (lowering it to about 1.4 seconds). This is obviously a kludge, but it works well enough, for now.
Guest
 

Submitted to upstream lirc?

Postby tulrich » Wed Oct 13, 2004 1:56 pm

neveld,

This patch seems to be working for me, big thanks! I applied it to the latest lirc CVS and fixed a few minor discrepancies.

Has this patch been submitted to the lirc team? If not, would you like me to try submitting the patch?

It certainly would help others if it were in the official release!
tulrich
 

trouble detecting USB-UIRT in Gentoo, kernal 2.6.5

Postby robber » Thu Oct 28, 2004 6:38 pm

Seems like everybody gets 'USB-UIRT device detected' in dmesg and a /dev/ttyUSB0 device after the USB-UIRT is plugged in. But I don't.

When I plug in the USB-UIRT, nothing happens, then if I do a 'modprobe ftdi_sio', I get the following output of dmesg:
usbcore: registered new driver usbserial
drivers/usb/serial/usb-serial.c: USB Serial Driver core v2.0
drivers/usb/serial/usb-serial.c: USB Serial support registered for FTDI SIO
drivers/usb/serial/usb-serial.c: USB Serial support registered for FTDI 8U232AM Compatible
drivers/usb/serial/usb-serial.c: USB Serial support registered for FTDI FT232BM Compatible
drivers/usb/serial/usb-serial.c: USB Serial support registered for FTDI FT2232C Compatible
drivers/usb/serial/usb-serial.c: USB Serial support registered for USB-UIRT Infrared Tranceiver
drivers/usb/serial/usb-serial.c: USB Serial support registered for Home-Electronics TIRA-1 IR Transceiver
usbcore: registered new driver ftdi_sio
drivers/usb/serial/ftdi_sio.c: v1.4.1:USB FTDI Serial Converters Driver


Still no USB-UIRT detected, nothing at /dev/ttyUSB* or /dev/usb/*.

When the USB-UIRT is plugged in, I can see the right LED light blink when I press a remote button, so hardware seems fine, maybe something's not programmed right in the firmware of my USB-UIRT?
robber
 
Posts: 2
Joined: Thu Oct 28, 2004 6:30 pm

Postby robber » Fri Oct 29, 2004 8:04 am

I just tried plugging the USB-UIRT into my other linux machine running Gentoo with kernel 2.6.7 and it was detected with no problem, I also compared the .config file and don't see any big difference that could possibly result in the difference. Really confused now :(
robber
 
Posts: 2
Joined: Thu Oct 28, 2004 6:30 pm

problem solved

Postby robber » Sat Oct 30, 2004 5:09 am

I get it now. I didn't have OHCI driver installed for the nforce board. So simple.
robber
 
Posts: 2
Joined: Thu Oct 28, 2004 6:30 pm

Postby Guest » Tue Nov 16, 2004 4:07 am

Anonymous wrote:Hi neveld,

I still get a timeout on transmits :( Hopefully I'll have some time in the next day or 2 to help track this down. I got it to reliably change channels by mucking with the timeout (lowering it to about 1.4 seconds). This is obviously a kludge, but it works well enough, for now.


Okay...two things:

1. I've applied the new patch...still getting an 'irsend timeout' error, which is preventing me from sending more than a single digit to the DishNetwork box. In other words, if I try to send a 3 or 4 digit channel (ie. channel 120), it sends a 1. The channel will change. Then a 2, and the channel will change. And then a 0, and the channel will change. It won't group them together. :(

2. I can't seem to find the "timeout" setting reference above. Anyone have any ideas?

Thanks!
Eric Fether
efether@speedfactory.net
Guest
 

Postby Guest » Tue Nov 16, 2004 1:32 pm

Okay...I found the work-a-round. Here's what I did...step-by-step:

1. After compiling and installing LIRC and the UIRT patch, I went into the 'lirc-0.7.0pre7/tools' directory and edited 'irsend.c'. I changed this code on line 44/45 :


Code: Select all
/* three seconds */
#define TIMEOUT 3


to this:


Code: Select all
/* one second */
#define TIMEOUT 1


Then re-compiled irsend with the command 'make irsend'. Then I made a copy of the original irsend ('cp /usr/local/bin/irsend /usr/local/bin/irsend.orig'), and copied in the one I just compiled (cp ./irsend /usr/local/bin').

Because I'm still getting a "irsend timeout' error, I eliminated the 'sleep' command in the changechannel.sh script (because it's already getting a 1 second pause), and piped the 'timeout' error to /dev/null. My changechannel.sh script looks like this:

Code: Select all
#!/bin/sh
REMOTE_NAME=DISH_3100
for digit in $(echo $1 | sed -e 's/./& /g');do
/usr/local/bin/irsend SEND_ONCE $REMOTE_NAME $digit 2>/dev/null
#sleep 0.2
done


Then just put the put the changechannel.sh script name and full path into the mythtvsetup, and it works like a charm.

Would still like to have the code fixed to eliminate the timeout...but at least it works.

Later,
Eric Fether
efether@speedfactory.net
Guest
 

Postby Guest » Fri Nov 19, 2004 6:24 am

I'm trying to teach Tivo remote using this config:

Code: Select all
begin remote
  name  TIVO34
  bits           16
  flags SPACE_ENC|CONST_LENGTH
  eps            30
  aeps          100

  header       9087  4469
  one           616  1625
  zero          616   489
  ptrail        604
  repeat       9060  2203
  pre_data_bits   16
  pre_data       0xA10C
  gap          107943
  min_repeat      2
  toggle_bit      0
end remote


and when I start learning some button I get this:

Code: Select all
Something went wrong (hw.decode_func failed). irrecord: uirt2usb_raw: UIRT version 0506 ok
Please try again. (9 retries left)
Something went wrong (hw.decode_func failed). irrecord: uirt2usb_raw: UIRT version 0506 ok
Please try again. (8 retries left)
....


sometimes, under certain angle or on some distance from usbuirt device, it goes through but its very hard and it does not work. Using lirc-0.7.0pre7.tar.bz2 and neveld's patch. Any ideas?

I've been able to teach some RCA and Phillips remotes without problem but still some had same problem as above.
Guest
 

Postby Guest » Thu Mar 31, 2005 5:58 am

Has the lirc snapshot somehow changed? I cant get lirc 0.7.0pre7 to build under Gentoo Linux
Guest
 

Postby tbrown » Sat Apr 16, 2005 12:59 pm

Anonymous wrote:Has the lirc snapshot somehow changed? I cant get lirc 0.7.0pre7 to build under Gentoo Linux


No, but gentoo 2005.0 switched to autoconfig 2.9. LIRC only works with autoconfig 2.5. So, to take care of this, you need to export WANT_AUTOCONF=2.5 before you run configure (in a fresh directory).
tbrown
 
Posts: 2
Joined: Mon Sep 20, 2004 5:13 pm

LIRC PATCH for 0.7.1?

Postby killercoder » Tue Jun 07, 2005 6:11 pm

First off let me say the existing patch worked GREAT for me for over 8 months now. As part of a recent upgrade to the SilverStone LC14 (which uses Lirc for the VFD and its own remote) I've been forced to upgrade to 0.7.1. The existing patch doesn't work for this version.

Has anyone updated the patch for this release? I need the USB UIRT for transmission, but would love to use the cloacked IR Receiver in my case.

Thanks,

Killer
killercoder
 

Can't Build lirc-0.7.0pre7

Postby rwilliams » Wed Jun 08, 2005 3:53 pm

When I perform a make a receive the following warnings and error:

cd . && /bin/sh /home/rbw/lirc/lirc-0.7.0pre7/missing --run aclocal
acinclude.m4:11: warning: underquoted definition of AC_PATH_KERNEL_SOURCE_SEARCH
run info '(automake)Extending aclocal'
or see http://sources.redhat.com/automake/auto ... ng-aclocal
acinclude.m4:65: warning: underquoted definition of AC_PATH_KERNEL_SOURCE
cd . && \
/bin/sh /home/rbw/lirc/lirc-0.7.0pre7/missing --run automake --gnu Makefile
cd . && /bin/sh /home/rbw/lirc/lirc-0.7.0pre7/missing --run autoconf
/bin/sh ./config.status --recheck



cd . && /bin/sh /home/rbw/lirc/lirc-0.7.0pre7/missing --run autoheader
autoheader: WARNING: Using auxiliary files such as `acconfig.h', `config.h.bot'
autoheader: WARNING: and `config.h.top', to define templates for `config.h.in'
autoheader: WARNING: is deprecated and discouraged.
autoheader:
autoheader: WARNING: Using the third argument of `AC_DEFINE' and
autoheader: WARNING: `AC_DEFINE_UNQUOTED' allows to define a template without
autoheader: WARNING: `acconfig.h':
autoheader:
autoheader: WARNING: AC_DEFINE([NEED_FUNC_MAIN], 1,
autoheader: [Define if a function `main' is needed.])
autoheader:
autoheader: WARNING: More sophisticated templates can also be produced, see the
autoheader: WARNING: documentation.



/bin/sh ../libtool --mode=link --tag=CC gcc -O2 -g -Wall -o irrecord irrecord.o dump_config.o config_file.o hw-types.o ir_remote.o hw_uirt2usb_raw.o hw_uirt2usb_common.o serial.o receive.o transmit.o
libtool: unrecognized option `--tag=CC'
Try `libtool --help' for more information.
make[2]: *** [irrecord] Error 1
make[2]: Leaving directory `/home/rbw/lirc/lirc-0.7.0pre7/daemons'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/rbw/lirc/lirc-0.7.0pre7'
make: *** [all] Error 2

What am I missing?

Any patches for 0.7.1? or any chance of submitting it to lirc?
rwilliams
 
Posts: 1
Joined: Wed Jun 08, 2005 2:30 pm

Postby Guest » Mon Jun 27, 2005 1:49 pm

rwilliams;

I have seen this, and simply went through all the Makefiles and removed the tag=CC references. The compile then completes without fatal error and my usb-uirt seems to work fine.

I'm not sure whether this is the right/correct thing to do, but it seems to work for me.


Peter
Guest
 

Previous

Return to Developers

Who is online

Users browsing this forum: No registered users and 12 guests

cron