Author Topic: Lirc & serial - I'm missing something simple?  (Read 4550 times)

mitchd123

  • Making baby steps
  • Posts: 2
    • View Profile
Lirc & serial - I'm missing something simple?
« on: October 06, 2008, 05:49:06 am »
Bear with me, newbie to LinuxMCE, but I've worked with LIRC many times before...but I'm really stumped.

For years I've used mythtv on Gentoo, and wanted to give LinuxMCE a try.

I loaded the remote and serial receiver:
(details)
In the admin tool under wizard, devices, media-director,  at the bottom of the page I've added a Infrared Remote Control.  I've clicked on add a remote, manufacturer Zenith, device category Remote Controls < Peripherals, selected auto filter, and in the device template, I've selected TV, then I clicked on pick device template.  It returns back to the main page, and at the bottom I've selected Infrared Receivers "default" which I assume is what I should use for a serial attached homebrew receiver.   At the bottom I then clicked on update.  (I know the hardware is all good because I had it working on another computer with mythtv.)  At this point I rebooted my system to be sure everything loads correctly.   While waiting for it to reboot, I loaded the Zenith TV codes on my OneForAll 6131 Universal remote.  There are four potential codes for a Zenith TV on the remote, and I'll try them all if necessary, 0017 0463 0016 0092


I see device #42 and #46 take a long time to start and I get an error message saying devices did not load correctly.  I jumped into KDE, and see the error message...Starting device 42 default, and the next line says Timeout waiting for device registration.   

Dropped into a terminal and did a sudo su:

lsmod |grep lirc   which shows only lirc_dev  I noticed /dev/lirc0 is not created. 

modprobe -a lirc_serial  which loads and creates /dev/lirc0

when I try irw  it give me "No such file or directory"

I checked /etc/lircd.conf  and it appears correct

Worth noting, I've set these options in the  /etc/hardware.conf file
START_LIRCMD=false
LOAD_MODULES=false
DRIVER="default"
DEVICES="/dev/lirc0"
MODULES="/lirc_serial"
LIRCD-CONF=/etc/lirc/lircd.conf
LIRCMD_CONF=/etc/lirc/lircmd.conf

Figuring perhaps I messed up a setting trying to get it to work, I uninstalled lirc and in Pluto admin removed the remote and default serial device, clicked update.  I deleted the /etc/lirc directory, and rebooted.

This time everything came up fine with serial and the remote removed. 

I again added the serial with default, and the remote.

#46 was hanging which is the serial device.  The log showed, no port specified.  Back in pluto admin next to the core in the right pane I added available serial ports /dev/ttyS0   and then I clicked update.  rebooted router, and again hanging on #46.

Reviewing the log I see " Not starting device 46 default - binary is not found, probably it is in the middle of installation." 

Any clues on how to get past this?    I can list /dev/ttyS0 and there is only one physical serial port on this motherboard.   I know the port is working because I was previously able to manually configure lirc without LinuxMCE and it worked fine with mythtv.  I switched to the methods I read about in the forums to get the Media Director/main interface also working. 

Any hints would be greatly appreciated.   I appears the serial port is locked by something else, and lirc_serial is not loading on startup. 

setserial -g /dev/ttyS0   
/dev/ttys0, UART: 16550A, Port: 0x03f8, IRQ: 4

















tschak909

  • LinuxMCE God
  • ****
  • Posts: 5549
  • DOES work for LinuxMCE.
    • View Profile
Re: Lirc & serial - I'm missing something simple?
« Reply #1 on: October 06, 2008, 01:42:59 pm »
Thanks for digging into the situation a bit.. I can explain what's going on:

Basically, LinuxMCE takes the serial ports so that plug and play operation for serial controlled A/V devices is possible (for example, if your TV or amplifier has RS-232 support, LinuxMCE will detect it and set it up if there is a device template for it.)

Because of this (a combination of the Pnp_Plugin, and UpdateSerialPorts.sh), your serial port LIRC reciever will not work.

It's also worth noting that LinuxMCE doesn't blindly use LIRC, but rather we have a messaging buss that devices connect to, and provide or wrap various functionality (there is an LIRC device for DCE which is used, but also native DCE devices for various IR transcievers listed below)

You have two choices:

(1) Get a supported IR Transciever. This is preferred because not only will it work out of the box with a lot less hassle, you get IR learning capability, which is a very huge plus in this system, so that LinuxMCE can manage your A/V gear. Such devices are:

* USB UIRT (http://www.usbuirt.com/)
* IRTrans (http://www.irtrans.de/)
* Tira
* GC-100 (transmit only, not meant for remotes)

(2) modify the serial port routines in the source, to allot for serial port IR transcievers. This is much more difficult because LIRC transcievers are not very intelligent devices, and we have very little in the way of detecting whether such a device would be on the buss in the first place.

well, okay, there's another one:

(3) you can go to the orbiter software install page on the front of the web admin, and install the orbiter software on a variety of devices to have a low cost graphical remote that is more versatile than a typical remote. You can also install a web orbiter (look at the wiki page Web Orbiter for more info).

Hope this helps :)
-Thom
« Last Edit: October 06, 2008, 01:44:52 pm by tschak909 »

mitchd123

  • Making baby steps
  • Posts: 2
    • View Profile
Re: Lirc & serial - I'm missing something simple?
« Reply #2 on: October 06, 2008, 08:27:56 pm »
Thom,  thank you VERY much for your reply.   

If anyone else has made a basic lirc homemade serial receiver work, I'd love to know how. http://www.lirc.org/receivers.html This is going to be a show stopper for me with LinuxMCE.   I know I'm not smart enough to get through option #2.

My home has a myth backend server like the core, but I'm not willing to put a separate front end in each room.  If I were to use a Linux MCE supported receiver on the core in the basement, I doubt it would provide reliable transportation to the second floor on the opposite side of the house.  My setup is described here: http://forums.gentoo.org/viewtopic-t-466803-highlight-.html I'm using cat 5 with a balun in each room for video, along with serial.   It offers absolutely silent operation, the limitation being no HDTV.

At this point I'll probably revert back to my original plan of installing Gentoo with Mythtv on top of it, and leverage VMware Server to serve a number of Wyse terminals which the kids use for homework.  The native, non-virtualized setup described here: http://www.freewysemonkeys.com/modules.php?name=Forums&file=viewtopic&p=3807&highlight=#3807

Thanks for your response.  You saved me at least another week of floundering trying to get it to work. 



tschak909

  • LinuxMCE God
  • ****
  • Posts: 5549
  • DOES work for LinuxMCE.
    • View Profile
Re: Lirc & serial - I'm missing something simple?
« Reply #3 on: October 06, 2008, 08:42:35 pm »
Why are you trying so hard to make this hard on yourself?

Spend some time altering your hardware a bit, and you can have a system so far beyond what you could ever get with a base MythTV install.

I mean, jeez.. I've installed this thing into large houses, running multiple media directors (largest install i've done has NINE media directors), controlling the lights, doing the climate, doing the security system, and.. oh yeah... handling the telephone system too.

-Thom
« Last Edit: October 06, 2008, 08:44:18 pm by tschak909 »

darrenmason

  • Addicted
  • *
  • Posts: 529
    • View Profile
Re: Lirc & serial - I'm missing something simple?
« Reply #4 on: October 08, 2008, 12:44:08 am »
Check this thread http://forum2.linuxmce.org/index.php?topic=962.0

This is what I did last time to get serial receiver working. assume it still works

regards
Darren