Solved [Solved] Stuck with devd

Hi all,

I use a MIDIMAN USB 2X2 interface on a 9.1 GENERIC box. This interface requires firmware to be downloaded on attach. This works fine with fxload but I'd like to configure devd to download this firmware automatically. So, I have created a configuration file in /usr/local/etc/dev:
Code:
# /usr/local/etc/devd/m-audio.conf
attach 100 {
        match "vendor" "0x0763";
        match "product" "0x1001";
        action "logger MIDIMAN Interface  detected";
       #       action "/usr/local/sbin/fxload -I /usr/local/libexec/fxload/m-audio/ezusbmidi2x2.ihx -D vid=$vendor,pid=$product";
};
After restarting devd, this does not work. I have the message
Code:
Unknown USB device: vendor 0x0763 product 0x1001 bus uhub3
My configuration file is correctly parsed:
Code:
root@unxbox:/usr/local/etc/devd # devd -D -d
Parsing /etc/devd.conf
setting scsi-controller-regex=(aac|adv|adw|aha|ahb|ahc|ahd|aic|amd|amr|asr|bt|ciss|ct|dpt|esp|ida|iir|ips|isp|mlx|mly|mpt|ncr|ncv|nsp|stg|sym|trm|wds)[0-9]+
Parsing files in /etc/devd
Parsing /etc/devd/uath.conf
Parsing /etc/devd/usb.conf
Parsing /etc/devd/asus.conf
Parsing files in /usr/local/etc/devd
Parsing /usr/local/etc/devd/xilinx.conf
setting X=/compat/linux/opt/Xilinx/11.1/common/bin/lin
setting F=/usr/local/sbin/fxload -v -t fx2
Parsing /usr/local/etc/devd/m-audio.conf
Thanks for your help.

Regards,
 
Re: Stuck with devd

Compare the command given by hand with the one from the action line. Are the vendor and product IDs supposed to be prefixed with 0x?

If they are the same, maybe adding a sleep 2 && to the action would give the device time to be ready for the firmware.
 
Re: Stuck with devd

The command line works by hand. Even with logger action, it doesn't work. In fact, devd never matches the vendor ID and product ID:
Code:
Unknown USB device: vendor 0x0763 product 0x1001 bus uhub3
The hexadecimal notation seems to be standard in devd.conf. I'll try the sleep command.

Thanks.
 
Re: Stuck with devd

I finally found a solution with the notify keyword:
Code:
# $Id$
# /usr/local/etc/devd/m-audio.conf
options {
        set LOADER "/usr/local/sbin/fxload -I";
        set MAUDIO "/usr/local/share/fxload/m-audio";
};

notify 0 {
        match "system" "USB";
        match "subsystem" "INTERFACE";
        match "type" "ATTACH";
        match "vendor" "0x0763";
        match "product" "0x1010";
        match "release" "0x0001";
        action "$LOADER $MAUDIO/ezusbmidi1x1.ihx -D vid=$vendor,pid=$product";
};
 
notify 0 {
        match "system" "USB";
        match "subsystem" "INTERFACE";
        match "type" "ATTACH";
        match "vendor" "0x0763";
        match "product" "0x1001";
        match "release" "0x0001";
        action "$LOADER $MAUDIO/ezusbmidi2x2.ihx -D vid=$vendor,pid=$product";
};
But it looks strange to me that the first solution doesn't work.
 
Back
Top