#🤖│community_dev
1 messages · Page 4 of 1
Well, judging by the code that uses keyboard_handle_array, I can forsee some issues with multiple keyboards being used.
So, the cleanup code seems to work "fine," as in it just cleans out the slot that the keyboard was using, so it doesn't reallocate/reindex other keyboards.
However, when a new keyboard is inited, it looks like it takes connected_keyboards as an index
Although it doesn't seem like this variable is ever decremented, so... probably an array out of bounds if you disconnect an reconnect a device 10 times.
But it should at least mean the device ids are steady.
I asssume the max is at least 255, if not way higher
hmm that might need to be increased or decremented lol
my keyboard disconnects constantly cause of my port
Well, I think 10 is more than enough. The issue is that they don't "check which slot is free", instead they just keep incrementing until you have an array out of bounds
Ah wait, no, it looks like if any device is disconnected, it drops all devices.
So, when your disconnect callback is called, assume all device ids become invalid.
ah great
I gotta constantly look for new device ids and link them to their serial numbers
hmm I can't do that though, to get sn I have to switch to that device first, it's not part of the usb meta
Idk what you're doing, but it might be worthwhile to interface with the HID directly.
that's basically what the rgb sdk does right
Then you already have the serial number as its not abstracted away, you only have to send the reports yourself.
I don't understand raw hid stuff, using the send command in rgb sdk is already more than I understand
Well, there you are already sending a report yourself?
yeah, that's through the rgb sdk though
I forgor I have my Razer Huntsman V2 Analog connected right now instead of a Wooting® Analog Keyboard™ so I can't make a quick sample, but the HID report format is basically the same as that API call expect the first parameter goes last.
I'm working out how to read the serial number with command 3 right now https://gist.github.com/BigBrainAFK/0ba454a1efb43f7cb6301cda8838f432
I think this is a good example
well that's good, if I ever want to switch to raw hid it shouldn't be too hard
but yeah I guess the GetSerial command will also work if you can't get it from the HID itself
I think I'm gonna plug in my Wooting again, this Razer keyboard sucks, even if it is full analog ðŸ˜
I wonder what this is
What are you looking at?
Noo you just leaked your serial number
It's like your keyboard's SSN smh
but I gotta figure out how to convert so people can compare to Wootility and figure out what keyboard it is if they have multiple of the same keyboard for some reason
I'm just looking at it now myself, and it is perplexing
decipher
function formatSerialNumber(i) {
const o = new SerialNumber(i)
, {SupplierNumber: s, Year: st, WeekNumber: dt, ProductNumber: ft, RevisionNumber: mt, ProductId: xt, Stage: bt, UniquePCBDesign: Ct, MinorRevision: St, Variant: $t} = i
, _t = st.toString().padStart(2, "0")
, kt = s.toString().padStart(2, "0")
, jt = dt.toString().padStart(2, "0")
, Nt = ft.toString().padStart(2, "0")
, Mt = xt.toString().padStart(5, "0")
, Ht = ProductionStageToString(bt)
, Wt = o.hasOwnProperty("Variant")
, Gt = o.hasOwnProperty("UniquePCBDesign")
, Vt = o.hasOwnProperty("MinorRevision")
, zt = Gt ? `T${Ct.toString().padStart(2, "0")}` : ""
, Jt = Vt ? `${St.toString().padStart(2, "0")}` : ""
, Yt = Wt ? `S${$t.toString().padStart(2, "0")}` : "";
return ["A", kt, "B", _t, jt, "W", Nt, zt, mt, Jt, Yt, Ht, Mt].join("")
}
That makes some amount of sense
what's SerialNumber though
Well, I found bufferToSerial, which provided me with enough info to parse out the first chunk
This seems to match the SN fully, but it's with a bit of guesswork, so may not be perfect
r.skip(3); // D0 DA 03
r.skip(2); // no clue
uint16_t supplier_num;
r.u16(supplier_num);
uint8_t year;
r.u8(year);
uint8_t week;
r.u8(week);
uint16_t product_number;
r.u16(product_number);
uint16_t revision_number;
r.u16(revision_number);
uint16_t product_id;
r.u16(product_id);
uint8_t production_stage;
r.u8(production_stage);
std::cout << std::format("A{:0>2}B{:0>2}{:0>2}W{:0>2}{}H{:0>5}", supplier_num, year, week, product_number, production_stage ? 0 : 1, product_id) << "\n";
and I assume you're looking at the preview wootility which is where UniquePCBDesign comes in for the UwUs
So, that will likely impact the SN in some way
use wooting_rgb_sys as rgb;
// https://gist.github.com/BigBrainAFK/0ba454a1efb43f7cb6301cda8838f432
const GET_SERIAL: u8 = 3;
fn main() {
unsafe {
let len = u8::MAX as usize + 1;
let mut buf = vec![0u8; len];
let response = rgb::wooting_usb_send_feature_with_response(
buf.as_mut_ptr(),
len,
GET_SERIAL,
0,
0,
0,
0,
);
if response == len as i32 {
println!(
"A{:02X}B{:02}{:02}W{:02X}{}H{:05}",
u16::from_le_bytes(buf[5..7].try_into().unwrap()),
buf[7],
buf[8],
u16::from_le_bytes(buf[9..11].try_into().unwrap()),
if buf[15] == 1 { 0 } else { 1 },
u16::from_le_bytes(buf[13..15].try_into().unwrap()),
);
} else {
println!("Error retrieving serial number");
}
}
}
I'm trying to determine how I should interface device selection for rules, since the data type I'm storing is HashMap<String (serial number), u8 (profile index)>
Should I keep a list of all SNs ever connected even if not connected right now so you can always make rules for disconnected devices?
That would allow me to pre-populate a list of devices and profile indexes automatically, but if I don't do that I would have to have an add button and a popup to select which device to add
That's more of a question regarding how you should design your app, which I think you would be best qualified to answer.
This is going to be hard to do without a second device to test with, but if I understand correctly I need to figure out how to reset keyboard_handle and connected_keyboards, run wooting_usb_find_keyboard, then figure out a way to access connected_keyboards, iterate over that and send the command to get each devices serial number.
wooting_usb_disconnect resets but I can't access the number so I'll just have to loop until it returns false
Oh that's unfortunate, every index 0-10 is valid and returns the first device if one isn't found Select won't fail it will just silently fallback to the first device
I have 2 wooting keyboards if you need me to test anything
You can test this once the artifacts are uploaded by actions (in around 30-40m) https://github.com/ShayBox/Wooting-Profile-Switcher/releases/tag/2.2.0 This still doesn't support Wootility Beta and the new RGB effects system, but it should support multiple devices and the UwU
i have 3 boards and use them all at the same time with artemis for testing frequently
when that feature was first added it was buggy but it seems good now
The only problem I see is that every rule updates every device, but I can add a toggle to skip devices when I update to support Wootility Beta / RGB effects whenever that becomes stable
30 to 40 minutes?!?!
I have C++ projects with thousands of source files and we batch build them in 1/10th of that time
I have release builds set to single thread compilation to reduce file size as much as possible, it could be done faster,
What does multi-threading have to do with file size?
but this project is the largest dependency tree out of all my projects and takes the longest, I might have to remove that if it takes much longer
codegen-units = 1 # Compile crates one after another so the compiler can optimize better
Sounds like a weird Rust issue
I would die if I had to compile my projects with like 2000 source files on only one thread
some of these source files, no joke, take 20 seconds
but my i9-13900K gets the gamut done in under 1 minute
Those kinds of optimizations exist with gcc too, but it doesn't really make a big difference I just enable it on all my projects cause compile time on actions doesn't matter
it doesn't apply to debug builds so it compiles faster on my computer
I could figure out how to setup caches to speed it up
So, I plugged in the second wooting, seems I needed to restart the program for it to recognise it
yeah it only checks on startup
It would take more work than it's worth to re-initialize the tray
it only took 2m to build on my computer
That is without optimisations?
without any file size optimizations
Who cares about file size, CPU time is important
So, I've set up a thing to make it switch profile when GTA5.exe is focused, and it does seem to work, but when I unfocus GTA V, the second keyboard doesn't seem to have its active profile reset.
The program will use the active profile at the first start (when it creates the config file) as the fallback profiles for the keyboard when no matching rule is found, I don't have a ui to edit it but it's in the config file and uses the same format as rules. you can also create a rule with wildcard in all the fields to achieve the same effect, I believe it has to be the last rule (bottom) but it might be top
It looks to me like the "WootDevResetAll" command was not sent
I did it manually and now the keyboard is back to normal
Well, it might be that the keyboard never gets the command to swap back the profile either
Idk what to say, but it's definitely a consistent issue
Only one of the keyboards is reset after defocusing GTA V
oh hmm, what's your fallback config setting
My what, where
it might have populated the first time when you didn't have both plugged in and doesn't have the 2nd
Edit > Open Config File
Ah, this one didn't get it populated.
Ah yeah that's a flaw, I need to add a UI to edit the fallback and a toggle to skip devices
you can empty the fallback_device_indices and open the program with the profiles active that you want to be the fallback to fix that for now
I have manually added the second device to the fallback_device_indecies array with a value of 0
now the program crashed on defocus and neither of the keyboards were reset
I also just realized I forgot to update the version number on the release files lol
can't reproduce it now, seems to be fine again
weird stuff
wasn't Rust supposed to not have random crashes
I'm sure there was a reason, there's just no logs to find out why unless it's run from a terminal. probably forgot the comma and couldn't parse it and reset the config
I know JSON isn't a very human-friendly format but I hardly pass as one anyway 😛
That is to say, I definitely did not mess up my commas.
Welp, whatever, it is working perfectly fine now
A weird thing is that my Wooting Two seems to be flashing at 100% brightness shortly before its profile is switched
but I doubt that's a you-problem
I'll add that to my list of things to add with the next update when wootility updates
that's likely the send sleep delay, I use a higher safe value than wootility probably does, you can lower it or make it 0, I've never had an issue at 0
Set it to 0, but still the same thing, just faster I guess
but, well, this wooting two is beaten to death anyway
ah wait I just realised, the second profile has a different brightness setting than the first one
so yeah not your issue
I removed the single codegen unit optimization from the re-release, I wonder how much faster it will build
weird tho how it retained the wrong brightness then
brightness can be changed per-key, pey-profile, and per-device, and wootility previews it in-memory without writing it you press save. but I never write to the device in WPS
yeah maybe some weirdness with that previewing
Seems your app somewhat-gracefully handled one of the keyboards being unplugged as well
Only issue is no tray update but yeah
the devices will never disappear from the tray or elsewhere, I store the serial numbers in a list so you can configure unplugged devices
ah, hmm
clicking the button in the tray just does nothing but print a not found message in the console
what are they supposed to do anyway
they are checked on, but I click on them and they stay on
you can click the device if it's connected to select it and then the profile selection below applies to the selected device
hmm
Some minor usability tweaks I would do is maybe sort the keyboards in descending order, since higher = newer = more likely to be what the user wants to use
Also maybe display the actual name of the keyboard instead of the SN
it's highly unlikely the user will own 2 of the same model, but more likely they will own different models
yeah I want to show the model name in a shortened form and have a toggle to show the SN instead. it also doesn't pull the profile names from the other devices since wootility only added multiple devices in beta
I might change the tray to instead have a label showing the device and a subset of profiles under it, instead of two selections, double the list and show both sets of profiles
soon I will own another wooting + a wooting UwU
then I will plug them all in and watch the USB ports in my mobo die a miserable death

that is to say, I think users using multiple keyboards in general is highly unlikely 
maybe more likely-ish with the UwU
if you can call that a keyboard
more of a macro pad, or "Osu! controller"
the uwu is the only reason, even wooting didn't support it until now in wootility
Although I can't help but think of Tom Scott's Emoji Keyboard
Imagine if he built this nowadays with the Wooting Analog SDK
it would be a breeze, you have the SN for reference
get proper reports for each key pressed
then just use SendInput from WinAPI, and you're on your way
Looks like build time was cut in half, back down to before I switched to tauri v2 or added game scanning
Now rewrite it in C++ and weep
what's that for
A big project 😛
What's even sadder is that this is Windows build times
If I could switch to Linux, it would probably only take 20 seconds
10x slower on actions, it takes most of the build time to just install tauri-cli on actions
Stuff compiles so incredibly fast on Linux 
linux is always the first build to finish
windows after, even though I build twice (portable is a debug build) and macos last
lots of shared libraries on linux I guess
the shared libraries are such a bane to me
instead of relying on a dynamic linker, I basically just dynamically link myself on linux
because various complications
.<
I really wish Wootility wasn't a single large minified javascript file. I see it's using a deviceId variable as the key for storing data connected to a keyboard, but what is this? I can't figure out how it's created. If I had to guess it's either the HID ID (I hope not) or an encoded form of the serial number (this seems to be the only reliably unique identifier)
Let's just bribe Simon to have him hand us the Wootility source code 
I'm actually a bit surprised the Wootility isn't open-source since it's just a "glorious" bundle of JavaScript...
So, severely more trivial to reverse-engineer than, say, a DLL/SO written in Rust...
I give up, I found the legacy serial number code but not the device id code
I don't see why device id would not be the same as the serial number
I don't either, maybe it is somehow but I can't find it. mine is 241831621
Ah hmm interesting
it seems to be the same if I wipe the data, I'm gonna try changing ports between
still the same
What's weird to me is that the device id is not a string, because all the code I can find relating to it calculates a string
same if I restore firmware to pre-beta and open the beta wootility
it is a string, in json
I mean, it is clearly a number?
deviceId is the variable name used in the local storage, for some reason it's stored as a string but it's really a number
Oh, wait
lmfao
Look at 241831621. Here, 21 is the year it was made.
class Mc extends Bn {
constructor(e, t) {
super(e, t)
}
async getlayoutType(e=!1) {
if (e || void 0 === this._layoutType) {
const e = await this.getDeviceConfig();
this._layoutType = e.getRawKeyboardLayout()
}
return this._layoutType
}
async getDeviceID() {
if (void 0 === this.deviceID) {
const e = await this.getSerial();
this.deviceID = "" + this.keyboardType + e.ProductId + e.ProductNumber + e.RevisionNumber + e.WeekNumber + e.Year
}
return this.deviceID
}
}
And 16 is the week. Very similar to serial number...
probably full, 80, uwu etc
My device id seems to be 32504413821 for a Wooting Two HE
I definitely recognise some parts of it from the serial
WOOTING_USB_META shows the type, mine is 2
Type: 2 | 418316 | Week: 21
418 is at the end of my serial's 5 digit number 00418 (padded)
My Wooting Two HE is definitely not a DEVICE_KEYBOARD_60
Type: 2 | H: 418 | W: 31 B: XXX6 | Week: 21
21 is year, not week
hmm
I think it might be from this:
[P.WOOTING_ONE = 0] = "WOOTING_ONE",
P[P.WOOTING_TWO = 1] = "WOOTING_TWO",
P[P.WOOTING_LEKKER = 2] = "WOOTING_LEKKER",
P[P.WOOTING_TWO_HE = 3] = "WOOTING_TWO_HE",
P[P.WOOTING_60_HE = 4] = "WOOTING_60_HE",
P[P.WOOTING_60_HE_ARM = 5] = "WOOTING_60_HE_ARM",
P[P.WOOTING_TWO_HE_ARM = 6] = "WOOTING_TWO_HE_ARM",
Is your keyboard a Wooting Lekker?
Ah just a different incremented list I guess
yeah
Type: 2 | PID+PIN: 418 | REV: 3 | Week: 16 | Year: 21
Then that makes sense
well this is good, idk why the sn wasn't used directly though lol
Not unique enough maybe
I think it's less unique than before, it's missing one of the numbers from the SN
no nvm it's every number, just in a different order and without padding
The lack of padding is what's questionable to me, because in theory there could be ambiguities due to that
like, as we saw, my device id is a bit longer than yours
but, meh, I guess it's "good enough, ship it."
🤔 A02B2106W031H00418 BXX06 is not 16 for the week
No, it's 6 for the week. Lack of padding, as I said.
This format is unfortunately unparsable due to that as well, unless you do some sort of "least vexing parse" magic.
I'm just gonna write a serializer to convert
You can convert serial number to a data structure and that data structure to the device id
but device id to a data structure 
oh the keyboard type probably means board cause of the B after it
W for week H for something related to 031
Huh? The thing between A and B in the SN is supplier number.
but that's the keyboard_type
Please don't confuse the SN for the device id
oh I see
device id is missing the supplier number and using its own keyboard_type which happens to be the same number for me
#[derive(Clone, Debug)]
pub struct Device {
model_name: String,
supplier: u16,
year: u8,
week: u8,
product: u16,
revision: u16,
product_id: u16,
production: bool,
}
#[derive(Clone, Debug, Display, Eq, Hash, PartialEq)]
pub struct DeviceID(String);
impl From<&Device> for DeviceID {
fn from(device: &Device) -> Self {
let keyboard_type = match device.model_name.as_str() {
"Wooting One" => 0,
"Wooting Two" => 1,
"Wooting Two Lekker Edition" => 2,
"Wooting Two HE" => 3,
"Wooting 60HE" => 4,
"Wooting 60HE (ARM)" => 5,
"Wooting Two HE (ARM)" => 6,
&_ => 7,
};
Self(format!(
"{}{}{}{}{}{}",
keyboard_type,
device.product_id,
device.product,
device.revision,
device.week,
device.year
))
}
}
#[derive(Clone, Debug, Display, Eq, Hash, PartialEq)]
pub struct DeviceSerial(String);
impl From<&Device> for DeviceSerial {
fn from(device: &Device) -> Self {
Self(format!(
"A{:02X}B{:02}{:02}W{:02X}{}H{:05}",
device.supplier,
device.year,
device.week,
device.product,
device.production as u8,
device.product_id
))
}
}
So serial number doesn't use the revision number or keyboard type, and device id doesn't use the supplier number or production stage
🤔 which one is more unique
One you make yourself 😛
But I'd def. prefer SN because it's parsable
And also something the user can easily look up themselves
yeah I'm gonna use SN with FromStr to DeviceSerial, and just have a From/Into DeviceID from Device so I can access the data in Wootility, but because it lacks all information I can't directly create a Device from the serial number, I have to find it by scanning devices
its the exact order of releases
If I had to guess, UwU is 7 and UwU RGB is 8 😛
Is there an ETA for Wootility Beta to be stable? and do we know the exact strings and ids for the UwU?
The RGB SDK feature/uwu branches has the strings, but does anyone have an UwU? can you open Wootility Beta, press Ctrl + Shift + I, and go to the Application > Storage > Local Storage > file:// and tell the first number of your device id
Oh hell yeah there's a .NET wrapper
Now I can easily play around with the keyboard as a C# developer
if you're still wanting this, 7
been a few hours so i dunno but i thought i may as well
is that the uwu or uwu rgb
uwu
non rgb
though my id seems to be a bit longer than what you had highlighted in the image
14 digits if i can count correctly
dunno if thats something you already knew
the device id length is dynamic unlike the serial number which pads leading zeros to a fixed length
ah okay
I really have to learn Rust one day
If I had to guess your product id is longer than mine (3), and likely your week is 2 digits intead of 1
Rust is great 🦀
rust truly is great
currently learning C and ASM at uni
oh no
also learning C at uni and probably asm soon
also learning python at the same time but i already know that and the lectures are just free sleeping time
Ergh I don't like Python. I never use it anyway
for me python is good for scripting but i wouldnt use it for anything "big"
Using it for anything big is misusing it lol
not a huge fan but using it more is making me appreciate it a little more
it does have some nice things here n there
I started with Java but really learned JS, then TS, PY, GO, and RS but not in school. I've tried C/C++ but it makes me hate programming
JS/TS makes me cry
i love js
unironically
liek yeah its stupid
but its just nice sometimes
though i definitely would always go to TS now
I can deal with TS, but JS is just awful unless it's a small amount of code
I hate that there are no object types in runtime
yeah going to js feels so bad now
i dont really find it to be an issue honestly
TS is just a tool to make JS less bad
if you're able to use something like deno that runs ts why not just use something else entirely. leave js to die in the browser
yeah bun, never tried it
its uh
its pretty nice i guess
rn its nothing super special (in my opinion/for what i'm doing anyway) like people are making it out to be
but its faster at some things and its mostly a drop in replacement for node
I need to learn how to write wasm with rust for websites
I want Blazor to get really good :)
I never really learned C# or F#, I tried it when dotnet core came out and it's actually a usable language for more than just Windows programs. but I still don't have a reason to learn and use it over Rust, even for the windows api
yeah blazor is still kinda poop imo
It's nice, certainly more enjoyable than Java
i recall hearing it wasnt as nice
Yeah it's fast and cross-platform now
mostly the binary sizes in the browser
i also feel like java isnt that bad compared to how much hate it gets but its certainly not amazing
no reason to use Java when C# exists though :)
Java isn't that bad but it's also only use for like Minecraft these days, so why learn it over anything else unless you need to
i'm currently trying to do a thing with opencv + wasm + blazor and had to use .NET 8 preview for some things, it feels like it has lots of rough edges still
Just uhh. Imagine it working
Rust to JVM when
Sadly yeah
Minecraft mods written in Rust 🤔
Minecraft written in Rust!!!
yes
What about Zig? Bun uses that
zig is apparently cool but i havent looked into it
Apparently it deals with memory in a different way than Rust
Its biggest downside is that you cannot say you're writing Rust while using it
truth
i think zig memory management is manual but you can choose the allocator yourself and stuff
I heard it's memory safe though
ye
But how it achieves it without checking array bounds etc I don't know
C# and Java spends CPU instructions checking bounds
dunno much about it i dunno either
zig is not realy memory safe like rust
sure it has some syntax to make is safers (slices and optionals being prety much the defauld)
but it also doesent have the restrictions on memory rust has
but what is nice about zig is the no hidden controll flow
errors have to be handeld you cant ignore them
but not like checked exceptions in java?
from quickly looking what checked exceptions is its pretty much the same
https://ziglang.org/documentation/0.11.0/#catch
var value = functionThatCanError(); -> compiler error
var value = try functionThatCanError(); -> keep throwing the error
var value = functionThatCanError() catch { //deal with error };
https://github.com/ShayBox/Wooting-Profile-Switcher/releases/tag/2.3.0 I released a pre-release for use with Wootility Beta and it'll be marked as latest when that becomes stable
similar in rust, Result and Option types can use ? to pass to the current if its also the same Result or Option return or you can match/if check them for Ok/Err Some/None to handle the errors or let _ = to ignore the response
they just move it to a try instead of throws at fucking declaration - which makes it clearer where it's being thrown. Neat
This is in the beta wootility:
o[o.WOOTING_UWU_NON_RGB = 7] = "WOOTING_UWU_NON_RGB",
o[o.WOOTING_UWU_RGB = 8] = "WOOTING_UWU_RGB",
o[o.WOOTING_60HE_Plus = 9] = "WOOTING_60HE_Plus",
I guess they kinda leaked the Wooting 60HE Plus, whatever that is supposed to be >.<
The base PID of the Wooting 60HE Plus will be 0x1320
good to know, I'll add that to the wootility aur package and wps
What I don't understand is why Wooting is deciding to focus more on 60% keyboards than TKL keyboards. 
Then again, I never had to manage a company that deals with physical products.
I don't like anything but full keyboards but I prefer the size with a delete button and arrows. In firmware key remapping and fn layer is the main reason I use this keyboard, everything else is bonus
Well, I'd also never buy a keyboard without a numpad, but it's not like we 2 people represent 100% of the market. 😄
Wooting's software is also quite nice. Recently I did try the Razer Huntsman V2 Analog because it is a full-analogue keyboard, but I quickly realised how much customisation that Wooting was offering I now no longer had, and the Wooting Two is quite compact in comparison, so it's overall a nicer keyboard.
Wooting has the best firmware and software even if it's not open source
Well, Warframe did do funny RGB effects on the Razer keyboard... but that's just a lack of support. 😄
It's a shame there's no universal keyboard RGB thingy
When using the analog SDK, every so often my mouse becomes unusable for a second or two, anyone have a clue as to why this happens?
it's quite annoying, and also happens when using software others wrote using the SDK (like the input display)
I noticed the Analog SDK has some weird lag issues. I ended up rewriting a part of it in C++, and no more lag: https://github.com/calamity-inc/universal-analog-plugin
plug them into different usb controllers if you can
I'm well aware that you did that because you've mentioned it like 4 times to me now and it's not going to help me as I've also mentioned several times
it doesn't answer my question though
I haven't tried it and it doesn't answer my question
I have no idea why the lag is there, no.
i dont use analog, I disable it so i can use my gamepad in games
I'm using it on the one straight on my motherboard
same with my mouse
It is also not relevant for my use-case of reinventing every wheel in C++. 😛
oh, we're talking about a different type of controller
okay then stop bringing up unrelated shit
It is very much related tho
put then in different sides front/back of the pc or far ends of the back ports. different onboard usb controllers
(pardon my french)
But yeah I understand I don't have a solution that satisfies you
oh so we did mean the same thing
I can certainly try
my wireless mouse has to be in the front with nothing else plugged in or it loses signag strength
still
I tried it, didn't help
I guess the USB controller might be overloaded, but I don't see why the issue would only be apparent when using the Analog SDK, then.
It definitely sounds plausible
I'm going to check device manager real quick to see if I actually have multiple controllers or if this is just motherboard smoke and mirrors
things might be polling and recieving lots of analog data, imagine a whole keyboard of floats in milliseconds
Not that I understand much about hardware, but I do think the keyboard always reports how far a key is pressed, and all the Analog SDK does is listen.
stuff works in events
I think
idk how it works, never messed with analog sdk
Your keyboard sends an update with all pressed keys and how far they are pressed when there is a change
It can support up to 16 keys pressed at a time in the report
So it would never send the full 100-something keys
Also it doesn't use floats, it uses a u8 with a value from 0 to 255
fine I'll try your analog sdk thing but I'm reading the source code first
There's a lot of source code to be read, if you want to look at the full framework I used for this 😄

Well, alternatively you could be using namespace std::chrono_literals; so you can write std::this_thread::sleep_for(100ms);
When no keyboard is detected
haha, no, I've only been working on it for max. 2 years
but we need HTTP, TLS, JSON, and stuff like that for our bigger projects
So it's all in there
well yeah but it's also a hot mess of bloat
Well yeah but if I'm going to compile this myself
If that's your goal, you'll need the Sun build system: https://github.com/calamity-inc/Sun
You can use the PHP scripts to "bootstrap" it
okay yeah no
I mean you can probably build "Universal Analog Plugin" with Visual Studio, but I only used Sublime Text + Sun for it because it's simpler
Right now the choice is between reading more code than I currently have to or trusting you and I don't have any good reason to do either
Would a PDB help you?
No I'm just done
Alright then xD
you've been trying to shove this universal analog whatever down my throat too much so I'm just kinda done
for a plugin mesnt to be used and integrated, having a different build system is an obstacle. ideally support all major systems however that may be
it's also written in a completely different language
I support the only build system I consider worth using 😄
I mean, it's a single .cpp file, you can probably just invoke clang yourself to build it tbh
except I'm not doing it because I said I'm done with this shit
in the end it's not going to help anyway because I NEED to support the official SDK for my use case
no way around it
You don't have to. I already said I know you're not satisifed with the solutions I have to offer.
I just personally use this plugin because a) I used the Razer analogue keyboard, and b) I don't like the lag with the official plugin.
You've been trying to push this shit down my throat 4 times now and haven't exactly sounded trustworthy
Sorry it came across that way
Anyway I'm here to get my question answered and not to linger on your rewrite stuff because it is simply not an option
FWIW, the only lag I experienced with the Analog SDK is related to init & deinit
For me it's consistent throughout runtime
I was gonna say it might be related to your specific use case, but you did say you also had it with other apps using it?
You were trying to write Godot bindings, right?
idk if you figured out why Godot GC'd your plugin yet, but the constant deinit & re-init due to that might be a cause of lag then
I fixed the GC issue
Nice
or rather
I worked around it
there are now unit tests and stuff that are queued for fixing this issue
but you did say you also had it with other apps using it?
Yes. Also happened with the input display.
Correct.
Could I get a link to this input display? See if it works fine for me.
but the constant deinit & re-init due to that might be a cause of lag then
There was no constant deinit/reinit
(Real life calling me now, I will test it once I get back.)
I think it was this one
yeah
since you're gone for a bit I'm gonna redownload it and check whether this is the one and if the issue still happens
Yeah it also happens with this one
It very well might be some kind of bus bandwidth limit, because I have an old motherboard
And I’m not sure which USB ports go into what bus on my PC right now
Notes:
- this does happen on init as well but that could as well be a bandwidth thing because it has to send a bunch of stuff on init anyway
- I do have to actually connect to the application for it to start doing this
nah, the init and deinit lag is "normal"
also did you just run the Woot-verlay-2.1.exe without checking the source or building it yourself? 😛
Anyway, just tested the Woot-verlay, seems to work fine on my machine, no mouse lag
but that's also not relevant because runtime lag isn't
I wonder if I can figure out whether this is a bandwidth limit using wireshark or something
I'm like pretty sure the keyboard does always send those reports, it's just a matter of if your machine is listening or not
but it's also possible that my assumption about this is wrong
then the additional bandwidth could be an issue in processing your USB mouse
have you tried using the touchpad on your laptop while using the Analog SDK?
at least it looks a bit like a laptop idk
I am using a desktop computer
my computer is not visible in the shot
I see
if that was the case, then I would be having issues when the SDK isn't running (I'm not)
Well, I would ask if it's only an issue with the Analog SDK but you don't trust me with my evil C++ code
Have you tried polling the HID reports on usage page 0xFF54 yourself?
I have no reason to trust you and you lost the trust I am willing to give by default by being pushy
You're not making it any better right now
Maybe you could also set up a linux virtual machine, attach the Wooting keyboard to the VM so you can use the Analog SDK there, and see if it impacts your mouse
also, if I were to peddle malware, why would I target you specifically? If I wanted to spread malware, I'd go for a bigger audience than just a single person. I also don't know you, don't think there's anything special about you to target you specifically, but whatever.
Before doing all of this I'd like to see if I am hitting a bandwith limit because it seems the most likely given my motherboard is 10 years old
hmmmm
the usb2 speeds would meed a high speed coms chip that we simply dont have. so usb fullspeed only
well, my motherboard didn't like me connecting 2 wooting keyboards into the same controller
thats because of usb endpoints most likely
but I think that was due to the power draw of the keyboard
USB endpoints?
basically usb devices the OS sees
our keyboard shows up as several devices
mainly to facilitate certain functionality like mapping mouse buttons and gamepad output
I was about to mention a controller and mouse yeah
i am unsure if linux has a concept of usb endpoint limits like windows does
cough
Well, I don't see a tony on the "meet our team" thing
If the issue I am having is related to USB endpoints I feel like it would be happening constantly instead of specifically when the SDK is running
correct
also it would just stop accepting new endpoint devices if that was the issue
but was more for sainan
their issue of 2 wootings is either a power limit or usb endpoints
I can connect multiple wootings, it was just an issue of not on the same row
depends on the mobo config. if the 2 ports share 1 controller and other ports another then it can still be endpoints
the endpoint limit comes from the controllers first and OS second
yeah, I was trying to dig deeper myself to see if it could be related to my issue. do you have any ideas as to why my issue could be happening?
Well, the issue is that the wooting itself just turned off
So I think it just didn't get enough power
keyboard doesnt turn on if it doesnt get enumerated
hm
possibly the motherboard realising that the power draw is too much and hence forcing it off
anyway, thing of the past
could be. back to the main topic @torpid fox do you have just 1 mouse connected to the pc?
Yeah, I could connect more for testing though.
Or at least, one physical mouse. The keyboard obviously counts as one
how did you even find that ancient article from the first launch of keyboards
I mean this thing 😄
I should've realised Wooting has a few more employees
Since it's literally on your front page that seems pretty important
but also I have no idea what Wooting employees would be doing all day? xD
we are sort of slowly trying to figure out what to do there although tbf those are the sort of main faces i guess
most of the livestreams are from 2 of those folks
Yeah I noticed that
also I just realised the z-indexing is wrong when the page first loads and only gets fixed when hovering on it
ive been on like 1 and that was that but yeah we arent exactly sure how to solve it as we have a few too many people to do the same thing again
same but we didnt choose to fix it until we know what to do in general with the space
Mouse connected. I assume you want me to try to see if the issue still happens when trying to move the new mouse I just connected?
Also, may I ask what you are developing for Wooting, Tony?
yeah basically
Huh wait what now it isn't happening at all even with the other mouse
maybe I'm just getting unlucky but this seems weird
no theres just something going on
hm
anything and everything at this point
Happened with the first mouse I mean
wait so mouse 1 does it but mouse 2 doesnt?
Not sure yet
I'm not sure about mouse 2 yet because it suddenly isn't 100% consistent
Well, someone leaked the 60HE Plus 😛
the what?
God damn you windows clipboard
just thought it was interesting
okay this may actually be relevant because when I unplugged mouse 2, mouse 1 immediately starts acting up
wait you have mouse 1 still plugged in
Should I unplug mouse 1?
You reckon I should plug mouse 2 in the port where mouse 1 used to be?
well the same port might be good but in general switch out mouse 1 completely
oki
as to eliminate mouse 1 from the test
Issue now happens immediately to mouse 2
so more mice = less frequent?
...maybe I think so?
or just that port not being nice to mice
That's what it seems like
Well it works fine normally
hm but I plugged the mouse into a different port and it hasn't happened yet
silly hardware
it's specifically on a different area on the computer though that may be a different bus
it's the one I plugged the keyboard into earlier
(issue still happened)
Oh nope it just happened
specifically when I clicked
Maybe my motherboard is straight up broken
there are several other oddities
if this just ends up being a motherboard problem I'm going to be slightly pissed at myself
Tony, would you happen to know if the firmware always sends the analog reports on 0xFF54 or if the host specifically has to ask for it? I don't really know how HID works below the OS level unfortunately.
Maybe Wireshark could answer this for me
Wireshark with usbpcap seems like a good way to find that out yeah
Unfortunately I haven't managed to get usbpcap working on my machine
Oh well
but assuming it's that the reports are only sent when the host registers interests in them, then it might be your motherboard being overloaded then
Really? that's odd, it's always worked flawlessly for me
Then you can see if the Wooting keyboard sends any reports when you press keys (without using the analog sdk)
(on usage page 0xFF54 specifically)
I'll install wireshark again and try
yeah issue is definitely still happening with mouse 1 unplugged and mouse 2 in a different port
Gonna close the program now so I can use my computer normally
while installing
I can't find anything about a page
Uhhh
Well, when you press a key, do you see a difference with and without Analog SDK?
There's definitely a difference and I don't have to press a key for it
when the SDK is running there is constant communication back and forth
the sdk running or a program using the sdk
a program using the SDK
well there will be coms when that runs as it would pull analog data from the keyboard constantly
unless its a test program that just inits and does nothing

So is it like "the report being sent" is actually the OS constantly asking the HID if it has a report?
well since I wrote the program I can stop it from polling
see if that changes anything
Okay, so according to GPT, the OS does have to poll the device for it to send any reports
Apparently USB 3.0 did introduce some event thing tho
should always be present
I stopped it from reading the buffer or doing any get_analog calls and I still seem to have the mouse issue, FYI
So, wireshark no longer shows the communication you were seeing before?
I haven't checked yet
mouse issues would probably be from it searching for devices, not from reading a device that's already opened
I opened wireshark 5 seconds ago
Hmmm, what's the interval on the search for new devices?
That would explain a lot...
The firmware will always attempt to send a report when the analog data changes. My understanding is that the OS will not bother polling the interface if there are no readers of the interface, so that could be why you see less communication happening when the Analog SDK isn't running
was about to say doesnt the sdk just read from the device when you wanna get the buffer?
I did see communication without the SDK. it was just only when I actually touched something instead of non-stop
yeah, it won't send multiple reports with the same information
so if you're not pressing anything, it will only have sent a report when the last pressed key was released, then it won't send anymore until you press a key
yeah
as expected
when the SDK is running there is constant back and forth though... mainly with device names?
Not that I'm the best at reading Rust, but it looks like it scans for new devices every 500ms
That could be from the device scanning as well? As usually it won't need to get the strings as it would already have got them on device connection, but the device scanning may trigger it to get the strings again
unsure if it might be nice to offload device search to SDK consumers
ideally it shouldn't be polling for devices, instead using OS events to check when a device connection happens
offloading the search to SDK consumers just moves the problematic baton to others 😂
Maybe if the device scanning was changed from every 500ms to every 5000ms?
You could increase the period, and the affect would be minimized, but at the cost of having delayed detection for devices that are connected
Although, you could question how important that is to have
hotswapping usb devices isn't exactly a hot path
thats the point lol
ye but it doesn't solve the issue, it just makes the issue the responsibility of the consumers. Also increasing the work required (and potentially making breaking ABI changes) for the SDK consumers
i mean how easy is it to consume USB events cross os
if any significant effort was to be put in to improving this behaviour, it would be the OS events path that I would go for
there's no unified approach, in general would be using specific apis
depends on the device. for wooting devices is it very easy to use it on linux
but the linux apis regarding hid are poo
but "hidapi" abstracts away most of this pain
I just realized that the device scanning could explain why my hiccups happened less often with more mice connected
We've experimented with using this library: https://docs.rs/rusb/latest/rusb/ (libusb wrapper) to listen for device connect/disconnect events rather than polling
This crate provides a safe wrapper around the native libusb library.
Since you're using past tense, did something go wrong while doing that and did you switch away?
Oh no, we're still using it. But the project is on hold and I haven't had much time to scrutinize it, but on the surface it appeared to behave pretty well. Although, I do remember it not working on all main OS' (Windows, Mac, Linux), I can't remember which ones worked/didn't work though.
If you want I can test it on all of them
Would be nice, although @remote junco may remember what the behaviour was like on each platform
I don't experience any input lag by just constantly enumerating all HID devices on my machine 
is that getAll function calling hidapi::refresh_devices?
No, it's calling CM_Get_Device_Interface_ListW, HidD_GetAttributes, etc.
(I don't like external dependencies)
FWIW, it's very similar to hid_enumerate from hidapi
It is my Soup again :^)
I wouldn't be surprised if the hidapi implementation causes more overhead than is necessary
I don't even see a refresh_devices in hidapi
the development of the hidapi library was basically dead for many years until libusb picked it up fairly recently
Oh, I'm thinking of the hidapi-rs func, I guess it doesn't map directly onto the underlying library (it's been a bit since I used hidapi straight)
it calls hid_enumerate underneath
So, it should be doing pretty much the same thing
I was originally doing a different way of enumerating HID devices, but then I stole the hidapi approach because I found it more elegant 😛
I think the lag coming from enumeration is fairly set-up specific. I've never really experienced it myself, but have seen a few different people run into it
I suspect it would depend a lot on your system's USB controllers/chipset, could also depend on the devices you have and how quickly they turnaround from string requests
There are a lot of string requests
So, might be good to just not enumerate the devices as often as every 500ms?
I don't really get why it requests so many strings when they're the same ones that the OS already got when the device connected
500ms is quite a bit faster than it needs to be, but if polling can be eliminated, that's the real winner 😎
It is possible that hidapi has overhead because it tries to populate all information when constructing the "hid_device" struct
things like product name and serial number I only lazily fetch on-demand
but I also don't see any input lag when spamming those requests
I'm going to check if the lag happens on my M2 Mac Mini; if it doesn't happen that means I get to work in peace (after seeing if I can help resolve or test anything with what's being discussed right now) and if it does happen that means the hardware setup should be mostly easily reproducible
I would really like to know if you experience these lag issues with my evil C++ code, because I only scan devices until I find any analogue keyboard, then I just poll it for reports until its disconnected.
So, in theory, if device scanning is the issue...
damn, a single AV vendor is foiling my plans for world domination
Ah yeah, Bkav Pro detects literally every single C++ thingy lol
It even detects our fork of Lua
We've been trying to get their detections sorted
No response from them yet tho 
Did a small bit of research and apparently bkav pro false positives aren't uncommon
Okay so your plugin detects my device
but other than that it does not work
Oh?
I'll try seeing if calling read_analog instead of read_full_buffer does anything
oh actually the whole godot editor doesn't respond now
oh it just returned
weird
Btw., you wouldn't know if it detected your keyboard or not
it just provides a dummy to the SDK
because I'm lazy
If you don't mind, here's a standalone analogue keyboard visualisation that would say if it detected your keyboard or not.
I just got this helpful error I wrote a while ago
uhhh no I'mma pass
LOL
We love heuristics
Here's the same EXE but in a debug configuration; now it has only 1 detection again 🙂
It is basically just this: https://github.com/calamity-inc/Soup/blob/senpai/CLI/cli_keyboard.cpp
I mean if I were to assume that 10 detections one was malware and this is that same thing but in the form of a debug build
It just has a hash that hasn't been seen before meaning it might as well be malware
Well, neither hash has ever been seen before
It's just AI heuristics rolling the dice
😄
idk bitdefender says it's gibon
I've submitted a false-positive report with bitdefender
Usually I don't bother, this is software we deploy to 100k+ users 😄
AV industry definitely not being a joke 😄
Anyway, yeah, it is weird if the program would work but not the plugin
(I swapped it out because I was planning on using stock again)
Alright, cool
still works with your plugin
The soup.exe is standalone and does not rely on the Wooting Analog SDK at all
It polls your HID devices directly
Without mouse input lag?
Haven't noticed any so far no

I am going to compile this
If it was the device enumeration, this should lag your mouse a lot
Yep I was able to gather that idea from the code
given what I saw in wireshark
YEP
Mouse is literally unusable
can't move it at all
Cool, so what Wooting needs now is a custom fork of hidapi that doesn't poll the product name and SN of every device every 500ms haha
Not so useless that I reinvent every wheel after all 
@placid ledge apologies for the ping but I think we found something here
Something you might want to know
Unrelated but did you manage to get my plugin working or that still doesn't work with your app? 
Also, the relevant code that was causing the lag:
A workaround might be to call hid_enumerate using only the Wooting Vendor IDs
because then hidapi won't try to initialise the hid_device for anything that doesn't match
still completely nonfunctional
Welp, that's strange
Your device doesn't happen to be the Wooting UwU, does it? xD
That's the only one the 0.1.0 version doesn't support
Nah it's a Two HE ARM
Welp, maybe if you ever publish your app, I can see if it works for me
I was thinking of doing that when my to-do list for it is done but I guess I can do it now
I should clean up a bit first though
or maybe I should ask if it works for you with the "Woot-verlay"?
because that did work for me, although not brilliantly, still need to make slight improvements
Works with woot-verlay
It could be because I am using wooting-analog-wrapper?
idk, tbh. in theory it should "just work"
yeah
Note that you should really use cargo and that I don't think you'll be able to rustc your way out of this one
I don't write any Rust code?
thing is though, to run my project you currently have to build it yourself
unless I give you a build
in which case I might as well provide a whole godot project
uhh good luck then?
I shall try using the wooting-analog-wrapper cargo crate
Sure.
FWIW, I have used cargo for a few rust test projects in the meanwhile
although all of those were dreadful

it's not on crates.io. get it from the wooting analog repo by adding ```toml
wooting-analog-wrapper = { git = "https://github.com/WootingKb/wooting-analog-sdk", branch = "develop" }
this is really unconventional and I don't like it either
Looks like something didn't go so well
I just copy-pasted this: https://github.com/WootingKb/wooting-analog-sdk/blob/develop/wooting-analog-wrapper/src/bin/main.rs
I mean I don't think you're supposed to do that but it seems like that isn't the issue here
That's odd, this looks like an address
Well, it's definitely Rust code doing this 
Doesn't seem like it provides a backtrace for this bogus memory allocation either
there's a command line argument you use if you want a backtrace usually
I did set the RUST_BACKTRACE environment variable to "on"
tell me how you're so sure
I basically removed all the code in my DLL and it still crashed
but does it crash when it is working with the official wooting plugin
are you saying it crashes or not
It doesn't
How about running in a debugger, do you see where it's failing then?
Lovely
nevermind attached to wrong program lol
Yeah, it is entirely in the Rust code here
I don't have a PDB for this, so I don't know what's exactly happening
If only you could build it yourself 
(I have a pdb)
(you could get one too if you build it)
Well, I think it's an SDK issue, I raised it here: https://github.com/WootingKb/wooting-analog-sdk/issues/59
But if I don't use get_connected_devices_info, my plugin seems to work fine with wooting-analog-wrapper. ¯_(ツ)_/¯
Except I don't use get_connected_devices_info at all
I did write bindings for it, it's just dead code rn
not being used
Hmm, well, then it also works fine for me using this barebones driver for wooting-analog-wrapper
I found the ETA but it's late, someone should probably change that on the website. it's a week later and stable still doesn't support the UwU
Is this all you need for udev rules now? you don't need all the gamepad and xinput stuff for xboxdrv anymore? https://help.wooting.io/en/article/wootility-configuring-device-access-for-wootility-under-linux-udev-rules-r6lb2o
This one still says all that stuff but it's not linked anywhere, I had to search for it, and it doesn't have newer devices. https://help.wooting.io/en/article/guide-configuring-xinput-support-for-linux-69m32u
Oh I see, it was put into the linux kernel https://github.com/torvalds/linux/blob/master/drivers/input/joystick/xpad.c#L364-L369
someone should put the tkl on there before it releases so there's a chance it's in the kernel steamos uses by the time it comes out
hmm 3 buttons, I guess it'll work
just less keys
i suspect people would need to submit another patch to the kernel though so it can use the new devices
sad we cant list the entire vendor id
pre-list the next 10 devices unnamed 🤔
updating the aur packages now
https://aur.archlinux.org/packages/wootility-lekker-beta-appimage
I'll update stable when it releases
I had to do that udev rule stuff for my Wooting Two HE
the udev rules are still necessary yes but not special xbox setup anymore
anyone with a uwu rgb willing to test Artemis / RGB.NET? should work as long as you have a dotnet runtime working, windows or linux is fine
macos?
technically no explicit reason it shouldnt work but i've never tested it
even less so on ARM
well last i tried it crashed immediately
did you test artemis or the console test app
artemis
test app would be a good start to see how dotnet handles dllimports on arm
do you have a dotnet dev env setup or should i make a binary?
based off this https://github.com/diogotr7/RGB.NET/tree/sandbox
i have no dotnet setup on mac
i have no idea if any of those will work but there you go
these are published as self contained so shouldnt need runtime installed or anything
never used rgbnet directly
thats just a console app that should render a rainbow moving left to right on all devices it finds
ive tested it pretty extensively on two he + one + 60he
yes
any diff with the x64 one?
yeah that one does this
that's something
i assume with this running as x64 you need the sdk binaries to be x64 as well? are the binaries in mac releases x64 or arm?
our rgb sdk? x64
i added some extra logging to this one but apart from that i have no idea whats wrong
gotta look into making a mac vm or something lol
wait but the rgb sdk doesnt support the uwu yet
theres a branch
i asked simon and he told me it should work fine
but yeah not that dll/dylib
might be some sort of permission thing
i just got a macos vm setup on my unraid box so ill try to fix things
the error code 0 is the most stupid part, no info whatsoever
Silly question, but in this Razer press release from 2019, Wooting is mentioned as one of the brands that apparently supports Razer Chroma RGB, yet my Wooting keyboard doesn't show up in Razer Synapse/Chroma. 
if you install wootility it has an integration
it's pretty shitty though, use mine :)
What's yours?
https://github.com/diogotr7/RazerSdkReader
or use artemis which uses this library
that repo has a tray app that targets wooting keyboards specifically with razer chroma games
Well, that is sorta what I am trying to achieve, yeah
chroma connect is a joke
it is
I was gonna replace the RzChromaSDK64.dll and just redirect the API calls
but also I was not trying to get banned from some games :^)
we used to do that back in the day
for aurora
i have dlls that do this and write the colors to a pipe
but it's not worth using because bans and also some (most) games sigcheck the dll before loading it
the solution is that USB should finally add RGB into their standard so windows and other OSs can make a standard way to interact with RGB devices
LampArray is basically this as far as i understand it
I will try installing the Wootility first, but your project looks good as well
it's limited to 5 colors
imma switch to win and then i can try artemis on uwus
the razer one. your keyboard is split into 5 zones
got an artemis build artifact for uwu support?
Patiently waiting for my UwU to arive >.<
no, you'll have to shuffle dlls around for now sadly :p
Woaw, hello there
yeah thats the one
as mentioned keep in mind 5 zones only
wdym 5 zones only?
its not individual keys
it gets your keyboard, spits it into 5 zones horizontally, and colors each of those
just 5 blobs of color basically
thats why razer chroma for third party keyboards is a joke
it's equivalent to that "chromalink' window on the right
?!
with mine you get the rest like the keyboard on top
Welp, I'm getting colour at least now!
Will see about the granularity
Yeah okay this is horrible
i can probably clean up the wooting tray app and make an installer etc if you think people care about it
exactly why i said its a joke
its razers poor attempt at seeming nice and inclusive
I don't think they do, I just noticed the RGB while trying the Razer Huntsman V2 Analog for a few days
and I decided I want it on the wooting keyboard now as well
I'm gonna plug it in again and compare the RGB effects 
ah thats great
yeah i know it was the first one i found lol
prob also one of the last ones that work on non arm
hackintosh will have a hard time soonish when intel support drops from macos
Why is it so bad with the official integration
because razer
also hope you have success in actually running the macos vm as some pc setups just make the vm freeze
i was gonna put this in the artemis discord but you left 
So, how do I use your thing dio, do I have to build it myself in VS?
oh yeah i stopped using artemis long long ago
if you have a dev env setup yeah that's the easiest
actually ill make a CI script for it
Why did you not write this in C++ tho >.<
because i hate c++
what kb?
Two HE
gg artemis crashes with woot plugin
can you please check event viewer
CoreCLR Version: 7.0.1123.42427
.NET Version: 7.0.11
Description: The process was terminated due to an unhandled exception.
Exception Info: System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
Stack:
at WootingAnalogSDKNET.WootingAnalogSDK.initialise()
at WootingAnalogSDKNET.WootingAnalogSDK.initialise()
at WootingAnalogSDKNET.WootingAnalogSDK.Initialise()
at Artemis.Plugins.Devices.Wooting.Services.AnalogService.WootingAnalogService.Activate()
at Artemis.Plugins.Devices.Wooting.Services.ReusableService.ActivateInternal()
at Artemis.Plugins.Devices.Wooting.Services.ReusableService.RegisterUse()
at Artemis.Plugins.Devices.Wooting.Modules.WootingAnalogModule.Enable()
at Artemis.Core.PluginFeature.InternalEnable()
at Artemis.Core.Modules.Module.InternalEnable()
at Artemis.Core.Modules.Module`1[[System.__Canon, System.Private.CoreLib, Version=7.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].InternalEnable()
at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(System.Threading.Thread, System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object)
at System.Threading.Tasks.Task.ExecuteWithThreadLocal(System.Threading.Tasks.Task ByRef, System.Threading.Thread)
at System.Threading.ThreadPoolWorkQueue.Dispatch()
at System.Threading.PortableThreadPool+WorkerThread.WorkerThreadStart()
i replaced the plugin again to be sure still crashing
odd, do you have the analog sdk installed? maybe it crashes if not installed. i recently changed that lol
yes even updated
i can confirm that the analog features work in artemis with sdk version 0.7.2
odd then
yeah working fine with both kbs
updated analog wrapper now it doesnt close but shows a fail
analog wrapper?
---> Artemis.Core.ArtemisPluginException: Failed to initialise WootingAnalog SDK: Failure
at Artemis.Plugins.Devices.Wooting.Services.AnalogService.WootingAnalogService.Activate() in D:\Source\Artemis\Artemis.Plugins\src\Devices\Artemis.Plugins.Devices.Wooting\Services\AnalogService\WootingAnalogService.cs:line 80
at Artemis.Plugins.Devices.Wooting.Services.ReusableService.ActivateInternal() in D:\Source\Artemis\Artemis.Plugins\src\Devices\Artemis.Plugins.Devices.Wooting\Services\ReusableService.cs:line 40
at Artemis.Plugins.Devices.Wooting.Services.ReusableService.RegisterUse() in D:\Source\Artemis\Artemis.Plugins\src\Devices\Artemis.Plugins.Devices.Wooting\Services\ReusableService.cs:line 17
at Artemis.Plugins.Devices.Wooting.Modules.WootingAnalogModule.Enable() in D:\Source\Artemis\Artemis.Plugins\src\Devices\Artemis.Plugins.Devices.Wooting\Modules\WootingAnalogModule.cs:line 24
at Artemis.Core.PluginFeature.InternalEnable() in D:\a\Artemis\Artemis\Artemis\src\Artemis.Core\Plugins\PluginFeature.cs:line 178
at Artemis.Core.Modules.Module.InternalEnable() in D:\a\Artemis\Artemis\Artemis\src\Artemis.Core\Plugins\Modules\Module.cs:line 317
at Artemis.Core.Modules.Module`1.InternalEnable() in D:\a\Artemis\Artemis\Artemis\src\Artemis.Core\Plugins\Modules\Module.cs:line 85
at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread threadPoolThread, ExecutionContext executionContext, ContextCallback callback, Object state)
--- End of stack trace from previous location ---
at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread threadPoolThread, ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot, Thread threadPoolThread)
--- End of inner exception stack trace ---
at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)
at System.Threading.Tasks.Task.Wait(TimeSpan timeout, CancellationToken cancellationToken)
at System.Threading.Tasks.Task.Wait(TimeSpan timeout)
at Artemis.Core.PluginFeature.SetEnabled(Boolean enable, Boolean isAutoEnable) in D:\a\Artemis\Artemis\Artemis\src\Artemis.Core\Plugins\PluginFeature.cs:line 151
at Artemis.Core.Services.PluginManagementService.EnablePluginFeature(PluginFeature pluginFeature, Boolean saveState, Boolean isAutoEnable) in D:\a\Artemis\Artemis\Artemis\src\Artemis.Core\Services\PluginManagementService.cs:line 701
at Artemis.Core.Services.PluginManagementService.EnablePlugin(Plugin plugin, Boolean saveState, Boolean ignorePluginLock) in D:\a\Artemis\Artemis\Artemis\src\Artemis.Core\Services\PluginManagementService.cs:line 516
at Artemis.UI.Screens.Plugins.PluginViewModel.<UpdateEnabled>b__53_4() in D:\a\Artemis\Artemis\Artemis\src\Artemis.UI\Screens\Plugins\PluginViewModel.cs:line 162
at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread threadPoolThread, ExecutionContext executionContext, ContextCallback callback, Object state)
--- End of stack trace from previous location ---
at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread threadPoolThread, ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot, Thread threadPoolThread)
--- End of stack trace from previous location ---
at Artemis.UI.Screens.Plugins.PluginViewModel.UpdateEnabled(Boolean enable) in D:\a\Artemis\Artemis\Artemis\src\Artemis.UI\Screens\Plugins\PluginViewModel.cs:line 162```
now i get this
yeah that's prob fine
gimme a minute
or build the rgb sdk binary yourself if you have it handy
i dont think i have a c build env setup on windows
---> System.MissingMethodException: Method not found: 'Void Artemis.Core.Services.IDeviceService.AddDeviceProvider(Artemis.Core.DeviceProviders.DeviceProvider)'.
at Artemis.Plugins.Devices.Wooting.WootingDeviceProvider.Enable()
at Artemis.Core.PluginFeature.InternalEnable() in D:\a\Artemis\Artemis\Artemis\src\Artemis.Core\Plugins\PluginFeature.cs:line 178
at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread threadPoolThread, ExecutionContext executionContext, ContextCallback callback, Object state)
--- End of stack trace from previous location ---
at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread threadPoolThread, ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot, Thread threadPoolThread)
--- End of inner exception stack trace ---
at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)
at System.Threading.Tasks.Task.Wait(TimeSpan timeout, CancellationToken cancellationToken)
at System.Threading.Tasks.Task.Wait(TimeSpan timeout)
at Artemis.Core.PluginFeature.SetEnabled(Boolean enable, Boolean isAutoEnable) in D:\a\Artemis\Artemis\Artemis\src\Artemis.Core\Plugins\PluginFeature.cs:line 151
at Artemis.Core.Services.PluginManagementService.EnablePluginFeature(PluginFeature pluginFeature, Boolean saveState, Boolean isAutoEnable) in D:\a\Artemis\Artemis\Artemis\src\Artemis.Core\Services\PluginManagementService.cs:line 701
at Artemis.UI.Screens.Plugins.Features.PluginFeatureViewModel.<UpdateEnabled>b__47_0() in D:\a\Artemis\Artemis\Artemis\src\Artemis.UI\Screens\Plugins\Features\PluginFeatureViewModel.cs:line 207
at Avalonia.Threading.DispatcherOperation.InvokeCore()
--- End of stack trace from previous location ---
at Artemis.UI.Screens.Plugins.Features.PluginFeatureViewModel.UpdateEnabled(Boolean enable) in D:\a\Artemis\Artemis\Artemis\src\Artemis.UI\Screens\Plugins\Features\PluginFeatureViewModel.cs:line 207```
thats the device provider

