IRDA (FIR mode) on Toshiba laptop with an smsc-ircc IrDA device and no BIOS setting.
Because the laptop came with IRDA, this was more of a challenge than anything else, and more difficult than first imagined. Most people get SIR working, I didn't!
The information in this post is distributed over various how-to's, gmane and other places. Thanks to all.
If your laptop (Toshiba) is equipped with an "ISA bridge: Intel Corporation 82801DBM (ICH4-M) LPC Interface Bridge", and a 24cc controller or similar, it will require the smsc-ircc2 kernel module driver. Patches are added from time to time and may be viewed on Gmane; http://blog.gmane.org/gmane.linux.irda.general
If you want to support a specific combination of bridge and controller Gmane may be a good place to start, to see if your combination is supported.
Slackware 11.0, 12.0 and 12.1 running a recent 2.6.x kernel, and more recently (k)ubuntu 8.10.
Please read the documentation for your distribution.
NOTE; The smsc-ircc2 module is experimental and may break your system.
Latest irdautils, openobex and recent kernel (126.96.36.199 at the time of writing) (still working with 188.8.131.52 and ubuntu 2.6.27-9-generic
Not an issue with (k)ubuntu
Networking > IRDA (compiled as modules).
ISA and Serial support enabled (SIR capable).
The smsc-ircc2 module is experimental, therefore it is necessary to set > Code maturity level options > Prompt for development and/or incomplete code/drivers = y.
Please refer to the many howto's on compiling and installing the linux kernel.
PCI by name (the relevant bits)
00:1f.0 ISA bridge: Intel Corporation 82801DBM (ICH4-M) LPC Interface Bridge (rev 03)
Flags: bus master, medium devsel, latency 0
PCI by numbers;
#lspci -v -n
00:1f.0 0601: 8086:24cc (rev 03)
Flags: bus master, medium devsel, latency 0
Install the software and then create the IrDA devices (linux irda howto - 2.6 kernel)
# mknod /dev/ircomm0 c 161 0
# mknod /dev/ircomm1 c 161 1
# mknod /dev/irlpt0 c 161 16
# mknod /dev/irlpt1 c 161 17
# mknod /dev/irnet c 10 187
# chmod 666 /dev/ir*
Set the aliases in /etc/modprobe.d - Kernel 2.6.x requires a separate entry eg. /etc/modprobe.d/smsc-ircc2 will do.
Regardless of options placed in modprobe.d, I chose to pass the required options during modprobe. It was impossible to load the module otherwise.
alias irda0 smsc-ircc2
alias tty-ldisc-11 irtty-sir
alias char-major-161 ircomm-tty
alias char-major-10-187 irnet
For information on your chip, run smcinit.
NOTE: Other than for setup, never run smcinit to initialize the smsc-ircc IrDA device - it will prevent IR from working.
SIR ioport: 0x3f8
FIR ioport: 0x130
FIR interupt: 3
FIR DMA: 3
Detected IO hub vendor id: 0x8086
Detected IO hub device id: 0x24cc.
Detected Chip id: 0x7a
SIR ioport register write: 0xfe read: 0xfe
FIR interrupt register write: 0x3 read: 0x3
FIR ioport register write: 0x26 read: 0x26
FIR dma register write: 0x3 read: 0x3
Initialization of the SMC 47Nxxx succeeded
Windows device manager indicates the following values;
I/O 02f8 - 02FF (SIR)
I/O 0130-0137 (FIR)
IRQ 07 (FIR)
DMA 01 (FIR)
There are differences in some values between Windows and smcinit. I used the smcinit values.
The SIR serial device in this case is /dev/ttyS0 - but may vary depending on your hardware.
/dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4
From smcinit above, SIR ioport: 0x3f8 = /dev/ttyS0 Port: 0x03f8.
dmesg will provide the same information concerning your serial ports, however, it may be necessary to match the correct serial driver with the irda hardware, as they may vary from machine to machine.
To initialize FIR, first disable the serial device;
#setserial /dev/ttyS0 uart none
or whatever your SIR port /dev/ttySX is.
Load the smsc-ircc2 module using the values provided by smcinit;
#modprobe smsc-ircc2 -v --ignore-install ircc_dma=3 ircc_irq=3 ircc_fir=0x130 ircc_sir=0x3f8
--ignore-install was not always necessary, but occasionally the module would not load without it? See "man modprobe" for details. ircc_dma=7 works also. Otherwise, the values are fixed as far as I can tell. -v for debugging.
# dmesg grep | tail
Detected unconfigured Toshiba laptop with Intel 8281DBM LPC bridge SMSC IrDA chip, pre-configuring device.
Setting up Intel 82801 controller and SMSC device
Overriding FIR address 0x0130
Overriding SIR address 0x03f8
SMsC IrDA Controller found
IrCC version 2.0, firport 0x130, sirport 0x3f8 dma=3, irq=3
No transceiver found. Defaulting to Fast pin select
IrDA: Registered device irda0
If all has gone well you should see something similar to this in /var/log/messages
Oct 20 16:32:38 localhost irattach: executing: '/sbin/modprobe irda0'
Oct 20 16:32:38 localhost irattach: executing: 'echo xx > /proc/sys/net/irda/devname'
Oct 20 16:32:38 localhost irattach: executing: 'echo 1 > /proc/sys/net/irda/discovery'
Oct 20 16:32:38 localhost irattach: Starting device irda0
"xx" the laptop - 1 device discovered.
Then run irdadump to verify the whole process. You should see your computer and any device that you used to test the link. In this case a Palm.
07:32:53.284907 xid:cmd 286e7df5 > ffffffff S=6 s=5 (14)
07:32:53.374893 xid:cmd 286e7df5 > ffffffff S=6 s=* xx hint=0400 [ Computer ] (18)
07:32:54.462330 xid:rsp 286e7df5 < 3ea004c9 S=6 s=5 zz hint=8220 [ PDA/Palmtop IrOBEX ] (20)
07:32:55.834526 xid:cmd 286e7df5 > ffffffff S=6 s=0 (14)
xx is the computer name, zz is the Palm username.
And, just to be sure, the following shows the Palm device.
# cat /proc/sys/net/irda/discovery
IrLMP: Discovery log:
nickname: zz, hint: 0x8220, saddr: 0x286e7df5, daddr: 0x3ea004c9
This start|stop|restart script is adapted from the slmodemd script. Added module loading and unloading, to ensure that all relevant modules are loaded before the smsc-ircc2 module, otherwise IR will not work, and to unload the modules when stopping IR, ready for the next start. Not really necessary, but it is cleaner and prevents problems.
NOTE: Don't use this script in (k)ubuntu.
# Start irda
if [ -x /sbin/setserial ]; then
echo -n "Starting irda:"
/sbin/setserial /dev/ttyS0 uart none
/sbin/modprobe smsc-ircc2 --ignore-install ircc_dma=3 ircc_irq=3 ircc_fir=0x130 ircc_sir=0x3f8
/usr/sbin/irattach irda0 -s
echo "Shutting down irda"
case "$1" in
echo "usage $0 start|stop|restart"
Make it executable - as su or sudo
#chmod +x /etc/rc.d/rc.irda
Run as su or sudo
Irlan, irnet, rfcomm, phone and pda connections etc, are adequately explained in other tutorials.
I did manage to sync the Palm with my desktop. Set /dev/ircomm0 in Kpilot or Jpilot preferences. If you are using Gnome, it's under Evolution, Edit>Synchronisation options... menu, or the Gnome Preferences menu.
Kubuntu 8.10 setup:
1. Ubuntu kernel has smsc-ircc2 module configured.
2. In /etc/modprobe.d/irda-utils add line: alias irda0 smsc-ircc2
3. In /etc/default/irda-utils edit: DEVICE="irda0" SETSERIAL="/dev/ttyS0" SMCINIT="no"
4. In /etc/init.d/irda-setup under FIR="smsc-ircc2"; add line: OPTIONS="--ignore-install ircc_dma=3 ircc_irq=3 ircc_fir=0x130 ircc_sir=0x3f8"
NOTE: Invoking smcinit or setting to "yes" in /etc/defaults/irda-utils prevents operation of IR. Ensure other related modules are loaded before invoking /etc/init.d/irda-utils start.