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

jimmah6786

  • Regular Poster
  • **
  • Posts: 17
    • View Profile
USB-UIRT to Learn a new remote
« on: August 06, 2007, 07:08:53 pm »
So, I am trying to get my remote control to work. The remote does not have a module for LIRC, so I would like to know how to setup my USB-UIRT device and have it learn the keys I press on the remote.

Is there are easy tutorial somewhere on how to do this, seems all I find is how to setup USB-UIRT, but I cant get the remote to work.

Kinda Confused, any help would be greatly appricated.

My System runs Ubuntu 7.04

elspic

  • Veteran
  • ***
  • Posts: 52
    • View Profile
Re: USB-UIRT to Learn a new remote
« Reply #1 on: August 06, 2007, 09:36:53 pm »
supposedly you can use irrecord to do that, but my LMCE system doesn't have it installed. When I installed it on an ubuntu studio system, the led on the usb-uirt would light up, but no dots would ever appear in irrecord. I'm wondering if there's a problem with my install because I see pluto-lirc packages, but it doesn't look like any were ever installed. Is there anyway to do a post-install check to make sure everything went ok? I've grepped the pluto install logs and didn't see anything major, mostly mysql errors. -Ruben

jimmah6786

  • Regular Poster
  • **
  • Posts: 17
    • View Profile
Re: USB-UIRT to Learn a new remote
« Reply #2 on: August 07, 2007, 02:24:47 am »
This doesnt make any goddam sense. I read documentation to setup my USB-UIRT, make LIRC see it. The remote i have does not have a preconfigured lircd.conf file. So it says to run irw or irrecord to learn the remote. When I do that the kernel tells me to make sure lirc is running, but when I run lirc from /etc/init.d/ it says cannot because lircd.conf is not setup. WT#???

HELP PLEASE@!!!

elspic

  • Veteran
  • ***
  • Posts: 52
    • View Profile
Re: USB-UIRT to Learn a new remote
« Reply #3 on: August 07, 2007, 05:05:08 am »
try running just irrecord:

  irrecord -f --device=/dev/lirc test.conf

on my system it creates /dev/lirc, /dev/lircm, and /dev/lircd and I have to use --device=/dev/lircm but still can't get any input. Did you have to install lirc on your own, or was irrecord and irw already installed? -Ruben

jimmah6786

  • Regular Poster
  • **
  • Posts: 17
    • View Profile
Re: USB-UIRT to Learn a new remote
« Reply #4 on: August 07, 2007, 03:36:09 pm »
lirc was already installed. I removed the package and reinstalled it with -apt-get --purge.

jimmah6786

  • Regular Poster
  • **
  • Posts: 17
    • View Profile
Re: USB-UIRT to Learn a new remote
« Reply #5 on: August 07, 2007, 11:34:23 pm »
irrecord -f --device=/dev/lirc test.conf

irrecord -  application for recording IR-codes for usage with lirc

Copyright (C) 1998,1999 Christoph Bartelmus(lirc@bartelmus.de)

irrecord: could not init hardware (lircd running ? --> close it, check permissions)

--thats what i get, and I made sure I started lirc (sudo /etc/init.d/lirc start)

Zaerc

  • Alumni
  • LinuxMCE God
  • *
  • Posts: 2256
  • Department of Redundancy Department.
    • View Profile
Re: USB-UIRT to Learn a new remote
« Reply #6 on: August 08, 2007, 12:38:58 am »
Just a guess, but maybe you need to stop lirc first instead?
"Change is inevitable. Progress is optional."
-- Anonymous


elspic

  • Veteran
  • ***
  • Posts: 52
    • View Profile
Re: USB-UIRT to Learn a new remote
« Reply #7 on: August 08, 2007, 08:11:54 pm »
try:

  ls -lah /dev/lirc*

and see what that lists. Like I said, on my system I had 3 lirc* devices listed and could only get one to work with irrecord. Although if I reboot, then I end up with just the /dev/lirc and then get the same thing you are.

  irrecord: could not init hardware (lircd running ? --> close it, check permissions)

Oh, and I'm sure lirc isn't running. -Ruben

jimmah6786

  • Regular Poster
  • **
  • Posts: 17
    • View Profile
Re: USB-UIRT to Learn a new remote
« Reply #8 on: August 08, 2007, 11:02:40 pm »
mythtvuser@mythtvserver:/etc/lirc$ ls -lah /dev/lirc*
crw-rw---- 1 root root 61, 0 2007-08-08 16:50 /dev/lirc
prw-rw-rw- 1 root root     0 2007-08-08 16:50 /dev/lircd
prw-rw-rw- 1 root root     0 2007-08-08 16:50 /dev/lircm
mythtvuser@mythtvserver:/etc/lirc$

thats what i get, so I am assuming this means lirc is install correctly. Also here is my hardware.conf file:

# /etc/lirc/hardware.conf
#
# Arguments which will be used when launching lircd
LIRCD_ARGS="-d /dev/ttyUSB0"

#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="uirt2_raw"
# If DEVICE is set to /dev/lirc and devfs is in use /dev/lirc/0 will be
# automatically used instead
DEVICE=""
MODULES=""

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


-----------------Hope You guys/gals can Help-------------------

k84

  • Veteran
  • ***
  • Posts: 69
    • View Profile
Re: USB-UIRT to Learn a new remote
« Reply #9 on: August 09, 2007, 02:05:20 am »
Hi
[   14.702913] usb 4-1: FTDI USB Serial Device converter now attached to ttyUSB0

On my linuxmce install the USB-UIRT is connected to ttyUSB0 so try running this:
irrecrord -d/dev/ttyUSB0 new.conf

Havent read the complete topic, but are you sure lirc is compiled with the UIRT_RAW driver (if i remember correctly)

Try this i'll be monitoring this post to help a fellow usbuirt user :-)

k84

  • Veteran
  • ***
  • Posts: 69
    • View Profile
Re: USB-UIRT to Learn a new remote
« Reply #10 on: August 09, 2007, 02:18:53 am »
Just checked out and can atleast confirm that lircd and irsend works very well not prohibiting linuxmce's own USBUIRT binary sending codes :-)

Meaning that for some codes which i can't get PRONTO code for lirc sends the commands (e.g to my hdmi switch)
And i can control this hdmi switch via other machines via a remote lirc socket :-)

And linuxmce still is able to control vol up/down on my reciever :-)

Edit: If you try to transmit via lircd and the builtin pluto binary simultanously lircd would die, but a quick restart would fix that and everything seems to work again.
lircd does not (atleast not yet) die if it never transmits at the same time.


« Last Edit: August 09, 2007, 02:26:19 am by k84 »

jimmah6786

  • Regular Poster
  • **
  • Posts: 17
    • View Profile
Re: USB-UIRT to Learn a new remote
« Reply #11 on: August 09, 2007, 04:16:02 am »
says the same thing as in the prevoius post about not having premissions and making sure lircd is off.

In regards to making sure the USB-UIRT is compiled correctly. I have it installed on Ubuntu 7.04 kernel is 2.6.20-16-generic
, I was told that this kernel comes USB-UIRT ready?

If not, help in the right direction would be greatly appricated. Maybe even steps to take, eh eh? :)

Thanks all

k84

  • Veteran
  • ***
  • Posts: 69
    • View Profile
Re: USB-UIRT to Learn a new remote
« Reply #12 on: August 09, 2007, 04:24:24 am »
So you have checked if the device is noticed upon insertion or boot?
a simple: dmesg

Would show a line like the one i posted above: FTDI ...........

[  880.651369] ftdi_sio 5-1:1.0: FTDI USB Serial Device converter detected
[  880.651380] drivers/usb/serial/ftdi_sio.c: Detected FT232BM
[  880.651640] usb 5-1: FTDI USB Serial Device converter now attached to ttyUSB0

linuxmce runs 2.6.20.6 and the only thing you would need in kernel is support for usbserial converters and the FTDI "variant".

so step number one would be to paste us: dmesg | grep FTDI

elspic

  • Veteran
  • ***
  • Posts: 52
    • View Profile
Re: USB-UIRT to Learn a new remote
« Reply #13 on: August 09, 2007, 06:11:25 am »
k84: I get almost the exact same you do, the only difference being what I'm guessing is the usb device number (ftdi_sio 2-1:1.0: for me). Here's what I've gotten to happen so far:

I had to manually install lirc:

  apt-get install lirc

which creates three devices: /dev/lirc, /dev/lircd, /dev/lircm I can get irrecord to work with:

  irrecord -d /dev/lircm test.conf

but when it tries to record, it says: "No gap found" and aborts after 10 seconds. No other device will work, they all give the "lircd running?" message. So I reboot.
After rebooting there are no lirc devices.

  ls -lah /dev/lirc*

returns nothing. And I can't start lircd because I don't have a conf file. -Ruben

Zaerc

  • Alumni
  • LinuxMCE God
  • *
  • Posts: 2256
  • Department of Redundancy Department.
    • View Profile
Re: USB-UIRT to Learn a new remote
« Reply #14 on: August 09, 2007, 06:31:05 am »
Have you guys looked at this page in the wiki? http://wiki.linuxmce.com/index.php/Add_support_for_new_remote_controls

It's not much, but maybe it helps.
"Change is inevitable. Progress is optional."
-- Anonymous