LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 10-22-2011, 08:25 AM   #1
sdfi
Member
 
Registered: Oct 2011
Distribution: debian
Posts: 107

Rep: Reputation: Disabled
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).
 
Old 10-22-2011, 10:59 AM   #2
ceyx
Member
 
Registered: May 2009
Location: Fort Langley BC
Distribution: Kubuntu,Free BSD,OSX,Windows
Posts: 342

Rep: Reputation: 59
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 >
 
0 members found this post helpful.
Old 10-22-2011, 11:53 AM   #3
sdfi
Member
 
Registered: Oct 2011
Distribution: debian
Posts: 107

Original Poster
Rep: Reputation: Disabled
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??
 
Old 10-23-2011, 08:25 AM   #4
sdfi
Member
 
Registered: Oct 2011
Distribution: debian
Posts: 107

Original Poster
Rep: Reputation: Disabled
Found there is a section 'IrDA (infrared) subsystem support' under networking in make menuconfig. Selected this and a few suboptions.. rebuilding now.
 
Old 10-23-2011, 09:33 AM   #5
sdfi
Member
 
Registered: Oct 2011
Distribution: debian
Posts: 107

Original Poster
Rep: Reputation: Disabled
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?
 
Old 10-24-2011, 10:03 AM   #6
sdfi
Member
 
Registered: Oct 2011
Distribution: debian
Posts: 107

Original Poster
Rep: Reputation: Disabled
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.

Last edited by sdfi; 10-24-2011 at 03:07 PM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to use Irda Belkin SigmaTel STIr4200 IRDA/USB with LIRC? Xeratul Linux - Hardware 0 09-13-2011 09:27 PM
help with infrared shadowsa SUSE / openSUSE 4 11-01-2006 03:31 PM
CUPS and irda (infrared) printing johnandrews Linux - Hardware 1 10-31-2005 04:42 AM
Infrared Port Pmett Linux - Hardware 3 08-10-2004 09:08 PM
Infrared 2kool Linux - Newbie 1 02-07-2002 08:11 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 07:58 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration