virgilvox / node-steam-controller

NodeJS module for interfacing the Steam Controller - uses node-hid
33 stars 3 forks source link

on raspberry pi works only with HID path #1

Open bestander opened 7 years ago

bestander commented 7 years ago

Thanks for the library!

I am testing it on a raspberry pi and connecting it via vid and pid did not work. But using a HID path worked

    device = new HID.HID('0001:0009:01');

The path comes from HID.devices()

[ { vendorId: 10462,                 
    productId: 4418,                 
    path: '0001:0009:00',            
    manufacturer: 'Valve Software',  
    product: 'Steam Controller',     
    release: 1,                      
    interface: 0 },                  
  { vendorId: 10462,                 
    productId: 4418,                 
    path: '0001:0009:01',            
    manufacturer: 'Valve Software',  
    product: 'Steam Controller',     
    release: 1,                      
    interface: 1 },                  
  { vendorId: 10462,                 
    productId: 4418,                 
    path: '0001:0009:02',            
    manufacturer: 'Valve Software',  
    product: 'Steam Controller',     
    release: 1,                      
    interface: 2 },                  
  { vendorId: 10462,                 
    productId: 4418,                 
    path: '0001:0009:03',            
    manufacturer: 'Valve Software',  
    product: 'Steam Controller',     
    release: 1,                      
    interface: 3 },                  
  { vendorId: 10462,                 
    productId: 4418,                 
    path: '0001:0009:04',            
    manufacturer: 'Valve Software',  
    product: 'Steam Controller',     
    release: 1,                      
    interface: 4 } ]                 

It may be an issue of node-hid but to work around this could node-steam-controller allow overriding what is passed to HID.HID()?

virgilvox commented 7 years ago

Sorry hadn't checked up on this repo in awhile!

The best solution might be to have the code find the path itself. But I can add in overrides as well. Feel free to PR if you have good changes.

bestander commented 7 years ago

Will do, thanks!