ryankurte / rust-streamdeck

libusb based driver for Elgato StreamDeck devices
Mozilla Public License 2.0
57 stars 24 forks source link

Maybe-incorrect PID for StreamDeck MK.2? #20

Closed dbr closed 1 year ago

dbr commented 1 year ago

I was having trouble getting this library to connect to a V2 original streamdeck (via StreamDuck project)

Other tools (streamdeck-ui and deckmaster) both work fine

Eventually I ran this (trimmed down from #6)

$ cat src/main.rs 
use hidapi::HidApi;

fn main() {
    let hid = HidApi::new().expect("could not connect to hidapi");
    for device in hid.device_list() {
        println!(
            "Found to connect to {:?}. vid: {:?}, pid: {:?}, serial: {:?}",
            device.product_string(),
            device.vendor_id(),
            device.product_id(),
            device.serial_number(),
        );
    }
}

This outputs Some("Stream Deck MK.2"). vid: 4057, pid: 128, ... which is 0x0080

4 added the V2 it as 0x006d - but, weirdly, these values are consistent with the streamdeck Go library

https://github.com/muesli/streamdeck/blob/26adec9a4636e6062f886aefc84444af55a21bc9/streamdeck.go#L29

If I change it to 0x0080 everything seems to work perfectly, but.. I have no idea why the PID is 0x80

Julusian commented 1 year ago

You are confusing v2 (an unannounced second revision of the original streamdeck) and the mk2 (the new 15 button model). It you look a little lower in that list, you will also see one called mk2 with the pid you are expecting.

TheJebForge commented 1 year ago

I was having trouble getting this library to connect to a V2 original streamdeck (via StreamDuck project)

Actually that's a bug with how Streamduck checks if the device is a Stream Deck or not... It doesn't count in the MK2, even if it's supported in other parts of the code. Already pushed out a fix

dbr commented 1 year ago

Ahh, yes I was confused by the V2 vs MK.2! :sweat_smile: Latest version of StreamDuck solves this

Thank you both!