# IrDA / LIRC problems

## JeroenV

Hi,

I'm having problems getting IrDA to work on my Asus A7V-E mobo. I have a "internal" IR-dongle connected to the mobo and set the BIOS UART2 use Infra red to "enabled".

(COM2 is configured on IRQ=3 / IO=0x02f8

Now this is what I I did:

```

  671  modprobe serial

  672  modprobe irtty

  673  echo 1 > /proc/sys/net/irda/discovery

  674  echo 10 > /proc/sys/net/irda/debug 

  675  irattach /dev/ttyS1

```

The kernel log responds:

```

Oct 10 17:05:18 [kernel] Serial driver version 5.05c (2001-07-08) with MANY_PORTS SHARE_IRQ SERIAL_PCI enabled

Oct 10 17:05:31 [kernel] irda_init()

Oct 10 17:06:49 [kernel] irlmp_discovery_timer_expired()

Oct 10 17:06:52 [kernel] irlmp_discovery_timer_expired()

...

Oct 10 17:07:06 [kernel] hashbin_insert_R3gig_a410d036()

Oct 10 17:07:06 [kernel] IrDA: Registered device irda0

Oct 10 17:07:07 [kernel] irlmp_discovery_timer_expired()

Oct 10 17:07:07 [kernel] irda_create()

Oct 10 17:07:07 [kernel] hashbin_find()

Oct 10 17:07:07 [kernel] hashbin_find()

Oct 10 17:07:07 [kernel] irias_delete_value_R3gig_b9394173()

Oct 10 17:07:08 [kernel] irda_device_set_media_busy_R3gig_3aff7f9c(FALSE)

Oct 10 17:07:10 [kernel] irlmp_discovery_timer_expired()

Oct 10 17:07:10 [kernel] irtty_write_wakeup(), finished with frame!

Oct 10 17:07:10 [kernel] irda_task_timer_expired()

Oct 10 17:07:10 [kernel] irda_task_timer_expired()

Oct 10 17:07:10 [kernel] irda_task_timer_expired()

Oct 10 17:07:10 [kernel] irlap_do_event(), event = SLOT_TIMER_EXPIRED, state = LAP_QUERY

Oct 10 17:07:10 [kernel] irtty_write_wakeup(), finished with frame!

Oct 10 17:07:10 [kernel] irlap_do_event(), event = SLOT_TIMER_EXPIRED, state = LAP_QUERY

Oct 10 17:07:10 [kernel] irtty_write_wakeup(), finished with frame!

...

```

And now, when I press a button on my remote-control, I see:

```

Oct 10 17:07:13 [kernel] irtty_write_wakeup(), finished with frame!

Oct 10 17:07:13 [kernel] irda_device_set_media_busy_R3gig_3aff7f9c(TRUE)

Oct 10 17:07:13 [kernel] irda_device_set_media_busy_R3gig_3aff7f9c(TRUE)

Oct 10 17:07:13 [kernel] irda_device_set_media_busy_R3gig_3aff7f9c(TRUE)

Oct 10 17:07:13 [kernel] irtty_write_wakeup(), finished with frame!

Oct 10 17:07:14 [kernel] irlap_do_event(), event = SLOT_TIMER_EXPIRED, state = LAP_QUERY

...

```

This is a reaction, but it seems rather obscure. And it is the only response I'm getting from my IR.

Doing this doesn't work:

```

diannao irda # irdadump -i /dev/ttyS1

Using interface: /dev/ttyS1

ioctl: No such device

```

Doing this:

```

diannao irda # irdadump /dev/ttyS1

15:13:25.713132 xid:cmd 3b517319 > ffffffff S=6 s=0 (14) 

15:13:25.803114 xid:cmd 3b517319 > ffffffff S=6 s=1 (14) 

15:13:25.893114 xid:cmd 3b517319 > ffffffff S=6 s=2 (14) 

15:13:25.983117 xid:cmd 3b517319 > ffffffff S=6 s=3 (14) 

15:13:26.073116 xid:cmd 3b517319 > ffffffff S=6 s=4 (14) 

15:13:26.163115 xid:cmd 3b517319 > ffffffff S=6 s=5 (14) 

15:13:26.253122 xid:cmd 3b517319 > ffffffff S=6 s=* diannao hint=0400 [ Computer ] (23) 

```

gives the same response every second or so, regardless of my pressing buttons on my remote-control or not...

So this seems to suck...   :Crying or Very sad: 

Now a try with lirc:

First:

```

killall irattach

rmmod irtty irda serial

```

Now I load the lirc_serial driver:

```

diannao irda # modprobe lirc_serial irq=3 io=0x02f8

Oct 10 17:19:19 [kernel] lirc_serial: auto-detected active high receiver

```

.. but I can't get any info out of it, both irw and mode2 do nothing:

```

diannao irda # mode2 -d /dev/lirc

<pushing  buttons> => <nothing>

```

or:

```

diannao irda # lircd -d /dev/lirc

diannao irda # irw

<pushing  buttons> => <nothing>

```

The lircd daemon seems to work ok:

```

diannao root # tail -f /var/log/lircd

...

Oct 10 17:21:24 diannao.cygnusnet.dyndns.org lircd-0.6.5: lircd(any) ready

Oct 10 17:23:18 diannao.cygnusnet.dyndns.org lircd-0.6.5: accepted new client on /dev/lircd

...

```

(that "new client" was irw)

I'm out of ideas   :Rolling Eyes: 

Anybody help me  :Question: 

----------

## passepoil

Hello !

I'm wondering which IR dongle you are using, and where can I get one ?

When you say it's internal, do you mean it's connected using the onboard connectors ?

thanks,

Passe-Poil

----------

## JeroenV

Yes, as I recall it's a 4 (or 5?) pin onboard connector, to which you can attach a small IR "eye" on a cable that you can buy separately.

I actually forgot about the whole thing, so still didn't get it to work. I might try later when in need.... (or if anyone still has info?)

----------

## undrwater

I have the same dongle and an Asus A7v333.  I wasn't able to get irda to work in windows using this mobo, but i was using an earlier iwill mobo, which had more config options in the bios including the choice of duplex/half-duplex, COM, etc...

The asus really only has the choice to enable/disable irda...no other options...

i emailed asus for support on this but never got a response.  i forgot about it until i saw this post!   :Smile: 

----------

## JeroenV

I picked the issue up, and solved it in an hour or so   :Very Happy: 

The trick: use the right kernel module   :Wink: 

Anyway, on my A7V-E mobo I selected (in the BIOS) uart2: io=0x2f8 irq=3 and enable IrDA.

Then, as root:

```

modprobe lirc_sir irq=3 io=0x2f8

```

and from that point onward the instructions on http://www.lirc.org/html/install.html#testing worked for me   :Smile: 

Good luck  :Exclamation: 

----------

## JeroenV

UPDATE:

if for some reason the lirc_sir module fails to load, it migth be because io 0x2f8 and/or irq 3 are in use (check kernel log for that).

After rebooting I couldn't load lirc_sir anymore; this did the trick:

```

rmmod serial

modprobe lirc_sir irq=3 io=0x2f8

modprobe serial
```

In other words: apparently you should load serial (if desired at all) after lirc_sir

----------

## undrwater

Hmm...thanks! I don't use serial, so it should work fine.  I'll try this weekend and see how it works...

----------

