Alias$@USBDevice variables
Dave Higton (1515) 3534 posts |
This one’s been bugging me for a long time. I’ve set some Alias$@USBDevice variables for some devices that claim to be HIDs and for which I wrote drivers (e.g. the LED message board). They are for specific VIDs and PIDs, e.g. Alias$@USBDevice_03_00_00_1d34_0013_01_00 The problem is that these aliases are triggered when any HID is plugged in, regardless of the VID and PID. I switch the keyboard and mouse, which are both plugged into a hub, between the BBxM and a Linux box. Every time I switch over to the BBxM, the alias is triggered. |
Rick Murray (539) 13850 posts |
Well, on the Pi with my various MIDI devices and my phone, either I’m doing something wrong or the alas stuff just doesn’t work… |
Jeff Doggett (257) 234 posts |
Same for me Dave, my keyboard and mouse on the Iyonix are via a USB 1 hub, and if I unplug and reinsert I get an error box telling me that my LED message board isn’t plugged in. |
Sprow (202) 1158 posts |
I took a look at this, and don’t think it’s a bug, you’re just holding it wrong. The alias matching system follows the recommended driver matching algorithm in the USB Common Class Specification the 2 tables in section 3.10, so the matching is a multi pass affair. Matching by eye, I don’t think the example given will do anything, because there’s not enough underscores (unless Textile ate them). There should be two trailing underscores, and it’s not necessary to give the class/subclass/protocol really though it doesn’t harm. I could provide a copy of USBDriver with some printf’s in if you just want to see the matching machinery chew up your alias – it worked on the HID devices I tried. It certainly didn’t help that the scant docs on the subject were barely intelligible, which hopefully are now a little improved at least as far as being self consistent in the examples. |
Rick Murray (539) 13850 posts |
Whoo! Thread Necromancy. :-) I never did get this to work for me. There must be some special secret incantation… Alias @USBDevice____04E8_6860____ Filer_Run <MTP$Dir>.!Auto %%0 That’s four _s and then another four. Vendor ID is 04E8, product ID is 6860. USB device is recorded as: USB$Device_06_01_01_04E8_6860_01_00_0400_USB12 : 12 0 0 USB$Device_06_01_01_04E8_6860_02_00_0400_USB12 : 12 0 0 The idea? When my S7 is plugged in, auto-start !MTP. |
Sprow (202) 1158 posts |
I think you’re holding it wrong too. Using the patented engineering algorithm:
Most likely what happens is the error “Window manager is already in use” from the Filer_Run is swallowed (by USBDriver using XOS_CLI). Simplify: try using *Echo instead, doing it at the ShellCLI, is something printed? That should work. Now try using *StartDesktopTask instead of Filer_Run. |
Rick Murray (539) 13850 posts |
Yup – was definitely holding it wrong. :-)
That was what it wanted. Thanks. Now MTP starts when I plug my phone in. MTP crashes right away (Samsung phones won’t spew data to a connected PC when plugged in – the user must unlock the phone and authorise the connection). That done, the phone removes and recreates the USB device, which causes MTP to start up again, this time it works. :-) Thanks for that! |