Following a user on the Slitaz distribution he tried to compile IrDA on a system with kernel 5.10.221 (very close to my 5.10.224) and followed these steps:
He extracted the 5.10.221 kernel sources.
He copied the kernel configuration file specific to his distribution (linux-slitaz.config64).
He prepared the environment for building modules.
He downloaded the kernel-5.4 branch from the IrDA GitHub repository.
He compiled the module successfully.
So I did this:
Deleted the current IrDA directory:
rm -rf ~/irda
Cloned the repository with the correct branch (kernel-5.4):
git clone --branch kernel-5.4 https://github.com/cschramm/irda.git ~/irda
Verify that the correct branch has been downloaded and Compiling the module:
cd ~/irda
git tag
git checkout kernel-5.4
make -C src
Using DKMS
autoconf -f && ./configure
sudo dkms add src
sudo dkms install "irda/$(git show --pretty=format:"%cd~%h" --date="format:%Y%m%d" | head -1)"
Searching for the infrared model, in this case, thanks to Windows 2000 I have SMC IrCC Fast Infrared Port on Intel 82801 BAM LPC controller.
According to the README the correct driver is smsc-ircc2.
sudo modprobe smsc-ircc2
Checking for correctly loaded module and presence of device:
lsmod | grep ircc
dmesg | grep -i irda
Since the modules were correctly loaded but the device was not visible I ran:
sudo mknod /dev/irda0 c 237 0
This command manually creates the IrDA device if it does not exist. Then I checked if /dev/irda0 was created:
ls /dev/irda0
However the device could not be used.
Even if the kernel detects the device:
dmesg | grep -i irda
5991.309410 irda: loading out-of-tree module taints kernel.
5991.334948 SMsC Irda Controller found.
5991.341004 IrDA: Registered device irda0.
Even if the kernel detects the device:
Then I tried to force the module to load with hardware parameters
with Windows 2000 parameters, this indicated these resources:
I/O range: 02F8-02FF
IRQ: 10
I/O range: 0130-0137
DMA: 01
sudo rmmod smsc_ircc2 irda
sudo modprobe smsc-ircc2 dongle_id=0x09 io=0x02F8 irq=10 dma=1
However this did not work and checking:
$ dmesg | tail -n 20
[ 1539.408315] [UFW BLOCK] IN=eth0 OUT= MAC=01:00:5e:00:00:01:a0:95:7f:5e:f8:a0:08:00 SRC=192.168.1.254 DST=224.0.0.1 LEN=32 TOS=0x00 PREC=0x00 TTL=1 ID=52087 DF PROTO=2
[ 1573.370857] usb 1-1: USB disconnect, device number 4
[ 1664.403542] [UFW BLOCK] IN=eth0 OUT= MAC=01:00:5e:00:00:01:a0:95:7f:5e:f8:a0:08:00 SRC=192.168.1.254 DST=224.0.0.1 LEN=32 TOS=0x00 PREV=0x00 TTL=1 ID=33048 DF PROTO=2
[ 1789.397825] [UFW BLOCK] IN=eth0 OUT= MAC=01:00:5e:00:00:01:a0:95:7f:5e:f8:a0:08:00 SRC=192.168.1.254 DST=224.0.0.1 LEN=32 TOS=0x00 PREC=0x00 TTL=1 ID=20918 DF PROTO=2
[ 1914.392615] [UFW BLOCK] IN=eth0 OUT= MAC=01:00:5e:00:00:01:a0:95:7f:5e:f8:a0:08:00 SRC=192.168.1.254 DST=224.0.0.1 LEN=32 TOS=0x00 PREC=0x00 TTL=1 ID=25665 DF PROTO=2
[ 2039.387446] [UFW BLOCK] IN=eth0 OUT= MAC=01:00:5e:00:00:01:a0:95:7f:5e:f8:a0:08:00 SRC=192.168.1.254 DST=224.0.0.1 LEN=32 TOS=0x00 PREC=0x00 TTL=1 ID=32900 DF PROTO=2
[ 2164.382137] [UFW BLOCK] IN=eth0 OUT= MAC=01:00:5e:00:00:01:a0:95:7f:5e:f8:a0:08:00 SRC=192.168.1.254 DST=224.0.0.1 LEN=32 TOS=0x00 PREC=0x00 TTL=1 ID=17199 DF PROTO=2
[ 2221.875374] NET: Unregistered protocol family 23
[ 2289.376895] [UFW BLOCK] IN=eth0 OUT= MAC=01:00:5e:00:00:01:a0:95:7f:5e:f8:a0:08:00 SRC=192.168.1.254 DST=224.0.0.1 LEN=32 TOS=0x00 PREV=0x00 TTL=1 ID=19662 DF PROTO=2
[ 2331.886144] NET: Registered protocol family 23
[ 2331.899299] smsc_ircc2: unknown parameter 'dongle_id' ignored
[ 2331.899314] smsc_ircc2: unknown parameter 'io' ignored
[ 2331.899320] smsc_ircc2: unknown parameter 'irq' ignored
[ 2331.899326] smsc_ircc2: unknown parameter 'dma' ignored
[ 2331.901156] found SMC SuperIO Chip (devid=0x5a rev=00 base=0x002e): LPC47N227
[ 2331.901184] smsc_superio_flat(): fir: 0x100, sir: 0x2f8, dma: 01, irq: 5, mode: 0x0e
[ 2331.901210] SMsC IrDA Controller found
IrCC version 2.0, firport 0x100, sirport 0x2f8 dma=1, irq=5
[ 2331.903000] No transceiver found. Defaulting to Fast pin select
[ 2331.906458] IrDA: Registered device irda0
The message: No transceiver found. Defaulting to Fast pin select means that the smsc_ircc2 module was loaded correctly, recognized the hardware and registered irda0, but did not detect a transceiver (the hardware component that allows infrared communication).
I wanted to check if the serial port was correct.
$ sudo dmesg | grep tty
[ 0.114823] printk: console [tty0] enabled
[ 5.073519] 00:06: ttyS0 at I/O 0x3f8 (irq = 4, base_baud = 115200) is a 16550A
The message I got from dmesg | grep tty indicates that the serial port ttyS0 was recognized correctly and is on I/O port 0x3f8 with IRQ4, which is the default serial port (COM1). This is consistent with the BIOS setup I saw earlier, where the serial port is configured to COM1.
The presence of ttyS0 confirms that the part of the operating system that handles serial communication (which is critical for IrDA) is up and running. However, the fact that you are not seeing irda0 in /dev implies that the infrared device was not created correctly, despite the smsc_ircc2 module being loaded.
I tried using Kernl 4.9.0 but it doesn't work. In fact the system doesn't even boot, remaining with a black screen. I guess it's the IrDA module that is not compatible.
In fact during the kernel installation it gave errors: Untitled file — Codefile
I also tried for kernel 6.10.11 but it didn't work. It didn't even install correctly, generating errors.
In the README it says.
### Minimum Linux versions?
5.4. (See the kernel- tags for versions that support previous Linux versions (up to 4.15).)*
This is strange because on the github.com page it is stated:
Minimum Linux versions?
6.6. (See the kernel- tags for versions that support previous Linux versions (up to 4.15).)*