[mythtv-users] USB IR Receivers
Kirk Bocek
t004 at kbocek.com
Tue Sep 1 14:40:32 UTC 2015
On 8/31/2015 9:49 PM, Alec Leamas wrote:
> On 01/09/15 06:05, Kirk Bocek wrote:
>
>> So following [4] I can unbind the usb-hid driver. If I load mceusb, I
>> now have /sys/bus/usb/drivers/mceusb as a place to bind the device to.
>> But I'm having trouble figuring that out. It seems like the device
>> string changes after unbinding. I can see the receiver under ls
>> /sys/bus/usb/devices/ but can't figure out what string to use to refer
>> to it.
>>
>> udevadm info -a /sys/bus/usb/devices/whatever shows a whole bunch of
>> devices and not just the receiver.
>
> Basically, if you are able to load the mceusb device correctly the
> kernel will create a /sys/class/rc entry. What does dmesg say after
> unbinding usb-hid and reloading mceusb?
>
Reboot...
$tree /sys/bus/usb/drivers/usbhid
/sys/bus/usb/drivers/usbhid
âââ 1-2:1.0 -> ../../../../devices/pci0000:00/0000:00:14.0/usb1/1-2/1-2:1.0
âââ bind
âââ module -> ../../../../module/usbhid
âââ new_id
âââ remove_id
âââ uevent
âââ unbind
$ echo -n "1-2:1.0" > /sys/bus/usb/drivers/usbhid/unbind
]$modprobe -v mceusb
insmod
/lib/modules/4.1.5-100.fc21.x86_64/kernel/drivers/media/rc/rc-core.ko.xz
insmod
/lib/modules/4.1.5-100.fc21.x86_64/kernel/drivers/media/rc/mceusb.ko.xz
$dmesg
...
[ 860.653616] usbcore: registered new interface driver mceusb
$tree /sys/bus/usb/drivers/mceusb/
/sys/bus/usb/drivers/mceusb/
âââ bind
âââ module -> ../../../../module/mceusb
âââ new_id
âââ remove_id
âââ uevent
âââ unbind
$ echo -n "1-2:1.0" > /sys/bus/usb/drivers/mceusb/bind
-bash: echo: write error: No such device
$udevadm info -a /sys/bus/usb/devices/1-2:1.0
Udevadm info starts with the device specified by the devpath and then
walks up the chain of parent devices. It prints for every device
found, all possible attributes in the udev rules key format.
A rule to match, can be composed by the attributes of the device
and the attributes from one single parent device.
looking at device '/devices/pci0000:00/0000:00:14.0/usb1/1-2/1-2:1.0':
KERNEL=="1-2:1.0"
SUBSYSTEM=="usb"
DRIVER==""
ATTR{bInterfaceClass}=="03"
ATTR{bInterfaceSubClass}=="01"
ATTR{bInterfaceProtocol}=="01"
ATTR{bNumEndpoints}=="01"
ATTR{supports_autosuspend}=="1"
ATTR{bAlternateSetting}==" 0"
ATTR{bInterfaceNumber}=="00"
looking at parent device '/devices/pci0000:00/0000:00:14.0/usb1/1-2':
KERNELS=="1-2"
SUBSYSTEMS=="usb"
DRIVERS=="usb"
ATTRS{bDeviceSubClass}=="00"
ATTRS{bDeviceProtocol}=="00"
ATTRS{devpath}=="2"
ATTRS{idVendor}=="0471"
ATTRS{speed}=="1.5"
ATTRS{bNumInterfaces}==" 1"
ATTRS{bConfigurationValue}=="1"
ATTRS{bMaxPacketSize0}=="8"
ATTRS{busnum}=="1"
ATTRS{devnum}=="2"
ATTRS{configuration}==""
ATTRS{bMaxPower}=="100mA"
ATTRS{authorized}=="1"
ATTRS{bmAttributes}=="a0"
ATTRS{bNumConfigurations}=="1"
ATTRS{maxchild}=="0"
ATTRS{bcdDevice}=="0101"
ATTRS{avoid_reset_quirk}=="0"
ATTRS{quirks}=="0x0"
ATTRS{version}==" 1.10"
ATTRS{urbnum}=="12"
ATTRS{ltm_capable}=="no"
ATTRS{manufacturer}=="PHILIPS"
ATTRS{removable}=="unknown"
ATTRS{idProduct}=="20cc"
ATTRS{bDeviceClass}=="00"
ATTRS{product}=="MCE USB IR Receiver- Spinel plus"
So there it is at .../usb1/1-2 but I can't seem to bind it to mceusb
More information about the mythtv-users
mailing list