[mythtv-users] Re: MythTV and DISH - a great solution

jds jds-myth at losdos.dyndns.org
Fri Sep 24 01:09:53 EDT 2004


> Date: Thu, 23 Sep 2004 14:39:15 -0700 (PDT)
> From: Dex West <dexwest-dontspamme at dontspamme-yahoo.com>
>
> Just my opinion but Id like to hear from people who actually use
> Dish Network receivers about this topic..

i use a DISH receiver with a homebrew IR LED transmitter driven by LIRC.
i wrote the following HOWTO based on my experience setting it all up:
http://losdos.dyndns.org:8080/public/mythtv-info/MythTV_DISH_IR_LED_TX_via_Modified_LIRC.html
or the mirror
http://mirror.mmdsi.com/losdos.dyndns.org/public/mythtv-info/MythTV_DISH_IR_LED_TX_via_Modified_LIRC.html

>> This forces me to use one of those external channel-changing devices
>> to transmit IR signals and get the box to change channels.  First I
>> bought an ActiSys, and that didn't work well at all.  Then I made my
>> own, and after fighting with lirc, it seemed to work.  But it only
>> worked most of the time.  One out of ten channel changes it would just
>> miss a digit.

a digit is made up of a concatenation of bits which represent a keycode.
SW control of interbit timing on the DTR pin under a non-realtime OS
is non-deterministic.  the problem may be exacerbated on slow hardware
or in high interrupt rate situations.  if the interbit timing constraints
are violated, the receiver uP will declare a runt and try to resync with
the "second part" of the digit.  this of course leads to unpredictable
behavior, including missed digits.  this issue can in most cases be
completely mitigated by simply raising the priority of the lirc process.

in my writeup above, just change the startup script (end of Stage 2)
to read as
if [ -x /usr/local/lirc-ledxmit/sbin/ledxmit-ledxmitd ]
then
  nice --15 /usr/local/lirc-ledxmit/sbin/ledxmit-ledxmitd
fi

without rebooting, you can also (as root)
# renice -15 PID_OF_ledxmit-ledxmitd_PROCESS

this will lead to processor affinity to the ledxmit-ledxmitd process.
the highest priority available is -20.  nb: man nice & man renice.

it does NOT help whatsoever that when a recording is just beginning,
there is a lot going on.  the capture card is starting to spew data
and generate interrupts, the hard disk starts spooling, and so forth.
this is possibly the worst time to try to maintain precision timing of
DTR pin toggles.

another example:
i have a stratum 1 clock source connected to a solaris x86 box.  it
keeps time with +/- 2uS precision EXCEPT under high interrupt rate.
(i use the box for a lot of other activities).  the spikes you see
below
http://losdos.dyndns.org:8080/public/ntp-graphs/
are coincident with compiling, spamassassin runs, and so forth.  if
i *really* wanted to keep (and distribute via NTP) very accurate time,
i'd have to dedicate a box for the purpose and not (ab)use it with
other tasks.  otherwise, i'd need a real OS (tm) which provides
realtime process and thread management.  QNX comes to mind.

> How did you attach your homebrew Transmitter?  I'm trying to same
> path with NO success getting lirc to work or the homebrew transmitters
> so I will probably give up.

try my writeup first.  open source people don't "give up".  it's how
we got this far.  just imagine chris kennedy sitting there writing the
ivtv driver without a databook for the chipset.  if it doesn't work,
get a cheap logic analyzer and find out what the receiver is actually
receiving.  the older handheld "HP Logic Dart" is especially suited
to these types of problems.  e.g.,
http://losdos.dyndns.org:8080/public/icom-v8000/IMG_1623_sm.jpg
once in a while you can pick one up on ebay for a song.  otherwise,
any of the PC-based hobby analyzers work fine.  as long as it has one
or two channels of capture you can solve most every problem.

> The reply about taping the transmitter to the box seems like it
> would help?

i use a transmitter on the end of a cable.
http://losdos.dyndns.org:8080/public/mythtv-info/2a-ir_transmitter.jpg
i then bent the LED leads at a right angle, and used a small strip of
velcro to hold the LED in place in front of the IR photodiode on the
receiver.  once in a while my wife dusts everything (thanks honey!),
then i miss the next recording due to gross misalignment of the LED
and IR PD. such is life.  my world doesn't end if i miss a show.

> How much time did you spend on changing the lirc.conf file?

there is a fully functional lirc.conf file for the DISH receivers
linked in my writeup.  it's as simple as wget'ing it.

regards and best of luck,
jim




More information about the mythtv-users mailing list