Open nenominal opened 3 years ago
Hi @nenominal, thank you for your feature request!
I currently do not have access to a ROCCAT Kain 200/202
wireless mouse, so I am unable to reverse the protocol at this time. I will consider adding support for querying battery levels as soon as I get hold of such a device.
Do you see the battery levels when using upower
?
$ upower --dump
Hi,
unfortunately there is no output regarding battery using upower.
upower -d
Device: /org/freedesktop/UPower/devices/DisplayDevice
power supply: no
updated: Mi 01 sep 2021 14:18:47 +0300 (-10299 seconds ago)
has history: no
has statistics: no
unknown
warning-level: none
icon-name: 'battery-missing-symbolic'
Daemon:
daemon-version: 0.99.11
on-battery: no
lid-is-closed: no
lid-is-present: no
critical-action: HybridSleep
If you need assistance, I can help, unfortunately I'm a sysadmin, not a developer.
@nenominal to add support for the device I need a trace of the packets on the USB bus that initialize the device, set RGB values, query battery levels, etc... Please find more documentation on how to capture such a trace file in the Eruption Wiki.
Hope it helps. Just remove the zip extension from the file name, it's not an archive.
Bellow are the device's details. I captured on all usbports, for some reason wireshark didn't work on only one port but if I selected all of them, it worked.
T: Bus=01 Lev=01 Prnt=01 Port=07 Cnt=03 Dev#= 8 Spd=12 MxCh= 0
D: Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=32 #Cfgs= 1
P: Vendor=1e7d ProdID=2d60 Rev=02.66
S: Manufacturer=ROCCAT
S: Product=ROCCAT Kain 200 Aimo Dongle
C: #Ifs= 3 Cfg#= 1 Atr=a0 MxPwr=100mA
I: If#=0x0 Alt= 0 #EPs= 1 Cls=03(HID ) Sub=01 Prot=01 Driver=usbhid
I: If#=0x1 Alt= 0 #EPs= 1 Cls=03(HID ) Sub=01 Prot=02 Driver=usbhid
I: If#=0x2 Alt= 0 #EPs= 1 Cls=03(HID ) Sub=00 Prot=00 Driver=usbhid
@nenominal Thank you for providing the capture file!
It seems that this capture file does not contain the full device initialization sequence. By glancing over the data, I can only see RGB values (?) being set. Please be sure to capture the USB traffic while hotplugging the device, so that ROCCAT Swarm performs the full device initialization.
I captured as much as I can, see bellow new file. Just remove .zip extension Hope it helps.
@nenominal Thanks again for providing the capture file!
I am still unable to locate the device init sequence. Would it be possible to capture the packets that ROCCAT Swarm generates while performing a reset to factory settings? I suspect that this will reset the embedded controller and trigger a full device initialization.
It includes 2 factory resets and different settings applied in swarm.
@nenominal Thanks for providing the files! Seems like the device uses a totally redesigned protocol. Will take me a while to reverse this. I am working on it...
Hi @nenominal, I have implemented a driver with a basic set of features for the ROCCAT Kain 200/202
series wireless mice.
The master
branch contains all necessary commits to enable support for RGB lighting and device status queries.
Eruption 0.1.23
will ship with a newly introduced companion utility called eruption-hwutil
that can be used to get or set device configuration parameters and query the device status without the Eruption daemon required to be running.
To show the device status please run the following commands:
$ sudo eruption-hwutil list
$ sudo eruption-hwutil -r status <index of Kain 200 mouse>
It currently supports reading the signal strength, and maybe battery levels.
It would be nice if you could give this a try!
Wow, thanks man :) I'll give it a try tomorrow and you'll have my feed-back.
I failed to build the master build, bellow the errors I got:
cargo build --all --release
Compiling evdev-sys v0.2.3
Compiling mlua v0.6.2
Compiling num_cpus v1.13.0
Compiling atty v0.2.14
Compiling thread-id v4.0.0
Compiling signal-hook-registry v1.4.0
Compiling getrandom v0.2.3
Compiling getrandom v0.1.16
Compiling iovec v0.1.4
Compiling net2 v0.2.37
Compiling inotify-sys v0.1.5
Compiling filetime v0.2.15
Compiling time v0.1.43
Compiling gethostname v0.2.1
Compiling memoffset v0.6.4
Compiling miniz_oxide v0.4.4
Compiling indexmap v1.7.0
Compiling libudev-sys v0.1.4
Compiling libdbus-sys v0.2.1
Compiling aho-corasick v0.7.18
Compiling object v0.26.2
Compiling nix v0.16.1
Compiling libpulse-simple-sys v1.19.1
Compiling bstr v0.2.16
Compiling x11 v2.18.2
Compiling futures-channel v0.3.17
Compiling tracing-log v0.1.2
Compiling mio v0.7.13
Compiling paste-impl v0.1.18
Compiling hidapi v1.2.6 (https://github.com/ruabmbua/hidapi-rs.git?branch=master#7faa5744)
Compiling lockfile v0.3.0
Compiling crossbeam-channel v0.5.1
Compiling crossbeam-queue v0.3.2
Compiling error-chain v0.12.4
Compiling procmon-sys v0.0.2 (/home/zulu/eruption/eruption-process-monitor/src/procmon-sys)
Compiling lexical-core v0.7.6
Compiling semver v0.11.0
Compiling syn v1.0.76
Compiling proc-macro-error-attr v1.0.4
Compiling png v0.16.8
Compiling bitvec v0.22.3
Compiling find-crate v0.6.3
Compiling procinfo v0.4.2
Compiling num-integer v0.1.44
Compiling num-traits v0.1.43
Compiling approx v0.5.0
Compiling num-complex v0.4.0
Compiling colored v2.0.0
Compiling inotify v0.7.1
Compiling eruption v0.1.23 (/home/zulu/eruption/eruption)
Compiling rand_core v0.6.3
Compiling rand_core v0.5.1
Compiling crossbeam-epoch v0.9.5
Compiling nix v0.22.1
Compiling mio v0.6.23
Compiling libudev v0.2.0
Compiling udev v0.6.2
Compiling petgraph v0.5.1
Compiling regex v1.5.4
Compiling paste v0.1.18
Compiling syslog v5.0.0
Compiling rustc_version v0.3.3
Compiling backtrace v0.3.61
Compiling chrono v0.4.19
Compiling num-rational v0.3.2
Compiling num-iter v0.1.42
Compiling transpose v0.2.1
Compiling num-rational v0.4.0
Compiling primal-check v0.3.1
Compiling nom v5.1.2
Compiling evdev-rs v0.5.0
Compiling rand_chacha v0.3.1
Compiling simba v0.6.0
Compiling rand_chacha v0.2.2
Compiling rand_xorshift v0.2.0
Compiling crossbeam-deque v0.8.1
Compiling serialport v4.0.1
Compiling mio-extras v2.0.6
Compiling simdeez v1.0.7
Compiling env_logger v0.7.1
Compiling serde-hjson v0.9.1
Compiling rand_pcg v0.2.1
Compiling parking_lot_core v0.8.5
Compiling icecream v0.1.0
Compiling field-offset v0.3.4
Compiling proc-macro-error v1.0.4
Compiling rustfft v6.0.1
Compiling ctrlc v3.2.0
Compiling x11rb v0.9.0
Compiling rand v0.8.4
Compiling rand v0.7.3
Compiling rayon-core v1.9.1
Compiling crossbeam v0.8.1
Compiling notify v4.0.17
Compiling pretty_env_logger v0.4.0
Compiling thiserror-impl v1.0.29
Compiling strum_macros v0.21.1
Compiling serde_derive v1.0.130
Compiling futures-macro v0.3.17
Compiling tracing-attributes v0.1.16
Compiling tokio-macros v1.3.0
Compiling num-derive v0.3.3
Compiling palette_derive v0.6.0
Compiling pin-project-internal v1.0.8
Compiling nalgebra-macros v0.1.0
Compiling dyn-clonable-impl v0.9.0
Compiling async-trait v0.1.51
Compiling simdnoise v3.1.6
Compiling parking_lot v0.11.2
Compiling clap_derive v3.0.0-beta.4
Compiling rayon v1.5.1
Compiling hotwatch v0.4.5
Compiling phf_generator v0.8.0
Compiling thiserror v1.0.29
Compiling futures-util v0.3.17
Compiling dyn-clonable v0.9.0
Compiling nalgebra v0.29.0
Compiling tracing v0.1.27
Compiling libpulse-sys v1.19.2
Compiling tokio v1.11.0
Compiling phf_generator v0.9.1
Compiling pin-project v1.0.8
Compiling phf_macros v0.8.0
Compiling system-deps v3.2.0
Compiling proc-macro-crate v1.0.0
Compiling serde v1.0.130
Compiling libpulse-binding v2.25.0
Compiling phf_macros v0.9.0
Compiling tracing-futures v0.2.5
Compiling jpeg-decoder v0.1.22
Compiling clap v3.0.0-beta.4
error[E0658]: arbitrary expressions in key-value attributes are unstable
--> /home/zulu/.cargo/registry/src/github.com-1ecc6299db9ec823/clap-3.0.0-beta.4/src/lib.rs:8:10
|
8 | #![doc = include_str!("../README.md")]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: see issue #78835 <https://github.com/rust-lang/rust/issues/78835> for more information
Compiling sysinfo v0.20.3
error[E0710]: an unknown tool name found in scoped lint: `rustdoc::broken_intra_doc_links`
--> /home/zulu/.cargo/registry/src/github.com-1ecc6299db9ec823/sysinfo-0.20.3/src/lib.rs:13:9
|
13 | #![deny(rustdoc::broken_intra_doc_links)]
| ^^^^^^^
error[E0658]: arbitrary expressions in key-value attributes are unstable
--> /home/zulu/.cargo/registry/src/github.com-1ecc6299db9ec823/sysinfo-0.20.3/src/lib.rs:10:10
|
10 | #![doc = include_str!("../README.md")]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: see issue #78835 <https://github.com/rust-lang/rust/issues/78835> for more information
error[E0658]: arbitrary expressions in key-value attributes are unstable
--> /home/zulu/.cargo/registry/src/github.com-1ecc6299db9ec823/sysinfo-0.20.3/src/common.rs:41:17
|
41 | #[doc = concat!("Returns the value of the \"", stringify!($name), "\" refresh kind.
| _________________^
42 | |
43 | | ```
44 | | use sysinfo::RefreshKind;
... |
53 | | assert_eq!(r.", stringify!($name), "(), false);
54 | | ```")]
| |_____^
...
178 | impl_get_set!(networks, with_networks, without_networks);
| --------------------------------------------------------- in this macro invocation
|
= note: see issue #78835 <https://github.com/rust-lang/rust/issues/78835> for more information
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0658]: arbitrary expressions in key-value attributes are unstable
--> /home/zulu/.cargo/registry/src/github.com-1ecc6299db9ec823/sysinfo-0.20.3/src/common.rs:59:17
|
59 | #[doc = concat!("Sets the value of the \"", stringify!($name), "\" refresh kind to `true`.
| _________________^
60 | |
61 | | ```
62 | | use sysinfo::RefreshKind;
... |
68 | | assert_eq!(r.", stringify!($name), "(), true);
69 | | ```")]
| |_____^
...
178 | impl_get_set!(networks, with_networks, without_networks);
| --------------------------------------------------------- in this macro invocation
|
= note: see issue #78835 <https://github.com/rust-lang/rust/issues/78835> for more information
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0658]: arbitrary expressions in key-value attributes are unstable
--> /home/zulu/.cargo/registry/src/github.com-1ecc6299db9ec823/sysinfo-0.20.3/src/common.rs:75:17
|
75 | #[doc = concat!("Sets the value of the \"", stringify!($name), "\" refresh kind to `false`.
| _________________^
76 | |
77 | | ```
78 | | use sysinfo::RefreshKind;
... |
84 | | assert_eq!(r.", stringify!($name), "(), false);
85 | | ```")]
| |_____^
...
178 | impl_get_set!(networks, with_networks, without_networks);
| --------------------------------------------------------- in this macro invocation
|
= note: see issue #78835 <https://github.com/rust-lang/rust/issues/78835> for more information
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0658]: arbitrary expressions in key-value attributes are unstable
--> /home/zulu/.cargo/registry/src/github.com-1ecc6299db9ec823/sysinfo-0.20.3/src/common.rs:41:17
|
41 | #[doc = concat!("Returns the value of the \"", stringify!($name), "\" refresh kind.
| _________________^
42 | |
43 | | ```
44 | | use sysinfo::RefreshKind;
... |
53 | | assert_eq!(r.", stringify!($name), "(), false);
54 | | ```")]
| |_____^
...
179 | impl_get_set!(networks_list, with_networks_list, without_networks_list);
| ------------------------------------------------------------------------ in this macro invocation
|
= note: see issue #78835 <https://github.com/rust-lang/rust/issues/78835> for more information
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0658]: arbitrary expressions in key-value attributes are unstable
--> /home/zulu/.cargo/registry/src/github.com-1ecc6299db9ec823/sysinfo-0.20.3/src/common.rs:59:17
|
59 | #[doc = concat!("Sets the value of the \"", stringify!($name), "\" refresh kind to `true`.
| _________________^
60 | |
61 | | ```
62 | | use sysinfo::RefreshKind;
... |
68 | | assert_eq!(r.", stringify!($name), "(), true);
69 | | ```")]
| |_____^
...
179 | impl_get_set!(networks_list, with_networks_list, without_networks_list);
| ------------------------------------------------------------------------ in this macro invocation
|
= note: see issue #78835 <https://github.com/rust-lang/rust/issues/78835> for more information
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0658]: arbitrary expressions in key-value attributes are unstable
--> /home/zulu/.cargo/registry/src/github.com-1ecc6299db9ec823/sysinfo-0.20.3/src/common.rs:75:17
|
75 | #[doc = concat!("Sets the value of the \"", stringify!($name), "\" refresh kind to `false`.
| _________________^
76 | |
77 | | ```
78 | | use sysinfo::RefreshKind;
... |
84 | | assert_eq!(r.", stringify!($name), "(), false);
85 | | ```")]
| |_____^
...
179 | impl_get_set!(networks_list, with_networks_list, without_networks_list);
| ------------------------------------------------------------------------ in this macro invocation
|
= note: see issue #78835 <https://github.com/rust-lang/rust/issues/78835> for more information
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0658]: arbitrary expressions in key-value attributes are unstable
--> /home/zulu/.cargo/registry/src/github.com-1ecc6299db9ec823/sysinfo-0.20.3/src/common.rs:41:17
|
41 | #[doc = concat!("Returns the value of the \"", stringify!($name), "\" refresh kind.
| _________________^
42 | |
43 | | ```
44 | | use sysinfo::RefreshKind;
... |
53 | | assert_eq!(r.", stringify!($name), "(), false);
54 | | ```")]
| |_____^
...
180 | impl_get_set!(processes, with_processes, without_processes);
| ------------------------------------------------------------ in this macro invocation
|
= note: see issue #78835 <https://github.com/rust-lang/rust/issues/78835> for more information
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0658]: arbitrary expressions in key-value attributes are unstable
--> /home/zulu/.cargo/registry/src/github.com-1ecc6299db9ec823/sysinfo-0.20.3/src/common.rs:59:17
|
59 | #[doc = concat!("Sets the value of the \"", stringify!($name), "\" refresh kind to `true`.
| _________________^
60 | |
61 | | ```
62 | | use sysinfo::RefreshKind;
... |
68 | | assert_eq!(r.", stringify!($name), "(), true);
69 | | ```")]
| |_____^
...
180 | impl_get_set!(processes, with_processes, without_processes);
| ------------------------------------------------------------ in this macro invocation
|
= note: see issue #78835 <https://github.com/rust-lang/rust/issues/78835> for more information
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0658]: arbitrary expressions in key-value attributes are unstable
--> /home/zulu/.cargo/registry/src/github.com-1ecc6299db9ec823/sysinfo-0.20.3/src/common.rs:75:17
|
75 | #[doc = concat!("Sets the value of the \"", stringify!($name), "\" refresh kind to `false`.
| _________________^
76 | |
77 | | ```
78 | | use sysinfo::RefreshKind;
... |
84 | | assert_eq!(r.", stringify!($name), "(), false);
85 | | ```")]
| |_____^
...
180 | impl_get_set!(processes, with_processes, without_processes);
| ------------------------------------------------------------ in this macro invocation
|
= note: see issue #78835 <https://github.com/rust-lang/rust/issues/78835> for more information
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0658]: arbitrary expressions in key-value attributes are unstable
--> /home/zulu/.cargo/registry/src/github.com-1ecc6299db9ec823/sysinfo-0.20.3/src/common.rs:41:17
|
41 | #[doc = concat!("Returns the value of the \"", stringify!($name), "\" refresh kind.
| _________________^
42 | |
43 | | ```
44 | | use sysinfo::RefreshKind;
... |
53 | | assert_eq!(r.", stringify!($name), "(), false);
54 | | ```")]
| |_____^
...
181 | impl_get_set!(disks, with_disks, without_disks);
| ------------------------------------------------ in this macro invocation
|
= note: see issue #78835 <https://github.com/rust-lang/rust/issues/78835> for more information
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0658]: arbitrary expressions in key-value attributes are unstable
--> /home/zulu/.cargo/registry/src/github.com-1ecc6299db9ec823/sysinfo-0.20.3/src/common.rs:59:17
|
59 | #[doc = concat!("Sets the value of the \"", stringify!($name), "\" refresh kind to `true`.
| _________________^
60 | |
61 | | ```
62 | | use sysinfo::RefreshKind;
... |
68 | | assert_eq!(r.", stringify!($name), "(), true);
69 | | ```")]
| |_____^
...
181 | impl_get_set!(disks, with_disks, without_disks);
| ------------------------------------------------ in this macro invocation
|
= note: see issue #78835 <https://github.com/rust-lang/rust/issues/78835> for more information
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0658]: arbitrary expressions in key-value attributes are unstable
--> /home/zulu/.cargo/registry/src/github.com-1ecc6299db9ec823/sysinfo-0.20.3/src/common.rs:75:17
|
75 | #[doc = concat!("Sets the value of the \"", stringify!($name), "\" refresh kind to `false`.
| _________________^
76 | |
77 | | ```
78 | | use sysinfo::RefreshKind;
... |
84 | | assert_eq!(r.", stringify!($name), "(), false);
85 | | ```")]
| |_____^
...
181 | impl_get_set!(disks, with_disks, without_disks);
| ------------------------------------------------ in this macro invocation
|
= note: see issue #78835 <https://github.com/rust-lang/rust/issues/78835> for more information
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0658]: arbitrary expressions in key-value attributes are unstable
--> /home/zulu/.cargo/registry/src/github.com-1ecc6299db9ec823/sysinfo-0.20.3/src/common.rs:41:17
|
41 | #[doc = concat!("Returns the value of the \"", stringify!($name), "\" refresh kind.
| _________________^
42 | |
43 | | ```
44 | | use sysinfo::RefreshKind;
... |
53 | | assert_eq!(r.", stringify!($name), "(), false);
54 | | ```")]
| |_____^
...
182 | impl_get_set!(disks_list, with_disks_list, without_disks_list);
| --------------------------------------------------------------- in this macro invocation
|
= note: see issue #78835 <https://github.com/rust-lang/rust/issues/78835> for more information
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0658]: arbitrary expressions in key-value attributes are unstable
--> /home/zulu/.cargo/registry/src/github.com-1ecc6299db9ec823/sysinfo-0.20.3/src/common.rs:59:17
|
59 | #[doc = concat!("Sets the value of the \"", stringify!($name), "\" refresh kind to `true`.
| _________________^
60 | |
61 | | ```
62 | | use sysinfo::RefreshKind;
... |
68 | | assert_eq!(r.", stringify!($name), "(), true);
69 | | ```")]
| |_____^
...
182 | impl_get_set!(disks_list, with_disks_list, without_disks_list);
| --------------------------------------------------------------- in this macro invocation
|
= note: see issue #78835 <https://github.com/rust-lang/rust/issues/78835> for more information
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0658]: arbitrary expressions in key-value attributes are unstable
--> /home/zulu/.cargo/registry/src/github.com-1ecc6299db9ec823/sysinfo-0.20.3/src/common.rs:75:17
|
75 | #[doc = concat!("Sets the value of the \"", stringify!($name), "\" refresh kind to `false`.
| _________________^
76 | |
77 | | ```
78 | | use sysinfo::RefreshKind;
... |
84 | | assert_eq!(r.", stringify!($name), "(), false);
85 | | ```")]
| |_____^
...
182 | impl_get_set!(disks_list, with_disks_list, without_disks_list);
| --------------------------------------------------------------- in this macro invocation
|
= note: see issue #78835 <https://github.com/rust-lang/rust/issues/78835> for more information
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0658]: arbitrary expressions in key-value attributes are unstable
--> /home/zulu/.cargo/registry/src/github.com-1ecc6299db9ec823/sysinfo-0.20.3/src/common.rs:41:17
|
41 | #[doc = concat!("Returns the value of the \"", stringify!($name), "\" refresh kind.
| _________________^
42 | |
43 | | ```
44 | | use sysinfo::RefreshKind;
... |
53 | | assert_eq!(r.", stringify!($name), "(), false);
54 | | ```")]
| |_____^
...
183 | impl_get_set!(memory, with_memory, without_memory);
| --------------------------------------------------- in this macro invocation
|
= note: see issue #78835 <https://github.com/rust-lang/rust/issues/78835> for more information
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0658]: arbitrary expressions in key-value attributes are unstable
--> /home/zulu/.cargo/registry/src/github.com-1ecc6299db9ec823/sysinfo-0.20.3/src/common.rs:59:17
|
59 | #[doc = concat!("Sets the value of the \"", stringify!($name), "\" refresh kind to `true`.
| _________________^
60 | |
61 | | ```
62 | | use sysinfo::RefreshKind;
... |
68 | | assert_eq!(r.", stringify!($name), "(), true);
69 | | ```")]
| |_____^
...
183 | impl_get_set!(memory, with_memory, without_memory);
| --------------------------------------------------- in this macro invocation
|
= note: see issue #78835 <https://github.com/rust-lang/rust/issues/78835> for more information
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0658]: arbitrary expressions in key-value attributes are unstable
--> /home/zulu/.cargo/registry/src/github.com-1ecc6299db9ec823/sysinfo-0.20.3/src/common.rs:75:17
|
75 | #[doc = concat!("Sets the value of the \"", stringify!($name), "\" refresh kind to `false`.
| _________________^
76 | |
77 | | ```
78 | | use sysinfo::RefreshKind;
... |
84 | | assert_eq!(r.", stringify!($name), "(), false);
85 | | ```")]
| |_____^
...
183 | impl_get_set!(memory, with_memory, without_memory);
| --------------------------------------------------- in this macro invocation
|
= note: see issue #78835 <https://github.com/rust-lang/rust/issues/78835> for more information
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0658]: arbitrary expressions in key-value attributes are unstable
--> /home/zulu/.cargo/registry/src/github.com-1ecc6299db9ec823/sysinfo-0.20.3/src/common.rs:41:17
|
41 | #[doc = concat!("Returns the value of the \"", stringify!($name), "\" refresh kind.
| _________________^
42 | |
43 | | ```
44 | | use sysinfo::RefreshKind;
... |
53 | | assert_eq!(r.", stringify!($name), "(), false);
54 | | ```")]
| |_____^
...
184 | impl_get_set!(cpu, with_cpu, without_cpu);
| ------------------------------------------ in this macro invocation
|
= note: see issue #78835 <https://github.com/rust-lang/rust/issues/78835> for more information
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0658]: arbitrary expressions in key-value attributes are unstable
--> /home/zulu/.cargo/registry/src/github.com-1ecc6299db9ec823/sysinfo-0.20.3/src/common.rs:59:17
|
59 | #[doc = concat!("Sets the value of the \"", stringify!($name), "\" refresh kind to `true`.
| _________________^
60 | |
61 | | ```
62 | | use sysinfo::RefreshKind;
... |
68 | | assert_eq!(r.", stringify!($name), "(), true);
69 | | ```")]
| |_____^
...
184 | impl_get_set!(cpu, with_cpu, without_cpu);
| ------------------------------------------ in this macro invocation
|
= note: see issue #78835 <https://github.com/rust-lang/rust/issues/78835> for more information
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0658]: arbitrary expressions in key-value attributes are unstable
--> /home/zulu/.cargo/registry/src/github.com-1ecc6299db9ec823/sysinfo-0.20.3/src/common.rs:75:17
|
75 | #[doc = concat!("Sets the value of the \"", stringify!($name), "\" refresh kind to `false`.
| _________________^
76 | |
77 | | ```
78 | | use sysinfo::RefreshKind;
... |
84 | | assert_eq!(r.", stringify!($name), "(), false);
85 | | ```")]
| |_____^
...
184 | impl_get_set!(cpu, with_cpu, without_cpu);
| ------------------------------------------ in this macro invocation
|
= note: see issue #78835 <https://github.com/rust-lang/rust/issues/78835> for more information
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0658]: arbitrary expressions in key-value attributes are unstable
--> /home/zulu/.cargo/registry/src/github.com-1ecc6299db9ec823/sysinfo-0.20.3/src/common.rs:41:17
|
41 | #[doc = concat!("Returns the value of the \"", stringify!($name), "\" refresh kind.
| _________________^
42 | |
43 | | ```
44 | | use sysinfo::RefreshKind;
... |
53 | | assert_eq!(r.", stringify!($name), "(), false);
54 | | ```")]
| |_____^
...
185 | impl_get_set!(components, with_components, without_components);
| --------------------------------------------------------------- in this macro invocation
|
= note: see issue #78835 <https://github.com/rust-lang/rust/issues/78835> for more information
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0658]: arbitrary expressions in key-value attributes are unstable
--> /home/zulu/.cargo/registry/src/github.com-1ecc6299db9ec823/sysinfo-0.20.3/src/common.rs:59:17
|
59 | #[doc = concat!("Sets the value of the \"", stringify!($name), "\" refresh kind to `true`.
| _________________^
60 | |
61 | | ```
62 | | use sysinfo::RefreshKind;
... |
68 | | assert_eq!(r.", stringify!($name), "(), true);
69 | | ```")]
| |_____^
...
185 | impl_get_set!(components, with_components, without_components);
| --------------------------------------------------------------- in this macro invocation
|
= note: see issue #78835 <https://github.com/rust-lang/rust/issues/78835> for more information
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0658]: arbitrary expressions in key-value attributes are unstable
--> /home/zulu/.cargo/registry/src/github.com-1ecc6299db9ec823/sysinfo-0.20.3/src/common.rs:75:17
|
75 | #[doc = concat!("Sets the value of the \"", stringify!($name), "\" refresh kind to `false`.
| _________________^
76 | |
77 | | ```
78 | | use sysinfo::RefreshKind;
... |
84 | | assert_eq!(r.", stringify!($name), "(), false);
85 | | ```")]
| |_____^
...
185 | impl_get_set!(components, with_components, without_components);
| --------------------------------------------------------------- in this macro invocation
|
= note: see issue #78835 <https://github.com/rust-lang/rust/issues/78835> for more information
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0658]: arbitrary expressions in key-value attributes are unstable
--> /home/zulu/.cargo/registry/src/github.com-1ecc6299db9ec823/sysinfo-0.20.3/src/common.rs:41:17
|
41 | #[doc = concat!("Returns the value of the \"", stringify!($name), "\" refresh kind.
| _________________^
42 | |
43 | | ```
44 | | use sysinfo::RefreshKind;
... |
53 | | assert_eq!(r.", stringify!($name), "(), false);
54 | | ```")]
| |_____^
...
186 | / impl_get_set!(
187 | | components_list,
188 | | with_components_list,
189 | | without_components_list
190 | | );
| |______- in this macro invocation
|
= note: see issue #78835 <https://github.com/rust-lang/rust/issues/78835> for more information
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0658]: arbitrary expressions in key-value attributes are unstable
--> /home/zulu/.cargo/registry/src/github.com-1ecc6299db9ec823/sysinfo-0.20.3/src/common.rs:59:17
|
59 | #[doc = concat!("Sets the value of the \"", stringify!($name), "\" refresh kind to `true`.
| _________________^
60 | |
61 | | ```
62 | | use sysinfo::RefreshKind;
... |
68 | | assert_eq!(r.", stringify!($name), "(), true);
69 | | ```")]
| |_____^
...
186 | / impl_get_set!(
187 | | components_list,
188 | | with_components_list,
189 | | without_components_list
190 | | );
| |______- in this macro invocation
|
= note: see issue #78835 <https://github.com/rust-lang/rust/issues/78835> for more information
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0658]: arbitrary expressions in key-value attributes are unstable
--> /home/zulu/.cargo/registry/src/github.com-1ecc6299db9ec823/sysinfo-0.20.3/src/common.rs:75:17
|
75 | #[doc = concat!("Sets the value of the \"", stringify!($name), "\" refresh kind to `false`.
| _________________^
76 | |
77 | | ```
78 | | use sysinfo::RefreshKind;
... |
84 | | assert_eq!(r.", stringify!($name), "(), false);
85 | | ```")]
| |_____^
...
186 | / impl_get_set!(
187 | | components_list,
188 | | with_components_list,
189 | | without_components_list
190 | | );
| |______- in this macro invocation
|
= note: see issue #78835 <https://github.com/rust-lang/rust/issues/78835> for more information
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0658]: arbitrary expressions in key-value attributes are unstable
--> /home/zulu/.cargo/registry/src/github.com-1ecc6299db9ec823/sysinfo-0.20.3/src/common.rs:41:17
|
41 | #[doc = concat!("Returns the value of the \"", stringify!($name), "\" refresh kind.
| _________________^
42 | |
43 | | ```
44 | | use sysinfo::RefreshKind;
... |
53 | | assert_eq!(r.", stringify!($name), "(), false);
54 | | ```")]
| |_____^
...
191 | impl_get_set!(users_list, with_users_list, without_users_list);
| --------------------------------------------------------------- in this macro invocation
|
= note: see issue #78835 <https://github.com/rust-lang/rust/issues/78835> for more information
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0658]: arbitrary expressions in key-value attributes are unstable
--> /home/zulu/.cargo/registry/src/github.com-1ecc6299db9ec823/sysinfo-0.20.3/src/common.rs:59:17
|
59 | #[doc = concat!("Sets the value of the \"", stringify!($name), "\" refresh kind to `true`.
| _________________^
60 | |
61 | | ```
62 | | use sysinfo::RefreshKind;
... |
68 | | assert_eq!(r.", stringify!($name), "(), true);
69 | | ```")]
| |_____^
...
191 | impl_get_set!(users_list, with_users_list, without_users_list);
| --------------------------------------------------------------- in this macro invocation
|
= note: see issue #78835 <https://github.com/rust-lang/rust/issues/78835> for more information
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0658]: arbitrary expressions in key-value attributes are unstable
--> /home/zulu/.cargo/registry/src/github.com-1ecc6299db9ec823/sysinfo-0.20.3/src/common.rs:75:17
|
75 | #[doc = concat!("Sets the value of the \"", stringify!($name), "\" refresh kind to `false`.
| _________________^
76 | |
77 | | ```
78 | | use sysinfo::RefreshKind;
... |
84 | | assert_eq!(r.", stringify!($name), "(), false);
85 | | ```")]
| |_____^
...
191 | impl_get_set!(users_list, with_users_list, without_users_list);
| --------------------------------------------------------------- in this macro invocation
|
= note: see issue #78835 <https://github.com/rust-lang/rust/issues/78835> for more information
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
error: aborting due to 32 previous errors
Some errors have detailed explanations: E0658, E0710.
For more information about an error, try `rustc --explain E0658`.
error: could not compile `sysinfo`
To learn more, run the command again with --verbose.
warning: build failed, waiting for other jobs to finish...
error[E0658]: use of unstable library feature 'osstring_ascii'
--> /home/zulu/.cargo/registry/src/github.com-1ecc6299db9ec823/clap-3.0.0-beta.4/src/parse/matches/matched_arg.rs:130:19
|
130 | v.eq_ignore_ascii_case(val)
| ^^^^^^^^^^^^^^^^^^^^
|
= note: see issue #70516 <https://github.com/rust-lang/rust/issues/70516> for more information
error: aborting due to 2 previous errors
For more information about this error, try `rustc --explain E0658`.
error: build failed
@nenominal Looks like an outdated version of Rust.
To build the Eruption master
branch you need at least the stable version of rustc
. Currently this would be version 1.55.0
.
Please refer to: https://rustup.rs/
Ok, I've updated my rustc version and I was able to build from master.
sudo eruption-hwutil list
Index: 01: ID: 1e7d:2d60 ROCCAT/ROCCAT Kain 200 Aimo Dongle
sudo eruption-hwutil -r status 01
Index: 01: ID: 1e7d:2d60 ROCCAT/ROCCAT Kain 200 Aimo Dongle
Bound driver: ROCCAT Kain 2xx AIMO
Sending device init sequence...
Polling device status...
Battery Level: 100% (513)
Signal Strength: 69% (13824)
Battery Level: 100% (513)
Signal Strength: 69% (13824)
I'm not sure if the battery level is correct as swarm shows it as 60%.
My bet is that battery level should be switched with signal strength
@nenominal
I'm not sure if the battery level is correct as swarm shows it as 60%. My bet is that battery level should be switched with signal strength
You are right, definitely seems to be incorrect. Seems that I picked the wrong field for the battery level read out. Hope to have something ready soon...
@nenominal, I have pushed out another round of commits on the master
branch!
It would be nice if you could give this a try again!
Still needs fixing, now it show like this
sudo eruption-hwutil -r status 01
Index: 01: ID: 1e7d:2d60 ROCCAT/ROCCAT Kain 200 Aimo Dongle
Transceiver enabled: true
Signal Strength: 66% (13314)
Battery Level: unknown (65)
The signal strength is still read from wrong field and the battery level shows unknown but the level is correct, I think.
Also, If I want to change some profiles from the Gnome extension, the daemon crash. Do you want me to open another ticket for this error?
sep 17 21:47:57 Nautilus eruption[42385]: The application panicked (crashed).
sep 17 21:47:57 Nautilus eruption[42385]: Message: cannot sample empty range
sep 17 21:47:57 Nautilus eruption[42385]: Location: /home/zulu/.cargo/registry/src/github.com-1ecc6299db9ec823/rand-0.8.4/src/rng.rs:134
sep 17 21:47:57 Nautilus eruption[42385]: Please consider reporting a bug at https://github.com/X3n0m0rph59/eruption
@nenominal Thanks again for testing!
Still needs fixing, now it show like this
Yes, I see... I now have full access to a ROCCAT Kain 200 AIMO
mouse device so testing will be much easier for me. I have updated the code to use the following mapping table:
Value | Percent |
---|---|
71 | fully charged |
65..70 | 100% |
64 | 80% |
63 | 60% |
62 | 40% |
61 | 20% |
60 | 0% |
others | unknown |
Will take a few days to see if this table is correct. I have to complete a full charge/discharge cycle of the device.
The signal strength is still read from wrong field and the battery level shows unknown but the level is correct, I think.
I believe the signal strength readings to be correct. I determined the scaling factor by placing the transceiver directly beneath the mouse. When positioned this way the indicator should reach 100% signal strength. I could apply a correction factor and show a descriptive text to more closely mimic the behavior of ROCCAT Swarm. The signal strength should be around 60% - 80% when the transceiver is placed about 40cm away from the mouse.
Also, If I want to change some profiles from the Gnome extension, the daemon crash. Do you want me to open another ticket for this error?
Yes, please open up another issue for this. Please post full logs! A full backtrace of the crash would be very helpful:
$ sudo RUST_BACKTRACE=full target/debug/eruption
Okay, I have gathered some more data and updated the mapping table respectively:
I have seen the following raw values from the ROCCAT Kain 200
until now: 71, 64, 65.
Raw Value | ROCCAT Swarm shows |
---|---|
71 | 100% |
64 | 80% |
65 | 60% |
66 | 40% |
67 | 20% |
68 | 0% |
others | unknown |
Ok, I've tested with new build and now it seems the battery level is correct.
On the other hand I still have some doubts about signal strength as it varies a lot, never goes up 62-63%. Swarm shows 100% and I think it's right as the dongle is at 10 cm from mouse itself.
Also, is there a way to set the DPI?
Ok, I've tested with new build and now it seems the battery level is correct.
Excellent!
On the other hand I still have some doubts about signal strength as it varies a lot, never goes up 62-63%. Swarm shows 100% and I think it's right as the dongle is at 10 cm from mouse itself.
It seems that ROCCAT Swarm applies a correction factor. I will look into this...
Also, is there a way to set the DPI?
No, not currently. but I am planning to implement this as well.
Maybe add the battery level in the gnome's extension dropdown or show it in some place to be easy noticeable?
@nenominal, I have released a new version of the Eruption Profile Switcher
GNOME Shell Extension that features battery level and signal strength indicators (where applicable).
Yey, nice, I'll give it a try. Did the extension got to extentions.gnome.org ?
If it's not very complicated I'd suggest to have the battery value in the taskbar, if it's possible of-course (and maybe the wireless signal on a later build if it will be implemented).
@nenominal
Did the extension got to extentions.gnome.org
Yes I published it on extensions.gnome.org (v18)
If it's not very complicated I'd suggest to have the battery value in the taskbar, if it's possible of-course (and maybe the wireless signal on a later build if it will be implemented).
Sounds good! I will implement this next
I think you have publish it only for Gnome 40 and up, I'm using Ubuntu 20.04 witch is running Gnome 3.36 and I only see v.15
Hello, is it possible to have the battery indicator on something like KDE ? I think plasma uses upower to fetch this data and I don't know if it's possible for you to make the battery data show up on upower ?
Hi @Nopraz, last time I looked into supporting Plasma / writing a Plasmoid for KDE I got stuck with implementing the D-Bus based protocol to Eruption. I will look into this again as soon as I find the time...
As you mentioned in your post, the best solution clearly would be to implement this stuff in upower.
Introduction Do you plan to add support for Roccat Kain 200/202 wireless mouse?
Describe The Problem To Be Solved
I'm more interested in battery detection so I can know when I need to recharge the mouse. Usually I disable all the RGB crap so battery last longer.