# LIRC, mcs7780, and maybe udev woe

## priiice

Everyone,

Trying to get LIRC working with a USB IrDA dongle (mcs7780 chipset).  I'm at my wits end.  Have the mcs7780 driver built into the 3.0.6 kernel (have also tried it as a module).  I'm using the latest LIRC source from their git repos.  Both /dev/lirc (from a udev rule) and /dev/lirc0 (from modprobe lirc_sir) are present.  I was trying to tackle the problem from two different approaches.  mode2 -d /dev/lirc0 doesn't print or log any errors but punching keys on my remote doesn't cause a reaction.  Here's all the relevant info I can think of ...  if there's anything you all need me to post to help diagnose, let me know.

Any ideas?  I'd appreciate any help.

cat /etc/lirc/hardware.conf (have no idea, was reaching at straws)

```

LIRCD_ARGS=""

LOAD_MODULES=true

DRIVER="default"

DEVICE="/dev/lirc0"

MODULES="mcs7780"

LIRCD_CONF=""

LIRCMD_CONF=""

```

mode2 -d /dev/lirc (symlink to the usb device created by the udev rule)

```

mode2: could not get hardware features

mode2: this device driver does not support the LIRC ioctl interface

mode2: major number of /dev/lirc is 189

mode2: make sure /dev/lirc is a LIRC device and use a current version of the driver

```

lsusb:

```

Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub

Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub

Bus 006 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub

Bus 007 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub

Bus 005 Device 002: ID 046d:c30f Logitech, Inc. Logicool HID-Compliant Keyboard (106 key)

Bus 005 Device 003: ID 046d:c069 Logitech, Inc. 

Bus 005 Device 004: ID 9710:7780 MosChip Semiconductor MCS7780 4Mbps Fast IrDA Adapter

```

Custom udev rules:

```

SUBSYSTEM=="usb", ATTR{idVendor}=="9710", ATTR{idProduct}=="7780", SYMLINK+="lirc"

```

Select /usr/src/linux/.config bits

```

CONFIG_MCS_FIR=y

```

dmesg | grep "5-4" (bus/device the dongle's on)

```

[    2.894086] usb 5-4: new full speed USB device number 4 using ohci_hcd

[    3.026076] usb 5-4: ep0 maxpacket = 8

[    3.031184] usb 5-4: udev 4, busnum 5, minor = 515

[    3.031187] usb 5-4: New USB device found, idVendor=9710, idProduct=7780

[    3.035596] usb 5-4: New USB device strings: Mfr=0, Product=0, SerialNumber=0

[    3.040123] usb 5-4: usb_probe_device

[    3.040126] usb 5-4: configuration #1 chosen from 1 choice

[    3.041137] usb 5-4: adding 5-4:1.0 (config #1, interface 0)

[    3.041227] mcs7780 5-4:1.0: usb_probe_interface

[    3.041229] mcs7780 5-4:1.0: usb_probe_interface - got id

```

modprobe lirc_sir && dmesg | grep lirc

```

[ 1828.207102] lirc_dev: IR Remote Control driver registered, major 250 

[ 1828.216723] lirc_dev: lirc_register_driver: sample_rate: 0

[ 1828.216768] lirc_sir: I/O port 0x03e8, IRQ 4.

[ 1828.216779] lirc_sir: Installed.

```

ls /dev/lirc*

```

/dev/lirc /dev/lirc0

```

udevadm info --attribute-walk --name=/dev/lirc

```

  looking at device '/devices/pci0000:00/0000:00:13.0/usb5/5-4':

    KERNEL=="5-4"

    SUBSYSTEM=="usb"

    DRIVER=="usb"

    ATTR{configuration}==""

    ATTR{bNumInterfaces}==" 1"

    ATTR{bConfigurationValue}=="1"

    ATTR{bmAttributes}=="80"

    ATTR{bMaxPower}=="500mA"

    ATTR{urbnum}=="4545"

    ATTR{idVendor}=="9710"

    ATTR{idProduct}=="7780"

    ATTR{bcdDevice}=="0001"

    ATTR{bDeviceClass}=="ff"

    ATTR{bDeviceSubClass}=="00"

    ATTR{bDeviceProtocol}=="ff"

    ATTR{bNumConfigurations}=="1"

    ATTR{bMaxPacketSize0}=="8"

    ATTR{speed}=="12"

    ATTR{busnum}=="5"

    ATTR{devnum}=="4"

    ATTR{devpath}=="4"

    ATTR{version}==" 1.10"

    ATTR{maxchild}=="0"

    ATTR{quirks}=="0x0"

    ATTR{avoid_reset_quirk}=="0"

    ATTR{authorized}=="1"

```

udevadm info --attribute-walk --name=/dev/lirc0

```

  looking at device '/devices/platform/lirc_dev.0/lirc/lirc0':

    KERNEL=="lirc0"

    SUBSYSTEM=="lirc"

    DRIVER==""

  looking at parent device '/devices/platform/lirc_dev.0':

    KERNELS=="lirc_dev.0"

    SUBSYSTEMS=="platform"

    DRIVERS==""

  looking at parent device '/devices/platform':

    KERNELS=="platform"

    SUBSYSTEMS==""

    DRIVERS==""

```

usb-devices (of interest)

```

T:  Bus=05 Lev=01 Prnt=01 Port=03 Cnt=03 Dev#=  4 Spd=12  MxCh= 0

D:  Ver= 1.10 Cls=ff(vend.) Sub=00 Prot=ff MxPS= 8 #Cfgs=  1

P:  Vendor=9710 ProdID=7780 Rev=00.01

C:  #Ifs= 1 Cfg#= 1 Atr=80 MxPwr=500mA

I:  If#= 0 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=00 Prot=ff Driver=mcs7780

```

----------

