<div dir="ltr"><div>Hello all,<br>less /etc/udev/rules.d/10-c920.rules <br>WARNING: terminal is not fully functional<br>SUBSYSTEM=="video4linux", BUS=="usb", ATTRS{idvendor}=="0x046d", ATTRS{idProduct<br>
}=="0x082d", NAME="video0", MODE:="0660"<br>It appears the key BUS is not correct based on the tests below. <br>My mknod is /bin/mknod.   <br>find / -name sysfs<br>/usr/include/sysfs<br>/usr/src/kernel/fs/sysfs<br>
<br>udevadm test --action=add /usr/include/sysfs or udevadm test --action=add /usr/src/kernel/fs/sysfs unable to open device '/sys/usr/src/kernel/fs/sysfs'<br>run_command: calling: test<br>adm_test: version 182<br>
This program is for debugging only, it does not run any program,<br>specified by a RUN key. It may show incorrect results, because<br>some values may be different, or not available at a simulation run.<br><br>builtin_kmod_init: load module index<br>
add_matching_files: unable to open '/var/run/udev/rules.d': No such file or directory<br>parse_file: reading '/etc/udev/rules.d/10-c920.rules' as rules file<br>add_rule: unknown key 'BUS' in /etc/udev/rules.d/10-c920.rules:1<br>
add_rule: invalid rule '/etc/udev/rules.d/10-c920.rules:1'<br> <br>lots of output <br><br>udev_rules_new: rules use 18408 bytes tokens (1534 * 12 bytes), 12756 bytes buffer<br>udev_rules_new: temporary index used 12800 bytes (640 * 20 bytes)<br>
unable to open device '/sys/usr/include/sysfs'<br>builtin_kmod_exit: unload module index<br><br>Do I add RUN+="/bin/mknod  /dev/video0 c 81 0" see below new version of 1--c920.rules<br>cat 10-c920.rules <br>
SUBSYSTEM=="video4linux", BUS=="usb", ATTRS{idvendor}=="0x046d", ATTRS{idProduct}=="0x082d", NAME="video0", MODE:="0660", RUN+="/bin/mknod /dev/video0 c 81 0"<br>
udevadm test --action=add /usr/src/kernel/fs/sysfs<br>run_command: calling: test<br>adm_test: version 182<br>This program is for debugging only, it does not run any program,<br>specified by a RUN key. It may show incorrect results, because<br>
some values may be different, or not available at a simulation run.<br><br>builtin_kmod_init: load module index<br>add_matching_files: unable to open '/var/run/udev/rules.d': No such file or directory<br>parse_file: reading '/etc/udev/rules.d/10-c920.rules' as rules file<br>
add_rule: unknown key 'BUS' in /etc/udev/rules.d/10-c920.rules:1<br>add_rule: invalid rule '/etc/udev/rules.d/10-c920.rules:1'<br><br></div><div>Where do you find information for working with rules other than just some examples?<br>
<br></div>Thanks<br></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Oct 31, 2013 at 8:41 AM, Khem Raj <span dir="ltr"><<a href="mailto:raj.khem@gmail.com" target="_blank">raj.khem@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">On Wed, Oct 30, 2013 at 6:12 PM, Edward Vidal <<a href="mailto:vidal.develone@gmail.com">vidal.develone@gmail.com</a>> wrote:<br>

> Hello,<br>
</div><div><div class="h5">> This is when I connect the camera<br>
> udevadm monitor test<br>
> monitor will print the received events for:<br>
> UDEV - the event which udev sends out after rule processing<br>
> KERNEL - the kernel uevent<br>
><br>
> KERNEL[803.263336] add<br>
> /devices/platform/usbhs_omap/ehci-omap.0/usb1/1-2/1-2.3/1-2.3.4 (usb)<br>
> KERNEL[803.267456] add<br>
> /devices/platform/usbhs_omap/ehci-omap.0/usb1/1-2/1-2.3/1-2.3.4/1-2.3.4:1.0<br>
> (usb)<br>
> KERNEL[803.269287] add<br>
> /devices/platform/usbhs_omap/ehci-omap.0/usb1/1-2/1-2.3/1-2.3.4/1-2.3.4:1.1<br>
> (usb)<br>
> KERNEL[803.269958] add<br>
> /devices/platform/usbhs_omap/ehci-omap.0/usb1/1-2/1-2.3/1-2.3.4/1-2.3.4:1.2<br>
> (usb)<br>
> KERNEL[803.270721] add<br>
> /devices/platform/usbhs_omap/ehci-omap.0/usb1/1-2/1-2.3/1-2.3.4/1-2.3.4:1.3<br>
> (usb)<br>
> KERNEL[803.276214] add<br>
> /devices/platform/usbhs_omap/ehci-omap.0/usb1/1-2/1-2.3/1-2.3.4/usb_device/usbdev1.15<br>
> (usb_device)**********<br>
> UDEV  [803.277191] add<br>
> /devices/platform/usbhs_omap/ehci-omap.0/usb1/1-2/1-2.3/1-2.3.4 (usb)<br>
> UDEV  [803.306091] add<br>
> /devices/platform/usbhs_omap/ehci-omap.0/usb1/1-2/1-2.3/1-2.3.4/usb_device/usbdev1.15<br>
> (usb_device)<br>
> UDEV  [803.318603] add<br>
> /devices/platform/usbhs_omap/ehci-omap.0/usb1/1-2/1-2.3/1-2.3.4/1-2.3.4:1.2<br>
> (usb)<br>
> UDEV  [803.324249] add<br>
> /devices/platform/usbhs_omap/ehci-omap.0/usb1/1-2/1-2.3/1-2.3.4/1-2.3.4:1.1<br>
> (usb)<br>
> UDEV  [803.329712] add<br>
> /devices/platform/usbhs_omap/ehci-omap.0/usb1/1-2/1-2.3/1-2.3.4/1-2.3.4:1.0<br>
> (usb)<br>
> UDEV  [803.333160] add<br>
> /devices/platform/usbhs_omap/ehci-omap.0/usb1/1-2/1-2.3/1-2.3.4/1-2.3.4:1.3<br>
> (usb)<br>
><br>
> still no /dev/video0<br>
> ls -la /dev/v*<br>
> crw-rw---- 1 root tty 7,   0 Jan  1  2000 /dev/vcs<br>
> crw-rw---- 1 root tty 7,   1 Jan  1  2000 /dev/vcs1<br>
> crw-rw---- 1 root tty 7,   2 Jan  1  2000 /dev/vcs2<br>
> crw-rw---- 1 root tty 7,   3 Oct 29 13:51 /dev/vcs3<br>
> crw-rw---- 1 root tty 7, 128 Jan  1  2000 /dev/vcsa<br>
> crw-rw---- 1 root tty 7, 129 Jan  1  2000 /dev/vcsa1<br>
> crw-rw---- 1 root tty 7, 130 Jan  1  2000 /dev/vcsa2<br>
> crw-rw---- 1 root tty 7, 131 Oct 29 13:51 /dev/vcsa3<br>
> root@beagleboard:~# lsusb<br>
> Bus 001 Device 002: ID 0424:9514 Standard Microsystems Corp.<br>
> Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub<br>
> Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub<br>
> Bus 001 Device 003: ID 0424:ec00 Standard Microsystems Corp.<br>
> Bus 001 Device 004: ID 0409:0059 NEC Corp. HighSpeed Hub<br>
> Bus 001 Device 005: ID 413c:2005 Dell Computer Corp. RT7D50 Keyboard<br>
> Bus 001 Device 006: ID 046d:c001 Logitech, Inc. N48/M-BB48 [FirstMouse Plus]<br>
> Bus 001 Device 015: ID 046d:082d Logitech, Inc.<br>
> ***********************************************************************************<br>
><br>
><br>
> udevadm monitor --udev<br>
> monitor will print the received events for:<br>
> UDEV - the event which udev sends out after rule processing<br>
> camera removed*****************************************************<br>
> UDEV  [1325.916811] remove<br>
> /devices/platform/usbhs_omap/ehci-omap.0/usb1/1-2/1-2.3/1-2.3.4/1-2.3.4:1.1<br>
> (usb)<br>
> UDEV  [1325.918489] remove<br>
> /devices/platform/usbhs_omap/ehci-omap.0/usb1/1-2/1-2.3/1-2.3.4/1-2.3.4:1.0<br>
> (usb)<br>
> UDEV  [1325.919282] remove<br>
> /devices/platform/usbhs_omap/ehci-omap.0/usb1/1-2/1-2.3/1-2.3.4/1-2.3.4:1.2<br>
> (usb)<br>
> UDEV  [1325.923005] remove<br>
> /devices/platform/usbhs_omap/ehci-omap.0/usb1/1-2/1-2.3/1-2.3.4/1-2.3.4:1.3<br>
> (usb)<br>
> UDEV  [1325.928437] remove<br>
> /devices/platform/usbhs_omap/ehci-omap.0/usb1/1-2/1-2.3/1-2.3.4/usb_device/usbdev1.15<br>
> (usb_device)<br>
> UDEV  [1325.932709] remove<br>
> /devices/platform/usbhs_omap/ehci-omap.0/usb1/1-2/1-2.3/1-2.3.4 (usb)<br>
> camera added<br>
> ***************************************************************************<br>
> UDEV  [1329.344727] add<br>
> /devices/platform/usbhs_omap/ehci-omap.0/usb1/1-2/1-2.3/1-2.3.4 (usb)<br>
> UDEV  [1329.376313] add<br>
> /devices/platform/usbhs_omap/ehci-omap.0/usb1/1-2/1-2.3/1-2.3.4/usb_device/usbdev1.16<br>
> (usb_device)<br>
> UDEV  [1329.389008] add<br>
> /devices/platform/usbhs_omap/ehci-omap.0/usb1/1-2/1-2.3/1-2.3.4/1-2.3.4:1.2<br>
> (usb)<br>
> UDEV  [1329.396241] add<br>
> /devices/platform/usbhs_omap/ehci-omap.0/usb1/1-2/1-2.3/1-2.3.4/1-2.3.4:1.1<br>
> (usb)<br>
> UDEV  [1329.401795] add<br>
> /devices/platform/usbhs_omap/ehci-omap.0/usb1/1-2/1-2.3/1-2.3.4/1-2.3.4:1.0<br>
> (usb)<br>
> UDEV  [1329.406739] add<br>
> /devices/platform/usbhs_omap/ehci-omap.0/usb1/1-2/1-2.3/1-2.3.4/1-2.3.4:1.3<br>
> (usb)<br>
><br>
> This is what I get in /var/log/messages<br>
> Oct 29 14:17:28 beagleboard <a href="http://user.info" target="_blank">user.info</a> kernel: usb 1-2.3.4: USB disconnect,<br>
> device number 16<br>
> Oct 29 14:17:31 beagleboard <a href="http://user.info" target="_blank">user.info</a> kernel: usb 1-2.3.4: new high-speed<br>
> USB device number 17 using ehci-omap<br>
> Is there anything else that I can test  / provide<br>
<br>
</div></div>OK another thing to try is<br>
<br>
udevadm test --action=add /sys/....<br>
<br>
where /sys/... is path to your device in sysfs<br>
<br>
this should give enough reason to what udev is doing when its getting an add<br>
event for this device.<br>
<br>
Secondly in your udev rule refer mknod with absolute path like<br>
/sbin/mknod or /bin/mknod where ever it is<br>
</blockquote></div><br></div>