Talk:How to make use of IrDA

From ThinkWiki
Jump to: navigation, search

The "wrong chip version ff" is a real issue, and having it mentioned makes sure that google searches turn it up with a solution. Tonko 01:41, 8 Oct 2005 (CEST)


The present text confused me (as you now have noticed). Maybe it should better reflect that the error is incorrect ("wrong chip version ff" instead of "FIR mode not enabled" or whatever). Would that be acceptable?

Paul Bolle 02:05, 8 Oct 2005 (CEST)


If you think you can explain it better, go right ahead. The IrDA document could use some major cleaning.

As long as we still point out that the only error in syslog is "Wrong chip version ff" when trying to load the FIR module without first activating the PnP device. It would be nice if the ISA-PNP patch to the nsc-ircc driver got accepted upstream, so we dont have to do these hacks anymore. Tonko 03:58, 8 Oct 2005 (CEST)


Tonko,

Is there a reason why you deleted the TODO entry for linux 2.6 kernel config for SIR? I would like to readd it, but like to hear your reason to remove it first.

Paul Bolle 10:23, 14 Oct 2005 (CEST)

T23 debianized kernel with probs

Found another crazy thing here. T23 2648-2GG, with 2.6.13 and 2.6.14 (Debianized Source). Clear init of nsc-ircc and dongle, but the dongle stays offline (dark and blind). Booted with Knoppix or Bart-PE Windows give correct function of the whole device, viewed with a digicam shows some blinks at init. But not with plain 2.6.13 an 2.6.14 from Debian. Eric

setpnp

Hello,

since the nsc-ircc patch isn't in 2.6.15, I tried to go the setpnp route, but I don't even get to see /proc/bus/pnp even though I enabled the support for it in the kernel config (once I found out that I need to enable ISA support to even get the option). Has anyone successfully used setpnp to enable the IRDA port or is that just some sort of urban legend? ;)

--spiney 19:12, 4 Jan 2006 (CET)


Make sure you enable pnp-bios support specifically when compiling the kernel, just enabling pnp support is not enough. I must however admit that I have not done this, since my ancient TP 770 running a 2.4 kernel, which was at least 5 years ago.

I just looked at a 2.6 menuconfig myself, and could not find the option, but looking at my .config file I can see the CONFIG_PNPBIOS option, so you might just want to edit the config file directly, enable the PNPBIOS option, and run make oldconfig.

--Tonko 19:38, 4 Jan 2006 (CET)


I do have the pnp-bios support enabled (the option is depending on ISA among others, checked the Kconfig file in the source tree to find it), and also the proc-Interface option, but still no go... maybe it's not compatible with CONFIG_PNPACPI? Oh well, nevermind, going back to the patch, that works with less hassles, I just hope it'll end up in the vanilla kernel eventually. Still thanks for the help.

--spiney 20:22, 4 Jan 2006 (CET)


Ok, on further investigation (not giving up that easily ;) it really seems that CONFIG_PNPACPI is disabling PnPBIOS, at least dmesg showed something along the lines of "PnPBIOS: disabled by PnPACPI". But, after recompiling without PnPACPI, I still can't get it to work. I can use setpnp and lspnp just fine, but the nsc-ircc module won't load:

t43p:~# lspnp 12
12 IBM0071 IBM Thinkpad infrared port
t43p:~# setpnp 12 io 0x2f8 irq 3
t43p:~# lspnp -v 12
12 IBM0071 IBM Thinkpad infrared port
        dma 3
        io 0x02f8-0x02ff
        irq 3
t43p:~# modprobe nsc-ircc io=0x2f8 irq=3 dongle_id=0x09
FATAL: Error inserting nsc_ircc (/lib/modules/2.6.15/kernel/drivers/net/irda/nsc-ircc.ko): No such device

Hmm, I'm getting somewhat annoyed... any ideas?

--spiney 20:58, 4 Jan 2006 (CET)


have you tried just doing setpnp 12 on

--Tonko 21:05, 4 Jan 2006 (CET)


Yes, that was the first thing I tried, didn't help. BTW, I just fiddled around with lirc a bit (never tried it before), and the lirc_sir module works just fine:

lirc_sir: I/O port 0x02f8, IRQ 3.
lirc_sir: Installed.

and I was able to get it to control xmms.

setserial doesn't claim the device either:

t43p:~# setserial -ag /dev/ttyS0
/dev/ttyS0, Line 0, UART: unknown, Port: 0x0000, IRQ: 0
        Baud_base: 921600, close_delay: 50, divisor: 0
        closing_wait: 3000
        Flags: spd_normal skip_test

I'm really out of ideas.

--spiney 21:20, 4 Jan 2006 (CET)


Hmm, it should not be ttyS0, but ttyS1 which might be stepping on the resources ttyS0 is IO 0x3f8 and IRQ 4, while ttyS1 is IO 0x2f8 and IRQ 3.

ttyS0 is your integrated serial port, which even ThinkPads without physical serial port have.

--Tonko 21:29, 4 Jan 2006 (CET)


Sorry, I cut'n'paste the wrong device since I checked them both, the output for ttyS1 is identical (apart from "/dev/ttyS1, Line 1" of course).

--spiney 21:36, 4 Jan 2006 (CET)


No idea what might be wrong, perhaps it does not work on more recent machines, or kernels.

As I said, it worked for me a long time ago on my 770X with something like this:

/bin/setserial /dev/ttyS1 uart none port 0 irq 0
setpnp 12 io 0x2f8 irq 3
setpnp 12 on
modprobe nsc-ircc dongle_id=0x09 io=0x2f8 irq=3

What is the error you get from nsc-ircc in syslog? the "Wrong chip version ff" error?

--Tonko 22:22, 4 Jan 2006 (CET)


No errors are recorded at all (dmesg, syslog), just the message above on stderr from modprobe.

--spiney 09:27, 5 Jan 2006 (CET)


BTW, is it just me or does the nsc-ircc patch only work if CONFIG_PNPACPI is set in the kernel config? Otherwise the module loads fine, (but without stating in the kernel log that it found the dongle) and using IRDA does not work, irattach returns "irattach: ioctl(SIOCGIFFLAGS): No such device".

--spiney 14:37, 12 Jan 2006 (CET)


Not even SIR working on R52

I don't want/need FIR right now, so i thought i wouldn't have to mess with it. I don't have /proc/bus/pnp, but i'm pretty sure infrared should work without it as well. I do not have a kernel patch and am using the current Ubuntu Breezy 2.6.12-10 kernel. Problem is, that when starting

irattach /dev/ttyS1 -s

It complains in syslog: no such device On ttyS0 it works fine, but well does not find any packets.

# setserial -ag /dev/ttyS1
/dev/ttyS1, Line 1, UART: unknown, Port: 0x0000, IRQ: 0
       Baud_base: 921600, close_delay: 50, divisor: 0
       closing_wait: 3000
       Flags: spd_normal skip_test

# cat /dev/ttyS1
cat: /dev/ttyS1: input-/outputerror

So i tried:

sudo setserial /dev/ttyS1 uart 16550A port 0x02f8 irq 3

Well now irattach will attach to ttyS1, irdadump will show me the packets sent by my computer, but won't receive my cellphone's packets (Nokia 6210). In Windows, everything works fine.

Same case here

I have the same problem here, it used to work on 2.6.15. nsc-irc works, even a MCS7780 USB-IRDA adapter works, but the chip doesn't seem to send/receive on 2.6.17 and 2.6.18 (I checked with a CCD camera, no light signal at all), also findchip -d says:

 root@golem3:/etc# findchip -d
 Probing for FDC37C669 ...
 Wrong chip id=0xff
 Wrong chip id=0xff
 Probing for FDC37C669FR ...
 Wrong chip id=0xff
 Wrong chip id=0xff
 Probing for FDC37N869 ...
 Wrong chip id=0xff
 Wrong chip id=0xff
 Probing for FDC37C93xFR ...
 Wrong chip id=0xff
 Wrong chip id=0xff
 Probing for FDC37N957FR ...
 Wrong chip id=0xff
 Wrong chip id=0xff
 Probing for FDC37N958FR ...
 Wrong chip id=0xff
 Wrong chip id=0xff
 Probing for PC87108 ...
 no chip at 0x150
 no chip at 0x398
 no chip at 0x0ea
 Probing for PC87338 ...
 no chip at 0x398
 no chip at 0x15c
 Wrong chip id=0x00
 Probing for EFER at 0x03f0 ...
 hefras = 0xff
 Probing for EFER at 0x0370 ...
 hefras = 0xff
 EFER seems to be probed at 0x0370
 chip id = 0xff, revision = 0xff
 Wrong device ID = 0xff
 Probing for EFER at 0x0250 ...
 hefras = 0xff
 Probing for EFER at 0x0250 ...
 hefras = 0xff
 Probing for EFER at 0x03f0 ...
 hefras = 0xff
 hefere = 0xff
 Probing for EFER at 0x03f0 ...
 hefras = 0xff
 hefere = 0xff
 EFER seems to be probed at 0x03f0
 chip ID is 0x0f : no known chip was detected.
 Couldn't find Winbond superI/O chip.
 

dmesg:

 nsc-ircc, chip->init
 nsc-ircc, Found chip at base=0x02e
 nsc-ircc, driver loaded (Dag Brattli)
 IrDA: Registered device irda0
 nsc-ircc, Using dongle: IBM31T1100 or Temic TFDS6000/TFDS6500
 IBM TrackPoint firmware: 0x0e, buttons: 3/3
 serial8250: too much work for irq3
 sirdev_get_instance - ttyS1
 irtty_open - ttyS1: irda line discipline opened
 irlap_change_speed(), setting speed to 9600
 nsc_ircc_pnp_probe() : From PnP, found firbase 0x2F8 ; irq 3 ; dma 3.
 nsc-ircc, chip->init
 nsc-ircc, Found chip at base=0x02e
 nsc-ircc, driver loaded (Dag Brattli)
 IrDA: Registered device irda0
 nsc-ircc, Using dongle: IBM31T1100 or Temic TFDS6000/TFDS6500

--GuySoft

>Have you enabled infrared in BIOS? Defiant 21:25, 29 September 2006 (CEST)

Yes I did, It used to function in 2.6.15! its the new 2.6.17 kernel that messed it up, also 2.6.18 doesn't help.

update - IBM31T1100 and lirc

Working now in 2.6.18, however I can't get lirc to work.

In dmesg i get: [code] lirc_dev: lirc_register_plugin: sample_rate: 0 lirc_sir: i/o port 0x02f8 already in use. [/code]

Also "/bin/setserial /dev/ttyS1 uart none" doesn't help

Any help there? Guysoft 19:40, 31 December 2006 (CET)

lirc and FIR works on R52!!

I got both lirc and the FIR module to work on my thinkpad r52.

For lirc I had to :

 $ killall -9 irattach
 $ setserial /dev/ttyS1 uart none
 $ rmmod nsc_ircc

then:

 $ modprobe lirc_sir

and then run:

 $ lircd -d /dev/lirc0 /etc/lircd.conf --nodaemon

For FIR i need to:

 modprobe nsc_ircc

I hope this helps anyone that has problems.

Guysoft 15:08, 15 January 2007 (CET)

The lirc_sir module has problems with suspend (disk/ram both).

I'm using Debian Etch kernel 2.6.18-4-686 (version 2.6.18.dfsg.1-11) with the lirc-modules-source (version 0.8.0-9.2). The lirc_sir module was built with "other" as type of the SIR device.

With this kernel the nsc_ircc module suspends/resumes properly.

I tried to do a module unload and reload, but surprisingly even that failed. Before the suspend I get normal output from mode2 but after the resume there is no output at all :-(

Kapil 15:39, 09 March 2007 (PST)

One a separate note. The "nsc_ircc" module and the "lirc_sir" module seem to conflict.

If I load one module and then the other, the system appears to hang. So I wonder how Guysoft managed to get this working.

Kapil 15:46, 09 March 2007 (PST)

T23 IrDA silent?

Hi. I got SIR working pretty easily on my T20. I cannot get anything to work on my T23. I can get the nsc-ircc module to load, and now irattach works (both with and without nsc-ircc), and I've checked the relevant info in /proc/sys/net/irda, but nothing shows up in /proc/net/irda/discovery, and irdadump gives nothing at all. No errors in dmesg or the log. The red LED never lights. It flashes constantly in Windows.

--SystemParadox 16:58, 1 May 2006 (CEST)

Problems accessing a Nokia phone

i just compiled a brand new 2.6.18 Linux Kernel. Now, even tough the Kernel modules are loaded and irda-utils start correctly i am having trouble accessin my Nokia 6135.

This are the contents of my /etc/modprobe.d/irda-utils:

alias irda0 nsc-ircc options nsc-ircc dongle_id=0x09 io=0x2f8 irq=3 dma=3 install nsc-ircc /bin/setserial /dev/ttyS1 uart none port 0 irq 0; /sbin/modprobe --ignore-install nsc-ircc

/var/log/syslog:

Sep 28 11:33:00 raziel kernel: pnp: Device 00:0b activated. Sep 28 11:33:00 raziel kernel: nsc_ircc_pnp_probe() : From PnP, found firbase 0x2F8 ; irq 3 ; dma 3. Sep 28 11:33:00 raziel kernel: nsc-ircc, chip->init Sep 28 11:33:00 raziel kernel: nsc-ircc, Found chip at base=0x02e Sep 28 11:33:00 raziel kernel: nsc-ircc, driver loaded (Dag Brattli) Sep 28 11:33:00 raziel kernel: IrDA: Registered device irda0 Sep 28 11:33:00 raziel kernel: nsc-ircc, Using dongle: IBM31T1100 or Temic TFDS6000/TFDS6500 Sep 28 11:34:34 raziel irattach: got SIGTERM or SIGINT Sep 28 11:34:34 raziel irattach: Stopping device irda0 Sep 28 11:34:34 raziel irattach: exiting ... Sep 28 11:34:35 raziel irattach: executing: '/sbin/modprobe irda0' Sep 28 11:34:35 raziel irattach: executing: 'echo raziel > /proc/sys/net/irda/devname' Sep 28 11:34:35 raziel irattach: executing: 'echo 1 > /proc/sys/net/irda/discovery' Sep 28 11:34:35 raziel irattach: Starting device irda0 Sep 28 11:34:35 raziel kernel: irlap_change_speed(), setting speed to 9600

But when wammu tries to find the phone (which is right in front of the left side of laptop, where the IR port supposedly is AND it has IR reception enabled):

Starting /dev/ttyS0 - ['at19200', 'at115200', 'fbusdlr3', 'fbus', 'mbus', 'fbuspl2303'] Starting /dev/ttyS1 - ['at19200', 'at115200', 'fbusdlr3', 'fbus', 'mbus', 'fbuspl2303'] Starting /dev/ttyS2 - ['at19200', 'at115200', 'fbusdlr3', 'fbus', 'mbus', 'fbuspl2303'] Scanning for bluetooth devices using PyBluez Could not access Bluetooth subsystem (error accessing bluetooth device) Finished /dev/ttyS0 - ['at19200', 'at115200', 'fbusdlr3', 'fbus', 'mbus', 'fbuspl2303'] Finished /dev/ttyS1 - ['at19200', 'at115200', 'fbusdlr3', 'fbus', 'mbus', 'fbuspl2303'] Finished /dev/ttyS2 - ['at19200', 'at115200', 'fbusdlr3', 'fbus', 'mbus', 'fbuspl2303'] All finished, found 0 phones

This phone does not have bluetooth so im basically out of options, ideas anyone?

Any suggestions much appreciated

--Havok1977 12:05, 28 Sep 2006 (CEST)

No irrecord output

So I loaded lirc_sir on my T43 and it says all is ok. However I don't seem to get anything out of irrecord. I am pretty sure my remote control is ok. What am I missing?

--mr.dnme 19:29, 25 Jan 2008

2.6.27 auto sets dongle_id

Just a quick note that as of 2.6.27 the nsc_ircc driver auto sets the dongle_id to 0x09 when loading on a ThinkPad (based on IrDA ISA PnP ID). So one less thing that needs to be configured. In fact with this change I think all the outstanding issues are resolved and the nsc_ircc driver should load without any modprobe.conf modifications. --Tonko 21:51, 20 October 2008 (CEST)

LIRC and IrDA

LIRC and IrDA now works on my Thinkpad 600. The hardest part was to keep away nsc-ircc from configuring the system. Finally i decided to move the complete irda-path from /lib/modules... to another location :-) Now the IR-module receives commands from all of my 4 remote controls. I will create a lircd.conf with irrecord, using with the generic/NEC.conf, for the RC from Aiwa, RC-AVR05 the next days. Now i have go to the cinema, Berlinale is calling. Bye

--Hagen 20:00, 20 February 2011 (CET)