How to tweak the serial port settings to make Linux recognize my IR receiver

Posted on 2008-10-23
Last Modified: 2013-12-16
I'm trying to make my custom make infrared receiver /for remote control/  work under Linux with Lirc.
I've searched the inet quite a bit and my worries are that although Linux sees that there's "something" attached to the serial port I can't make it recognize the incoming data sent from the IR receiver. In other words people report the command
cat /dev/ttyS0
causing garbage characters to be dumped on the console whereas I don't seem to be getting anything at all.
The only good news is that after issuing the above command my IR receiver becomes alive - the LED responds to my remote control, alas without any data coming in. The receiver works fine under WinXP - I'm using girder with the Igor SFH-56 driver
Any comments, suggestions, recommendations greatly appreciated!
Question by:tlatev
  • 6
  • 6
LVL 20

Expert Comment

ID: 22787256
I have not seen this one.  I don't know if a driver exists for it under Lirc
It is not listed under the supported receivers :

You could try the generic serial setup but your one will probably need something sent to it to start the ball rolling (thats why you get no data when you cat the com port)
LVL 20

Expert Comment

ID: 22787294
from :

The current snapshot of lirc doesn't support Home-brew serial-port driver Igor Cesko's variation. During lirc installation user can only select "Home-brew serial-port driver", which does not work with Igor Cesko's variation.

Why we should have support for this dongle? Because is very, very cheap and very easy to build, see link I've been using this kind of dongles for years.

Proposed solution:
New configuration based on "Home-brew serial-port" should be added, the only difference between normal "Home-brew serial-port" and Igor Cesko's variation is in config file lirc-modules-source.conf. It should contain this options:

Please see also how to build Home-brew serial-port driver Igor Cesko's variation on Feisty.

Author Comment

ID: 22818026
Thanks for the replies!

The link
Produces: "This page does not exist yet. You can create a new empty page, or use one of the page templates."

In the meantime I managed to do some progress
I did a fresh install of Ubuntu 8.04 x64 and it seems that the lirc package has been updated as it now comes with the lirc_serial_igor module precompiled. Following the instructions I disabled the serial port
setserial /dev/ttyS0 uart none
and then issued the command
sudo modprobe lirc_serial_igor
which produced the following lines in dmesg
[ 2633.014157] lirc_dev: IR Remote Control driver registered, major 61
[ 2633.512141] lirc_serial_igor: auto-detected active high receiver
[ 2633.512146] lirc_dev: lirc_register_plugin: sample_rate: 0
I forgot to mention that after disabling the serial port my IR receiver stops responding to my remote, however after I loaded the driver it seems to be getting the signals
At this point according to the instructions I found I'm supposed to cat the /dev/lirc0 char device which should dump the input from my remote on the console
This however is not happening  - I'm still getting no input whatsoever despite the LED activity on the IR receiver

Any suggestions on how to proceed ?
I'd really like to debug whats going on with this driver but I don't know how to do that

I noticed in my lirc-modules-source.conf file the relevant line reads
instead of what you suggested
I was wondering whether I should try recompiling the lirc package after changing that line - do you think that may hold the key to solving the issue?

Author Comment

ID: 22818190
I decided to try the other /non Igor/ module with lirc to see how it's handling my remote and I think I had a breakthrough - I managed to get some input from the remote after cat-ing the lirc0 device, however the lirc daemon now refuses to start with the message
[ 8797.600983] lirc_serial: no version for "lirc_unregister_plugin" found: kernel tainted.
LVL 20

Expert Comment

ID: 22819964
That sounds like you have got modules from two different versions installed.
Try removing both versions and any files you can find and recompiling again.

Author Comment

ID: 22827973
No, I got it working now - turned out I had an instance of lircd running, I haven't compiled anything I used the debs from the repos
So far so good, I'm struggling with the irrecord now - won't recoginze my remote
Backup Your Microsoft Windows Server®

Backup all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

LVL 20

Expert Comment

ID: 22831695
Two things spring to mind.  I can not test (obviously) so you'll have to play or wait for someone to give better guidance on this :

1. You might need a link to the com port for irrecord
ln -s /dev/ttyS0 /dev/lirc
and remove it after the recording is made before you retest

2. irrecord can be fickle with non standard remotes.
I had one called an IR-MAN and irrecord didn't work.  i think I had to use another program (ircat ?) and write down all the values and type them back into the file

Author Comment

ID: 22836825
Here's what I do

1) Disable the com1 port, so the kernel and lirc stop fighting over who gets control of it
2) load the lirc_serial module - sudo modprobe lirc_serial, which produces the following messages in dmesg
[ 5160.828128] lirc_dev: IR Remote Control driver registered, major 61
[ 5161.326682] lirc_serial: auto-detected active high receiver
[ 5161.326688] lirc_dev: lirc_register_plugin: sample_rate: 0
3) test that things are going alright so far with
tl@AMD64:~$ sudo cat /dev/lirc0
C.H/ý3ý>::ý       6cý<ý>ý=ýFý=ý>ý+ý@ýkývý>ý=ýtý>ý+ý3oý&.ýG7Qe?ýfIý;

the garbage you see after the command is the input from the remote control

Then I try to configure my JVC remote control with irrecord
tl@AMD64:~$ sudo irrecord -d /dev/lirc0 jvc
irrecord -  application for recording IR-codes for usage with lirc

Copyright (C) 1998,1999 Christoph Bartelmus(

This program will record the signals from your remote control
and create a config file for lircd.

A proper config file for lircd is maybe the most vital part of this
package, so you should invest some time to create a working config
file. Although I put a good deal of effort in this program it is often
not possible to automatically recognize all features of a remote
control. Often short-comings of the receiver hardware make it nearly
impossible. If you have problems to create a config file READ THE
DOCUMENTATION of this package, especially section "Adding new remote
controls" for how to get help.

If there already is a remote control of the same brand available at you might also want to try using such a
remote as a template. The config files already contain all
parameters of the protocol used by remotes of a certain brand and
knowing these parameters makes the job of this program much
easier. There are also template files for the most common protocols
available in the remotes/generic/ directory of the source
distribution of this package. You can use a template files by
providing the path of the file as command line parameter.

Please send the finished config files to <> so that I
can make them available to others. Don't forget to put all information
that you can get about the remote control in the header of the file.

Press RETURN to continue.

Now start pressing buttons on your remote control.

It is very important that you press many different buttons and hold them
down for approximately one second. Each button should generate at least one
dot but in no case more than ten dots of output.
Don't stop pressing buttons until two lines of dots (2x80) have been

Press RETURN now to start recording.
Found const length: 45886
Please keep on pressing buttons like described above.
RC-6 remote control found.
No header found.
No repeat code found.
Signals are biphase encoded.
Signal length is 33
Checking for toggle bit mask.
Please press an arbitrary button repeatedly as fast as possible.
Make sure you keep pressing the SAME button and that you DON'T HOLD
the button down!.
If you can't see any dots appear, then wait a bit between button presses.

Press RETURN to continue.

No toggle bit mask found.
But I know for sure that RC6 has a toggle bit!

And I can't get past this stage :(
LVL 20

Expert Comment

ID: 22857470
The random digits might suggest the wrong frequency on the serial port.
You might need to set it before you run lirc.
does the instruction for the device have any set frequency ?

Author Comment

ID: 22858726
No, I don't have any instructions at all for that device.
Also I haven't looked at it closely but the numbers might not be as random as they appear on this post - it's because of the encoding. That's a good idea actually - I'll dump the remote input in hex and post it here again
LVL 20

Accepted Solution

edster9999 earned 250 total points
ID: 22860547
repeat the same button a few times and see if it gives the same.  Then swap to other buttons - hopefully different values but that they stay the same for each button if that makes sense.

Author Closing Comment

ID: 31509115
Thanks for all the replies man, I finally got it working - turns out my IR is supported and contrary to my expectations it is NOT an Igor device - go figure

Featured Post

Control application downtime with dependency maps

Visualize the interdependencies between application components better with Applications Manager's automated application discovery and dependency mapping feature. Resolve performance issues faster by quickly isolating problematic components.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you have a server on collocation with the super-fast CPU, that doesn't mean that you get it running at full power. Here is a preamble. When doing inventory of Linux servers, that I'm administering, I've found that some of them are running on l…
In the modern office, employees tend to move around the workplace a lot more freely. Conferences, collaborative groups, flexible seating and working from home require a new level of mobility. Technology has not only changed the behavior and the expe…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…

930 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now