HowTo Setup USB-UIRT for MythTV on Fedora Core 6

Issues relating to installation of your USB-UIRT device.

Moderator: jrhees

HowTo Setup USB-UIRT for MythTV on Fedora Core 6

Postby jwillis » Sun Apr 15, 2007 5:57 pm

My setup is pretty basic, but I learned a few things.

The first of which is there are no kernel modules needed for the USB-UIRT, and fortunately the Fedora kernel contains all the USB support modules to create a device node "automagically" at /dev/ttyUSB0.

You don't need to do anything.

I think the only reason for recompiling from source is to update the tools so they know how to work with a USB-UIRT device node and socket.

A few Guidelines:

1. Do not install Xen on an Intel 865GBF motherboard, it flakes out and randomly reboots about every 75 seconds.

2. Assuming you install a Non-Xen default kernel with developer tools and follow Jarod Wilson's directions [ http://wilsonet.com/mythtv/fcmyth.php ] through [ Step 11 - Get and Install lirc ] do the following:

3. Download the lirc source package

[ cd /root ]
[ wget http://prdownloads.sourceforge.net/lirc ... 8.1.tar.gz ]

4. Install the dialog package so you can run the setup wizard

[ yum -y install dialog ]

5. As root unpack the lirc source and change into the directory it creates

[ tar -zxvf lirc-0.8.1.tar.gz ]
[ cd lirc-0.8.1 ]

6. Run the setup wizard [ ./setup.sh ]

7. Pick

[ 1 - Driver configuration]
[ 8 - USB devices]
[ i - USB-UIRT]
[ OK ]

8. Pick

[ (X) 1 /dev/ttyUSB0 ]
[ OK ]

9. Pick

[ 3 - Save configuration & run configure ]

A. Run

[ make ]

B. Run

[ make install ]

C. Edit /etc/sysconfig/lircd

D. The --driver=usb_uirt_raw option in the next instruction [ E. ] is VERY important, without it irw will kill the lircd daemon and put messages in /var/log/messages that say:

    could not get hardware features
    this device driver does not support the LIRC interface
    check if /dev/ttyUSB0 is a LIRC device

E. Add

[ LIRCD_OPTIONS=" --driver=usb_uirt_raw --device/dev/ttyUSB0 --output=/dev/lircd" ]

F. VERY Important - you need a /etc/lircd.conf file to run irw

G. Go to http://lirc.sourceforge.net/remotes and browse the directories to find a remote like the one you plan to test, these are profiles that can be used as /etc/lircd.conf files.

NOTE: Both the source package and Jarod's RPM method contain an extremely small collection of remotes. You really want to visit the URL http://lirc.sourceforge.net/remotes

In my case I had a [ sony ][ RMT-V267A ] but there wasn't a profile even at the sourceforge site, so I copied the [ sony ][ RMT-V266 ] profile assuming it was similar and it worked just fine.


H. Copy the Remote Control profile to [ /etc/lircd.conf ],

[ cd /etc ]
[ wget http://lirc.sourceforge.net/remotes/sony/RMT-V266 ]
[ mv RMT-V266 lircd.conf ]


I. Configure lircd to start at boot time

[ /sbin/chkconfig lircd on ]


J. Start the lircd service

[ /sbin/service lircd start ]


K. Start the irw tool and point your remote and click some buttons.

And that's it, it works.

And wow is it sensitive.

I don't know if its the Sony Remote is really IR Bright, or the USB-UIRT is "telepathic".. but I'd almost swear its a wireless remote. I can shoot the Sony Remote beam into my hand cupped over the emitter and it still picks up and decodes the signal off the light that makes it through my palm.

L. NOTE: I noticed in other threads that some people are interested in transmitting as well as receiving. I have not attempted this yet, but imagine the "--driver" option will be important there too.


M. NOTE: in the [ ./setup.sh ] wizard there are "other" drivers that have similar names, but I do not think these are meant to work with the USB-UIRT, so beware:

[ 1 - Driver configuration]
[ 4 - Other serial port devices]
[ i - UIRT2 (receive only, UIR mode)]

[ 1 - Driver configuration]
[ 4 - Other serial port devices]
[ j - UIRT2 (receive and transmit)]

- john
"the pebbles have voted.. but the avalanche is over"
jwillis
 
Posts: 2
Joined: Sun Apr 15, 2007 4:57 pm
Location: Houston, TX

Mapping Keys to Applications

Postby jwillis » Mon Apr 16, 2007 3:11 am

Ok, Another note.

Hope this really isn't annoying.

The first note on setting up USB-UIRT for MythTV on Fedora 6 might ought to be called "Mapping Button Presses to Keys".

This follow up note is best titled "Mapping Keys to Application Functions"

It wasn't "obvious" to me.. so I state it here for "newbies":

lirc is:

1. a daemon "lircd" which attaches to a device port (/dev/ttyUSB0) and provides a service via /dev/lircd

2. client's like "irw" attach to a unix type "socket" at /dev/lircd and read both information from the socket and "messages" which the lircd daemon makes and consumes based on the /etc/lircd.conf file.

My point of view is the "lircd.conf" file is the "language translator" and turns outbound messages into serial messages that get converted into IR signals, and inbound messages into simple "text" messages which "irw" displays.

This would explain how the irrecord program works, it attaches to the /dev/lirc socket "raw" and doesn't use the lircd program socket /dev/lircd to try and interpret the "raw" messages comming from the serial port (or USB port acting like a serial port).. irrecord is meant to "help you" create a Button press signal to Key map file.. aka -> lircd.conf

3. as part of the lircd startup, it must "poke" the -device information into the socket, or otherwise make it available via something like an ioctl call to the socket on the side. <-- all of this is guess work, I have not looked at the code.

4. So the next step is converting "Keys" into application specific functions.

In MythTV's case, I believe it has a similar program to "irw" which simply attaches to the /dev/lircd "socket" and reads a separate /home/mythtv/.mythtv/lircd file

This "lircd" configuration file tells the MythTV client how to interpret the Keys coming out of the /dev/lircd socket and what MythTV functions to perform.

Again, I'm no expert, but it looks like the format first declares a mapping for a program, like "mythtv" then references a Key called a "button", then how many times it must be recieved before its "really" interpreted as a "press" and not a mistake.. and finally a keyboard "config" equivalent.. or what keyboard key within the MythTV program this [ Key -> button -> press -> keyboard key ] corresponds to.

Anybody is very welcome to correct me and provide "Real" documentary information.

But this "interpretation" was enough to get things working for me.

Thanks

- john
"the pebbles have voted.. but the avalanche is over"
jwillis
 
Posts: 2
Joined: Sun Apr 15, 2007 4:57 pm
Location: Houston, TX

Postby toddbailey » Wed Sep 05, 2007 8:40 pm

Couple of things missing in the discussion.

Is ttyUSB0 a specific port on the PCor any usb port available? If so, how would I determine which port I need to plug the usb-uirt into?

Also area that I'm foggy on is I want myth tv to use the usb uirt to change channels on the dish net receiver, but I also want to use a ATI remote to control Myth TV

I'm unable to determine if this is even possible, or how to configure lirc to do this task.

Since I am new to all this verbose help is ok.

thanks
toddbailey
 
Posts: 3
Joined: Wed Sep 05, 2007 8:16 pm

Postby jwdonze » Thu Sep 13, 2007 4:13 am

toddbailey wrote:
Also area that I'm foggy on is I want myth tv to use the usb uirt to change channels on the dish net receiver, but I also want to use a ATI remote to control Myth TV

I'm unable to determine if this is even possible, or how to configure lirc to do this task.



It's possible to use both ATI Remote Wonder and USB-UIRT, but a bit of a pain to setup though I don't know if/how to make it work with DISH. Basically, you have to run two instances of lircd and get one to connect to the other. My startup looks something like this:

lircd -P /var/run/lircd -l /etc/lircd.conf
lircd -H uirt2_raw -d /dev/ttyUSB0 -o /dev/lircd1 -P /var/run/lircd1 -c localhost:8765 /home/mythtv/usbuirt.conf

/etc/lircd.conf has ATI remote wonder codes and usbuirt.conf has the transmit codes for various things - like the TV and Amp power. I've never gotten the USB-UIRT to control DISH equipment as of yet. I always get "remote not supported" back from it. Works great on everything else. For DISH I'm using a homebrew serial blaster (diode+resistor+led+db9 conn) at the moment. Functional, but not ideal.

EDIT: just found this: http://www.usbuirt.com/phpBB2/viewtopic.php?t=850
I'm trying it now...
jwdonze
 
Posts: 1
Joined: Thu Sep 13, 2007 3:49 am

Postby toddbailey » Thu Sep 13, 2007 5:19 pm

Thanks for the help.

At this point I am focusing on just getting the usb-uirt device to talk to the dish net box. I know it works , at least under the windows os...

However, Still running around in circles.

I downloaded lirc 0.8.1. and followed the configure and build instructions
the pointwhere it states to put this entry into sysconfig.lircd file could be a problem, so I included a copy of what I thought it to be.
# Options to lircd
[ LIRCD_OPTIONS=" --driver=usb_uirt_raw --device/dev/ttyUSB0 --output=/dev/lircd" ]

once I got to the /sbin/service lircd start I though I was home free,

well not the case, when I run

# irsend send_once dish power
irsend: could not connect to socket
irsend: Connection refused

I checked the gui service configuration and see that lircd is running
Making progress, I suppose, previously, the process would start but hang after 30 seconds or so.

interesing thing in messages file is it reports lircd is version 8.3 but I'm installing 8.1
Sep 13 10:00:09 mythtv lircd-0.8.3-CVS[11654]: lircd(userspace) ready
Sep 13 10:00:22 mythtv lircd-0.8.3-CVS[11654]: accepted new client on /dev/lircd
Sep 13 10:00:22 mythtv lircd-0.8.3-CVS[11654]: could not get hardware features
Sep 13 10:00:22 mythtv lircd-0.8.3-CVS[11654]: this device driver does not support the new LIRC interface
Sep 13 10:00:22 mythtv lircd-0.8.3-CVS[11654]: major number of /dev/lirc is 188
Sep 13 10:00:22 mythtv lircd-0.8.3-CVS[11654]: LIRC major number is 61
Sep 13 10:00:22 mythtv lircd-0.8.3-CVS[11654]: check if /dev/lirc is a LIRC device
Sep 13 10:00:22 mythtv lircd-0.8.3-CVS[11654]: caught signal

anyway very frustrated but will continue my research...
toddbailey
 
Posts: 3
Joined: Wed Sep 05, 2007 8:16 pm


Return to Installation

Who is online

Users browsing this forum: No registered users and 16 guests

cron