RISC OS Open
A fast and easily customised operating system for ARM devices
ROOL
Home | News | Downloads | Bugs | Bounties | Forum | Documents | Photos | Contact us
Account
Forums → Bugs →

Alias$@USBDevice variables

Subscribe to Alias$@USBDevice variables 7 posts, 4 voices

 
Feb 18, 2016 11:22am
Avatar Dave Higton (1515) 1599 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.

 
Feb 18, 2016 12:42pm
Avatar Rick Murray (539) 6426 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…

 
Feb 19, 2016 7:21am
Avatar Jeff Doggett (257) 131 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.

 
Sep 3, 2017 4:27pm
Avatar Sprow (202) 776 posts

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.

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.

 
Sep 3, 2017 6:59pm
Avatar Rick Murray (539) 6426 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.

 
Sep 4, 2017 8:26pm
Avatar Sprow (202) 776 posts

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

I think you’re holding it wrong too. Using the patented engineering algorithm:

  1. Complex problem doesn’t work
  2. Simplify
  3. Does it work now?
  4. Go to step 2

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.

 
Sep 5, 2017 9:11pm
Avatar Rick Murray (539) 6426 posts

I think you’re holding it wrong too.

Yup – was definitely holding it wrong. :-)

Now try using *StartDesktopTask instead of Filer_Run.

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!

Reply

To post replies, please first log in.

Forums → Bugs →

Search forums

Social

Follow us on and

Commercial use

For commercial enquiries, please contact the owners of RISC OS, Castle Technology Ltd.

ROOL Store

Buy RISC OS Open merchandise here, including SD cards for Raspberry Pi and more.

Donate! Why?

Help ROOL make things happen – please consider donating!

Description

Bug discussions that aren’t covered by the bugs database.

Voices

  • Dave Higton (1515)
  • Rick Murray (539)
  • Jeff Doggett (257)
  • Sprow (202)

Options

  • Forums
  • Login
Site design © RISC OS Open Limited 2011 except where indicated
The RISC OS Open Beast theme is based on Beast's default layout

Valid XHTML 1.0  |  Valid CSS

Powered by Beast © 2006 Josh Goebel and Rick Olson
This site runs on Rails

Hosted by Arachsys