Author Topic: USB-UIRT to Learn a new remote  (Read 3815 times)

elspic

  • Veteran
  • ***
  • Posts: 52
    • View Profile
Re: USB-UIRT to Learn a new remote
« Reply #15 on: August 09, 2007, 07:09:16 am »
Yeah, started there actually. What I got from it is you use irrecord to create a conf file and import it into LinuxMCE. But I can't get irrecord to work at all. I know the usb-uirt and remote work together because I've used them on a windows pc to learn and control the tv. -Ruben

jimmah6786

  • Regular Poster
  • **
  • Posts: 17
    • View Profile
Re: USB-UIRT to Learn a new remote
« Reply #16 on: August 09, 2007, 07:03:11 pm »
Same here.

elspic

  • Veteran
  • ***
  • Posts: 52
    • View Profile
Re: USB-UIRT to Learn a new remote
« Reply #17 on: August 10, 2007, 02:08:07 am »
Ok, I just did a fresh install with the 0704 dvd and when I plug in the usb-uirt, it is definitely recognized:

[ 2551.210966] usb 1-2: new full speed USB device using ohci_hcd and address 6
[ 2551.440597] usb 1-2: configuration #1 chosen from 1 choice
[ 2551.520221] usbcore: registered new interface driver usbserial
[ 2551.520721] drivers/usb/serial/usb-serial.c: USB Serial support registered for generic
[ 2551.521188] usbcore: registered new interface driver usbserial_generic
[ 2551.521191] drivers/usb/serial/usb-serial.c: USB Serial Driver core
[ 2551.524991] drivers/usb/serial/usb-serial.c: USB Serial support registered for FTDI USB Serial Device
[ 2551.525541] ftdi_sio 1-2:1.0: FTDI USB Serial Device converter detected
[ 2551.525684] drivers/usb/serial/ftdi_sio.c: Detected FT232BM
[ 2551.526559] usb 1-2: FTDI USB Serial Device converter now attached to ttyUSB0
[ 2551.526756] usbcore: registered new interface driver ftdi_sio
[ 2551.526760] drivers/usb/serial/ftdi_sio.c: v1.4.3:USB FTDI Serial Converters Driver

and if I tail the USB_UIRT log and press buttons on the remote, I get:

1       08/09/07 18:48:03       33 (spawning-device)    Starting... 1
1       08/09/07 18:48:03       33 (spawning-device)    Found /usr/pluto/bin/USB_UIRT_0038
05      08/09/07 18:48:04.154           Creating child 34 <0xb78e46d0>
05      08/09/07 18:48:04.154           Note: Device manager has attached a device of type 1784 that this has no custom event handler for.  It will not fire events. <0xb78e46d0>
05      08/09/07 18:48:04.154           Note: Device manager has attached a device of type 1784 that this has no custom handler for.  This is normal for IR. <0xb78e46d0>
05      08/09/07 18:51:17.624           Cannot find anything for IR 190002A0A8E2 <0xb7804b90>
05      08/09/07 18:51:18.160           Cannot find anything for IR 190002A0A8E2 <0xb7804b90>
05      08/09/07 18:51:18.212           Cannot find anything for IR 190002A0A8E2 <0xb7804b90>

so I know the remote and usb-uirt can work together under linux in principle at least. I don't have lirc or irrecord installed by default however. If I do a "locate lirc" I see:

dcerouter_1:/etc/X11# locate lirc
/usr/share/locale-langpack/en_GB/LC_MESSAGES/kdelirc.mo
/usr/share/locale-langpack/en_GB/LC_MESSAGES/kcmlirc.mo
/usr/share/locale-langpack/en_AU/LC_MESSAGES/kdelirc.mo
/usr/share/app-install/desktop/kcmlirc.desktop
/usr/share/doc/liblircclient0
/usr/share/doc/liblircclient0/changelog.gz
/usr/share/doc/liblircclient0/copyright
/usr/share/doc/liblircclient0/changelog.Debian.gz
/usr/share/doc/ivtv-utils/README.lirc.gz
/usr/share/doc/mythtv-backend/contrib/channel_changers/change-channel-lirc.pl
/usr/share/doc/mythtv-backend/contrib/channel_changers/change-channel-lirc.sh
/usr/share/doc/mythtv-backend/contrib/mandrake91.etc.sysconfig.lircd
/usr/lib/directfb-0.9.25/inputdrivers/libdirectfb_lirc.so
/usr/lib/liblirc_client.la
/usr/lib/liblirc_client.so.0.2.0
/usr/lib/vlc/control/liblirc_plugin.so
/usr/lib/liblirc_client.so.0
/usr/pluto/deb-cache/lirc-pluto_0.1_all.deb
/usr/pluto/deb-cache/pluto-lirc-wrapper_2.0.0.44.0708032200_i386.deb
/usr/pluto/deb-cache/lirc-modules-2.6.20-15-generic_0.8.1+cvs20070310-0ubuntu2+2.6.20-15.27_i386.deb
/usr/pluto/deb-cache/liblircclient0_0.8.1+cvs20070310-0ubuntu2_i386.deb
/usr/pluto/deb-cache/liblircclient-dev_0.8.1+cvs20070310-0ubuntu2_i386.deb
/usr/pluto/deb-cache/lirc-modules-2.6.20-16-generic_0.8.1+cvs20070310-0ubuntu2+2.6.20-16.29_i386.deb
/usr/pluto/deb-cache/lirc_0.8.1+cvs20070310-0ubuntu2_i386.deb
/usr/pluto/deb-cache/lirc-modules-2.6.20-15-generic_0.8.1+cvs20070310-0ubuntu2+2.6.20-16.29_i386.deb
/var/lib/dpkg/info/liblircclient0.md5sums
/var/lib/dpkg/info/liblircclient0.list
/var/lib/dpkg/info/liblircclient0.postrm
/var/lib/dpkg/info/liblircclient0.shlibs
/var/lib/dpkg/info/liblircclient0.postinst

The wiki says to use irrecord to generate a lirc conf file and then import it into Linux MCE. Is it alright to apt-get lirc or should it be lirc-pluto? Or is there something else wrong that it's not already installed? -Ruben

jimmah6786

  • Regular Poster
  • **
  • Posts: 17
    • View Profile
Re: USB-UIRT to Learn a new remote
« Reply #18 on: August 13, 2007, 04:07:28 pm »
Alright I said forget this USB-UIRT learn remote thang and I went out and bought the MS Windows MCE remote.
Tried the tutorial on setting it up, but no dice. Arg...

If anyone can give me a step by step guid to installing the WIndows MCE remote, that would be great. My media center does everything except have a remote control :( :(, which = crap.

elspic

  • Veteran
  • ***
  • Posts: 52
    • View Profile
Re: USB-UIRT to Learn a new remote
« Reply #19 on: August 14, 2007, 05:11:10 pm »
ok, I just installed a fresh copy of ubuntu on the same laptop I was having trouble with earlier and I've gotten irrecord to work, so hopefully someone else can help me figure out where to go from there. This is what I've gotten so far:

installed lirc with "apt-get install lirc"

when that's done it says:

  /etc/init.d/lirc start
  ##################################################
  ## LIRC IS NOT CONFIGURED                       ##
  ##                                              ##
  ## read /usr/share/doc/lirc/html/configure.html ##
  ##################################################
  Starting lirc daemon:.

But it silently fails. I know it's not running using "ps aux |grep lirc".
It seems like no matter what I put in /etc/lirc/hardware.conf, I can't get it to start through /etc/init.d/lirc
BUT: I can get results if I run

  lircd --nodaemon

and then in another terminal:

    irrecord -d /dev/ttyUSB0 -H usb_uirt_raw test.conf

that starts up irrecord which now recognizes my remote and creates a config. I haven't finished a full one yet, but even once I do, I'm not sure how to get the actual lirc daemon to start. -Ruben

elspic

  • Veteran
  • ***
  • Posts: 52
    • View Profile
Re: USB-UIRT to Learn a new remote
« Reply #20 on: August 14, 2007, 07:24:21 pm »
ok, got the usb-uirt and lirc to work together and I think I followed the wiki http://wiki.linuxmce.com/index.php/Add_support_for_new_remote_controls correctly, but I'm kind of confused where it says:

  "Then edit the device, add a device data "Configuration" and copy the LIRC configuration file into it"

I chose "Configuration" and hit add, gave it a comment, then just put the location of the file (/home/linuxmce/lircd.conf) where it says "Default Value" as that's the only thing I could figure out to do.
So this might be a stupid question but, now what? How do I make sure it's set up properly? Do I have to add a media scenario to turn the tv on when a dvd is put in or what can I do to test that it is working correctly?
Also, right now I've got a gyration mouse hooked up and my tv remote, would it be a good idea to just get one of the Gyration MCE or Fiire remotes to replace the two of them? Either of those are both learning remotes and gyro mice aren't they? I guess this is what I have in mind as the ideal setup for controlling ir gear:

  1 usb-uirt pointed positioned such that it can hit the tv but also accessible to a remote in the majority of the room. Or possibly a second ir emitter plugged in facing the tv so the usb-uirt faces the room. Then one of the GyrationMCE remotes would be able to learn the tv ir codes and control both the tv functions and mouse duties correct? I haven't been able to get my hdhomerun to work with Time Warner here in Austin and being able to access movies on demand and ppv is a showstopper with myth tv so I think I'm going to have to rely pretty heavily on ir. This means for dvds or downloaded movies it would be running off of one connection and using the mouse control, and for live tv, it would use another connection and switch to using normal ir, but does it do that automatically?

And here's how I finally got the usb-uirt to work with lirc:
 /etc/lirc/hardware.conf:

Code: [Select]
# /etc/lirc/hardware.conf
#
# Arguments which will be used when launching lircd
LIRCD_ARGS="--output=/dev/lircd"

#Don't start lircmd even if there seems to be a good config file
#START_LIRCMD=false

#Try to load appropriate kernel modules
LOAD_MODULES=false

# Run "lircd --driver=help" for a list of supported drivers.
DRIVER="usb_uirt_raw"
# If DEVICE is set to /dev/lirc and devfs is in use /dev/lirc/0 will be
# automatically used instead
DEVICE="/dev/ttyUSB0"
MODULES=""

# Default configuration files for your hardware if any
LIRCD_CONF=""
LIRCMD_CONF=""


after that I can get irrecord, irw and, irsend to work, but not mode2. That should give you the conf file you need. I'm not sure if LMCE actually uses the lirc stuff, but this file should be in /etc/lirc/lircd.conf

-Ruben

jimmah6786

  • Regular Poster
  • **
  • Posts: 17
    • View Profile
Re: USB-UIRT to Learn a new remote
« Reply #21 on: August 14, 2007, 09:52:00 pm »
Alrighty making some progress, but still stuck.

I successfully installed lirc again(reinstall)
I successfully found the USB-UIRT device using dmesg| grep -i usb. I get:

FTDI USB Serial Device converter now attached to ttyUSB0 (dont' know why it doesnt say USB-UIRT connected or something)

changed my hardware config as show in the above post

changed my lircd.conf to the "mceusb.conf" off lirc.sourceforge.net

started the daemon "/etc/init.d/lirc start"
-no errors (yaayaya)

run "irw"
-it hangs(but thats good im told)

press buttons on my Windows MCE remote....and nothing happens :(


p.s. I swear one time I did a dmesg|grep -i usb, i saw a USB-UIRT??