1

I have downloaded and built an application that includes udev rules for starting an application when certain hardware is connected. According to the logs the application seems to start successfully as part of the udev rule, but it does not seem to persist as I can never find the running process and it does not.

Project: http://sourceforge.net/projects/mochad/

Udev rules:

/etc/udev/rules.d/91-usb-x10-controllers.rules 
SUBSYSTEM=="usb", ATTR{idVendor}=="0bc7", ATTR{idProduct}=="0001", RUN+="/usr/local/bin/mochad"
SUBSYSTEM=="usb", ATTR{idVendor}=="0bc7", ATTR{idProduct}=="0002", RUN+="/usr/local/bin/mochad"

Syslog snippet:

Jan 23 11:36:22 home systemd-udevd[23442]: starting '/usr/local/bin/mochad'
Jan 23 11:36:22 home mochad[23442]: starting
Jan 23 11:36:22 home systemd-udevd[23439]: Process '/usr/local/bin/mochad' succeeded.
Jan 23 11:36:22 home systemd-udevd[23439]: passed device to netlink monitor 0x54d28fe0
Jan 23 11:36:22 home systemd-udevd[23439]: seq 1024 processed
Jan 23 11:36:22 home systemd-udevd[135]: passed 300 byte device to netlink monitor 0x54d24bb8
Jan 23 11:36:22 home systemd-udevd[23439]: seq 1025 running
Jan 23 11:36:22 home systemd-udevd[23439]: IMPORT builtin 'usb_id' /lib/udev/rules.d/40-libgphoto2-6.rules:9
Jan 23 11:36:22 home systemd-udevd[23439]: unable to access usb_interface device of '/sys/devices/platform/soc/3f980000.usb/usb1/1-1/1-1.2/1-1.2:1.0'
Jan 23 11:36:22 home systemd-udevd[23439]: IMPORT builtin 'usb_id' returned non-zero
Jan 23 11:36:22 home systemd-udevd[23439]: IMPORT builtin 'hwdb' /lib/udev/rules.d/50-udev-default.rules:15
Jan 23 11:36:22 home systemd-udevd[23439]: IMPORT builtin skip 'usb_id' /lib/udev/rules.d/56-hpmud.rules:10
Jan 23 11:36:22 home mochad[23443]: Found CM15A
Jan 23 11:36:22 home systemd-udevd[23439]: RUN 'kmod load $env{MODALIAS}' /lib/udev/rules.d/80-drivers.rules:5
Jan 23 11:36:22 home mochad[23443]: In endpoint 0x81, Out endpoint 0x02
Jan 23 11:36:22 home systemd-udevd[23439]: created db file '/run/udev/data/+usb:1-1.2:1.0' for '/devices/platform/soc/3f980000.usb/usb1/1-1/1-1.2/1-1.2:1.0'
Jan 23 11:36:22 home systemd-udevd[23439]: Execute 'load' 'usb:v0BC7p0001d0100dc00dsc00dp00ic00isc00ip00in00'
Jan 23 11:36:22 home systemd-udevd[23439]: No module matches 'usb:v0BC7p0001d0100dc00dsc00dp00ic00isc00ip00in00'
Jan 23 11:36:22 home systemd-udevd[23439]: passed device to netlink monitor 0x54d28fe0
Jan 23 11:36:22 home systemd-udevd[23439]: seq 1025 processed
Jan 23 11:36:22 home systemd-udevd[135]: cleanup idle workers
Jan 23 11:36:22 home systemd-udevd[23439]: Unload module index
Jan 23 11:36:22 home systemd-udevd[23439]: Unloaded link configuration context.
Jan 23 11:36:22 home systemd-udevd[135]: worker [23439] exited

However I have no running process to connect to until I start it manually (it must be run with sudo privileges). Is there something wrong with the udev rules or is there something else stopping this from working?

Ubuntu 15.10

5
  • Are the 2 lines Jan 23 11:36:22 home systemd-udevd[23439]: IMPORT builtin 'usb_id' /lib/udev/rules.d/40-libgphoto2-6.rules:9 and Jan 23 11:36:22 home systemd-udevd[23439]: unable to access usb_interface device of '/sys/devices/platform/soc/3f980000.usb/usb1/1-1/1-1.2/1-1.2:1.0' related to the processes launched by /usr/local/bin/mochad ?
    – Cbhihe
    Jan 24, 2016 at 18:17
  • I know the first one probably isn't; it's just running through the udev rules. The second one I have to admit I'm not quite so sure of.
    – fileinsert
    Jan 24, 2016 at 20:43
  • Apparently. you have an external usb-hub connected to one of your usb ports. Check which of yr devices if any is connected to 1-1.2:1.0 an in particular if it is the device of interest to you. I may be barking up the wrong tree here, but yr syst seems to have a pbm accessing that device. The important part is 1-1.2. It means: root hub 1 - usb-hub 1 - port 2 of usb-hub 1. Again I just mean for you to explore any possible avenue to troubleshoot this.
    – Cbhihe
    Jan 25, 2016 at 10:10
  • The internal NIC connects to the board via a virtual USB hub but there is no external hub connected and only one device attached directly.
    – fileinsert
    Jan 25, 2016 at 11:52
  • Seems duplicate of askubuntu.com/questions/667922/… , could you try the solution there
    – user.dz
    Jan 27, 2016 at 13:29

1 Answer 1

0

Although not a proper solution, I eventually worked around this issue by running a cron job every minute that checks if the app is running, and if not then starts it.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .