LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Hardware (https://www.linuxquestions.org/questions/linux-hardware-18/)
-   -   InfraRed / IRDA -- lirc_sir ?? (https://www.linuxquestions.org/questions/linux-hardware-18/infrared-irda-lirc_sir-909526/)

sdfi 10-22-2011 08:25 AM

InfraRed / IRDA -- lirc_sir ??
 
I'm trying to get my IrDA port working (with the ultimate aim of taking commands from an IR remote control).

I found a guide for my system here;
Quote:

Infrared Port
SIR works (tested with irlan connection to my simpad)

- Set irda port to SIR mode in bios setup and Port: 0x03f8, IRQ: 4
- irattach /dev/ttyS0 -s
- cat /proc/net/irda/discovery
IrLMP: Discovery log:
nickname: Linux, hint: 0x4400, saddr: 0x64dd1f1a, daddr: 0x4653e0bd
I have done the bios setup, but running irattach i get 'command not found'. How do i install irattach?;
I installed irda-utils with apt-get which returned at the end;
Code:

.udevdb or .udev prescencer implies active udev. Aborting MAKEDEV invocation.
.udevdb or .udev prescencer implies active udev. Aborting MAKEDEV invocation.
Skipping IrDA service: irattach (not enabled)...done

apt-get install irattach didn't work and i didn't find anything in the .config file for the kernel called irattach. (if it is here, preferably the menuconfig location if possible).

Info: Kernel: 2.6.38-voyage (Voyage linux).

ceyx 10-22-2011 10:59 AM

My IR remote was a bit of a trick to setup. The receiver is listened for on a socket, rather than ttyS0. Don't know if this helps, but perhaps it is a clue.

< gratuitous plug > see my website for a how-to on Lirc < /gratuitous plug >

sdfi 10-22-2011 11:53 AM

Well, NB that this guide [although it is 7 years old(!)] was from someone with the exact same hardware (Acer Aspire 2012 WLMi), so i would assume it would be on ttyS0 ? Maybe get to Lirc once i know it actually works in some capacity. Anyway as OP i need to figure out how to install irattach??

sdfi 10-23-2011 08:25 AM

Found there is a section 'IrDA (infrared) subsystem support' under networking in make menuconfig. Selected this and a few suboptions.. rebuilding now.

sdfi 10-23-2011 09:33 AM

Now the 'irattach /dev/ttyS0 -s' command works (returns 'NET: Registered protocol family 23'), and running '- cat /proc/net/irda/discovery' outputs
Code:

IrLMP: Discovery log:
but none of 'nickname: Linux, hint: 0x4400, saddr: 0x64dd1f1a, daddr: 0x4653e0bd'.. does this need to be set somewhere or something?

sdfi 10-24-2011 10:03 AM

OK, have made some good progress but hit a wall...

The info at lirc.org suggests which modules i need;
Quote:

Originally Posted by lirc.org/html/table.html
Hardware | configure --with-driver option | Required LIRC kernel modules
SIR IrDA (built-in IR ports) | sir | lirc_dev lirc_sir

modprobe lirc_sir outputs
Code:

lirc_register_driver: dev pointer not filled in!
lirc_sir: init_chrdev() failed.
FATAL: Error inserting lirc_sir (/path/to/lirc_sir.ko): Input/output error


Googling this suggested using the GIT version of LIRC.

so, i followed the guide below (after installing git)
Quote:

Originally Posted by lirc.org/git.html
Get the sources:
git clone git://lirc.git.sourceforge.net/gitroot/lirc/lirc

Subsequent updates:
git pull

Compile:
cd lirc
./autogen.sh
./setup.sh
make

You need at least libtool-1.5.22, automake-1.9.6 and autoconf-2.61 to build the necessary files.

./setup.sh complained 'dialog not found'. So i installed dialog. Following the guide at http://ubuntuforums.org/showthread.php?t=765454 I went through the config, selecting SIR, onboard IRDA, and the correct address / IRQ, no issues there.

at the next point, when running 'mode2' i get 'mode2: could not get file information for /dev/lirc, mode2: default_init(): no such file or directory'. AFAICT, the issue is that there is no /dev/lirc (or /dev/lirc0, /dev/lircd) i foud somewhere that said this means the driver is probably not properly installed. Which makes sense as modprobe lirc_sir still returns the original result. (I'm not 100% sure i installed LIRC correctly from git.. as i didn't uninstall anything first?).

EDIT: yes, it was loading the old lirc_sir from the kernel.. i renamed this .ko file (bad practice, i'm sure, but i CBA to rebuild the kernel again just to try that).. re-removed/installed lirc from GIT again, rebooted. Now get 'lirc_sir: i/o port 0xXXXX already in use.' this required '/bin/setserial /dev/ttyS0 uart none' and then 'modprobe lirc_sir' worked(!!). THEN just 'cd /dev, ln -s lirc0 lirc' and mode2 takes inputs now i 'just' need to set the remote /commands up.


All times are GMT -5. The time now is 11:49 PM.