# Unable to setup lirc

## Elv13

Hi, i made a serial reciver. I tested it on one of my old laptop with a serial port and windows (using winlirc); the reciver work perfectly.

But on gentoo, i dont know what to do. I tried to follow the guide from gentoo-wiki, but nothing work. I never used the serial port on linux before. Is it possible to know what device is assigned to the serial port. In the guide, it say that i can disable serial support in kernel, is it normal. Is lirc_serial is the only module to load? What is irw is suppose to do when i use my remote.

here is the only part of dmesh talking about lirc or serial (i saw serial on some dmesg in the past, why mine dont have any line talking about it?)

```
lirc_dev: IR Remote Control driver registered, at major 61

lirc_serial: auto-detected active low receiver

lirc_dev: lirc_register_plugin: sample_rate: 0

```

```

i have these line tooserio: i8042 KBD port at 0x60,0x64 irq 1

serio: i8042 AUX port at 0x60,0x64 irq 12

```

I really dont know what to do.

----------

## Elv13

ok, i manage (i dont know how) to see something when i do cat /dev/lirc/0

now when i do irrecord, i get some error on the second part (after remote detection)

```
Press RETURN now to start recording.

................................................................................

Found gap: 9047

Please keep on pressing buttons like described above.

................................................................................

Space/pulse encoded remote control found.

Signal length is 67.

No header found.

No trail pulse found.

No repeat header found.

Signals are pulse encoded.

Signal length is 34

Now enter the names for the buttons.

Please enter the name for the next button (press <ENTER> to finish recording)

enter

Now hold down button "enter".

Something went wrong. Please try again. (9 retries left)

Something went wrong. Please try again. (8 retries left)

Something went wrong. Please try again. (7 retries left)

Something went wrong. Please try again. (6 retries left)

Something went wrong. Please try again. (5 retries left)

Something went wrong. Please try again. (4 retries left)

Something went wrong. Please try again. (3 retries left)

Something went wrong. Please try again. (2 retries left)

Something went wrong. Please try again. (1 retries left)

Something went wrong.

Try using the -f option.

```

the "Something went wrong. Please try again. (9 retries left)" aprear instantanelly, before i press any button on the remote, i dont know if its a bug or something like that, in cat /dev/lirc/0, signal seem to be clear and constant

----------

## Elv13

^^up

lets go, i really want to get this to work, i am sure that somebody here is using lirc

----------

## jstrHead

Do you have the LIRC_DEVICES in /etc/make.conf set.  Also what is the type of remote you are using. 

LIRC_DEVICES="serial"

I found the one I was using a hauppauge remote.  I copied the mapped commands to a file called 

/etc/lircd.conf

http://lirc.sourceforge.net/remotes/

emerge -pv lirc

emerge lirc

emerge setserial

setserial /dev/ttyS0 uart none

modprobe lirc_dev

modprobe lirc_serial

/etc/init.d/lircd start

irw

Check to see if the device is listed meaning run the following command

ls -al /dev/lirc - After inserting the modules it should then find the device.

drwxr-xr-x  2 root root    60 Mar 17 00:44 .

drwxr-xr-x 22 root root 13960 Mar 17 00:44 ..

crw-rw----  1 root root 61, 0 Mar 17 00:44 0

hoursinexile ~ #

It will probably fail due to /etc/conf.d/lircd set to 

LIRCD_OPTS="-d /dev/lircd"

Change this to the following LIRCD_OPTS="-d /dev/lirc/0"

Restart lircd - /etc/init.d/lircd restart

then try irw again

hoursinexile ~ # irw

00000000000017e0 00 Ch+ hauppauge_pvr

00000000000017e0 01 Ch+ hauppauge_pvr

00000000000017e0 00 Ch+ hauppauge_pvr

00000000000017e0 01 Ch+ hauppauge_pvr

00000000000017e1 00 Ch- hauppauge_pvr

00000000000017e1 00 Ch- hauppauge_pvr

00000000000017d1 00 Vol- hauppauge_pvr

Hope this Helps

----------

