Setting up a serial LIRC receiver at COM2

Serial LIRC receiver diode with an D-Sub 9 connector

Serial LIRC receiver diode with an D-Sub 9 connector


This is a little HOWTO about setting up LIRC at another port than usual.


Nowadays most boards coming to market do only posses one serial port. Unfortunately it’s a common habit leaving away the D-Sub 9 back-panel mount. Actually there’s only a pin array on the motherboard itself.
If you only have a serial LIRC receiver you want to connect, and nothing else, like a UPS or stuff, you can just buy such a cable for a few cent. See pic:

D-Sub 9 and COM1  Motherboard connector

D-Sub 9 and COM1 Motherboard connector


But for a few bugs more you can buy a two port serial PCI adaptor. Current Linux distros support most of the card, and it’s quite painless to make such a serial card work. Just plug the card into the mainboard, boot your machine and perform a:

lspci | grep -i serial
05:01.0 Serial controller: NetMos Technology PCI 9835 Multi-I/O Controller (rev 01)

The command

dmesg | grep ttyS

should also return a few lines. If so, you know the adaptor was recognized by the Linux kernel, and only thing to do now, is to mask out the kernels own serial functionality. This is usually done by the command:

setserial /dev/ttyS1 uart none

If this command is not installed, simply perform a ‘aptitude install setserial‘ on a Debian-based system.
You’ll also have to install LIRC:

aptitude install lirc

It’s common an interactive interface is going to ask you a few question, and you have to make a few selections.
The important things are:

  • Home-brew (16x50 UART compatible serial port)
  • transmitter: none (if you are using a passive only device, without controlling anything else)
  • /dev/ttyS1

Where:

  • /dev/ttyS0 is COM1
  • /dev/ttyS1 is COM2
  • /dev/ttyS2 is COM3

2 thoughts on “Setting up a serial LIRC receiver at COM2

  1. paul

    Im a layman to all this. I wanted to unlock a huawei modem on XP through COM port but I dont know if im required to add what kind of hardware to the port since the software i am using keep on telling me that there is no detection. can you help

Comments are closed.