O
OpenDeck2mo ago
was

Segmentation fault using an Ajazz AKP153

Hi I have an AjazAKP153 and when I open opendeck with the device connected it closes immediately. I'm on Debian 12 using X11 not wayland, although I've also tried the windows version and it closes the same way. This is the only error it returns: (opendeck:21611): WARNING : 19:39:59.050: webkit_settings_set_enable_offline_web_application_cache is deprecated and does nothing. [2024-10-01][17:39:59][DEBUG][tiny_http] Server listening on 0.0.0.0:57118 [2024-10-01][17:39:59][DEBUG][tiny_http] Running accept thread [2024-10-01][17:39:59][DEBUG][opendeck::events] Registered plugin com.amansprojects.starterpack.sdPlugin Violación de segmento (`core' generado) There is nothing in the log that indicates what the error could be. Is it possible that I missed something? or that I'm missing something to install? I would appreciate any help.
No description
19 Replies
ninjadev64
ninjadev642mo ago
@zyp and @Fl1tch seem to be both having the same issue. I would recommend one of you opening an issue on the GitHub repo of elgato-streamdeck and ping @ZCube on it. @GodinRaider @zyp @Fl1tch @was could you all try these steps to run the example code of the library that OpenDeck uses? git clone https://github.com/streamduck-org/elgato-streamdeck.git cd elgato-streamdeck/examples/simple cargo run
GodinRaider
GodinRaider2mo ago
I do not know what I did. But I installed rustup-init and executed these three commands in the terminal. Here is the answer to the last one. What else do I need to do to make something work? 🙂
No description
ninjadev64
ninjadev642mo ago
ah it seems they've done it a bit differently try cd examples/simple cargo run
GodinRaider
GodinRaider2mo ago
warning: variable does not need to be mutable
--> src/main.rs:18:21
|
18 | let mut device = StreamDeck::connect(&hid, kind, &serial).expect("Failed to connect");
| ----^^^^^^
| |
| help: remove this `mut`
|
= note: `#[warn(unused_mut)]` on by default

warning: `simple` (bin "simple") generated 1 warning (run `cargo fix --bin "simple"` to apply 1 suggestion)
Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.11s
Running `target\debug\simple.exe`
warning: variable does not need to be mutable
--> src/main.rs:18:21
|
18 | let mut device = StreamDeck::connect(&hid, kind, &serial).expect("Failed to connect");
| ----^^^^^^
| |
| help: remove this `mut`
|
= note: `#[warn(unused_mut)]` on by default

warning: `simple` (bin "simple") generated 1 warning (run `cargo fix --bin "simple"` to apply 1 suggestion)
Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.11s
Running `target\debug\simple.exe`
ninjadev64
ninjadev642mo ago
does anything happen? as in, anything on your device or when you press a button?
GodinRaider
GodinRaider2mo ago
The screen saver with the Ajazz logo is still displayed. If you press any button, the screens go off. If you press again, the screensaver appears. In the OpenDeck, it also writes "No devices detected"
ninjadev64
ninjadev642mo ago
You have the AKP153R right?
GodinRaider
GodinRaider2mo ago
Yeah.
ninjadev64
ninjadev642mo ago
Alright, so that confirms it's separate device with different firmware. One more thing: what are the vendor and product IDs of your device? I'm not sure how to find that on Windows which you seem to be on but you can Google it
GodinRaider
GodinRaider2mo ago
VID_0300&PID_1020 Isn't that it?
ninjadev64
ninjadev642mo ago
Try changing lines 26 and 29 of info.rs to those and see if it works? Make sure to remove the 0x that's there already so they're not interpreted as hexadecimal
GodinRaider
GodinRaider2mo ago
/// Vendor ID of Ajazz Stream Deck
pub const AJAZZ_VENDOR_ID: u16 = 0300;

/// Product ID of Ajazz Stream Deck AK153
pub const PID_AJAZZ_AKP153: u16 = 1020;
/// Vendor ID of Ajazz Stream Deck
pub const AJAZZ_VENDOR_ID: u16 = 0300;

/// Product ID of Ajazz Stream Deck AK153
pub const PID_AJAZZ_AKP153: u16 = 1020;
Like this? I saved the file, then executed the "cargo run" command in examples/simple again. This is the result that came out
warning: variable does not need to be mutable
--> src/main.rs:18:21
|
18 | let mut device = StreamDeck::connect(&hid, kind, &serial).expect("Failed to connect");
| ----^^^^^^
| |
| help: remove this `mut`
|
= note: `#[warn(unused_mut)]` on by default

warning: `simple` (bin "simple") generated 1 warning (run `cargo fix --bin "simple"` to apply 1 suggestion)
Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.11s
Running `target\debug\simple.exe`
warning: variable does not need to be mutable
--> src/main.rs:18:21
|
18 | let mut device = StreamDeck::connect(&hid, kind, &serial).expect("Failed to connect");
| ----^^^^^^
| |
| help: remove this `mut`
|
= note: `#[warn(unused_mut)]` on by default

warning: `simple` (bin "simple") generated 1 warning (run `cargo fix --bin "simple"` to apply 1 suggestion)
Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.11s
Running `target\debug\simple.exe`
No changes. I see that in the code above it is suggested to run with the command "cargo fix --bin "simple"". Is it worth trying to do it?
Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.12s
Running `target\debug\simple.exe`
Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.12s
Running `target\debug\simple.exe`
That's what happened after I started the command accepting the changes. The running/restarted OpenDeck was not affected. The device itself behaves the same way with the screensaver
ninjadev64
ninjadev642mo ago
The changes are irrelevant and OpenDeck will not be modified by this, the whole of OpenDeck has to be recompiled for it to be modified, we're only testing the example of the library. I guess the only thing remaining that you could try is putting the 0x back in front of the numbers, but if that doesn't work then your device is different and would need more work and reverse engineering to implement support for.
GodinRaider
GodinRaider2mo ago
Compiling elgato-streamdeck v0.7.1 (C:\Users\Godin\AppData\Local\OpenDeck\elgato-streamdeck)
Compiling simple v0.0.0 (C:\Users\Godin\AppData\Local\OpenDeck\elgato-streamdeck\examples\simple)
Finished `dev` profile [unoptimized + debuginfo] target(s) in 1.55s
Running `target\debug\simple.exe`
Akp153 3257D40E374D 4128
thread 'main' panicked at src/main.rs:20:124:
called `Result::unwrap()` on an `Err` value: HidError(HidApiError { message: "Get Input/Feature Report DeviceIoControl: (0x00000001) Неверная функция." })
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
error: process didn't exit successfully: `target\debug\simple.exe` (exit code: 101)
Compiling elgato-streamdeck v0.7.1 (C:\Users\Godin\AppData\Local\OpenDeck\elgato-streamdeck)
Compiling simple v0.0.0 (C:\Users\Godin\AppData\Local\OpenDeck\elgato-streamdeck\examples\simple)
Finished `dev` profile [unoptimized + debuginfo] target(s) in 1.55s
Running `target\debug\simple.exe`
Akp153 3257D40E374D 4128
thread 'main' panicked at src/main.rs:20:124:
called `Result::unwrap()` on an `Err` value: HidError(HidApiError { message: "Get Input/Feature Report DeviceIoControl: (0x00000001) Неверная функция." })
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
error: process didn't exit successfully: `target\debug\simple.exe` (exit code: 101)
This is when I inserted 0x0300 and 0x1020. And what showed without errors last time is not what we need? Or should there be a different result on the command line?
ninjadev64
ninjadev642mo ago
Yeah, I was getting you to try this to see if the AKP153R was compatible using the same code, but it is a different device and will need to be implemented into the library by someone with reverse engineering skills. (which I presume you don't have as you don't seem to be a programmer) @GodinRaider someone is working on supporting the AKP153E, which looks more similar to the AKP153R that you have. Once those changes are in, I'll let you know the steps to try it again with the changes to see if that works
GodinRaider
GodinRaider2mo ago
Great! I'll be looking forward to it!
ninjadev64
ninjadev643w ago
@everyone OpenDeck v2.2.1 has some updates and fixes for Ajazz devices, notably support for the AKP153E device @GodinRaider you could try this again, delete the elgato-streamdeck folder first, and make sure to change the PID_AJAZZ_AKP153E to 0x1020 to match your device I don't have the highest hopes of it working but it's worth a try
GodinRaider
GodinRaider3w ago
PS C:\Users\Godin\AppData\Roaming\HotSpot\elgato-streamdeck\examples\simple> cargo run
Compiling elgato-streamdeck v0.8.0 (C:\Users\Godin\AppData\Roaming\HotSpot\elgato-streamdeck)
Compiling simple v0.0.0 (C:\Users\Godin\AppData\Roaming\HotSpot\elgato-streamdeck\examples\simple)
Finished `dev` profile [unoptimized + debuginfo] target(s) in 1.21s
Running `target\debug\simple.exe`
Akp153E B1D3D40E374D 4128
thread 'main' panicked at src/main.rs:20:124:
called `Result::unwrap()` on an `Err` value: HidError(HidApiError { message: "Get Input/Feature Report DeviceIoControl: (0x00000001) Неверная функция." })
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
error: process didn't exit successfully: `target\debug\simple.exe` (exit code: 101)

PS C:\Users\Godin\AppData\Roaming\HotSpot\elgato-streamdeck\examples\simple> cargo run
Compiling elgato-streamdeck v0.8.0 (C:\Users\Godin\AppData\Roaming\HotSpot\elgato-streamdeck)
Compiling simple v0.0.0 (C:\Users\Godin\AppData\Roaming\HotSpot\elgato-streamdeck\examples\simple)
Finished `dev` profile [unoptimized + debuginfo] target(s) in 1.21s
Running `target\debug\simple.exe`
Akp153E B1D3D40E374D 4128
thread 'main' panicked at src/main.rs:20:124:
called `Result::unwrap()` on an `Err` value: HidError(HidApiError { message: "Get Input/Feature Report DeviceIoControl: (0x00000001) Неверная функция." })
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
error: process didn't exit successfully: `target\debug\simple.exe` (exit code: 101)

Its after I reupload elgato-streamdeck and change PID
ninjadev64
ninjadev643w ago
Hmm ok, seems this still applies unfortunately ^
Want results from more Discord servers?
Add your server