JojiiOfficial / LiveBudsCli

A tool to control your Galaxy buds+, Live, Buds Pro and Buds 2 Pro
https://crates.io/crates/earbuds
GNU General Public License v3.0
192 stars 16 forks source link

Support of Galaxy Buds Pro? #66

Closed bzyx closed 3 years ago

bzyx commented 3 years ago

I've build earbuds from current master and used it connect command to connect to my Galaxy Buds Pro, it connected and I can play music, but earbuds status returns "No connected device found"

Here is the verbose log.

earbuds -k -d --no-fork Connected successfully to Buds live! thread 'async-std/runtime' panicked at 'not implemented', /home/marcin/.cargo/registry/src/github.com-1ecc6299db9ec823/galaxy_buds_rs-0.2.9/src/message/extended_status_updated.rs:107:14 note: run withRUST_BACKTRACE=1environment variable to display a backtrace device "/org/bluez/hci0/dev_64_03_7F_85_78_76" device "/org/bluez/hci0/dev_64_03_7F_85_78_76"

JojiiOfficial commented 3 years ago

That is weird. Did you build it before? This error tells me there is a panic in extended_status_updated.rs:107 in the connection library but this line differs from the latest version (143) which means it didn't use the latest version with buds pro support. Are you sure you're using the latest git commit? Could you try to run cargo update, delete the ./target folder and build it again?

bzyx commented 3 years ago

I'll try again. Actually I tried to build but it failed because I had 1.5.0 version of rust/cargo. Then I uninstalled everything and tried again after installing using rustup, and maybe some old build artifacts were preserved.

JojiiOfficial commented 3 years ago

You mean 1.50.0? This should work though, at least the error shouldn't be caused by the version of rust since it is still pretty new

bzyx commented 3 years ago

Yes, 1.50.0 was installed from Ubuntu 21.04 apt repository. Here is the build error I have on that version.


cargo install earbuds
    Updating crates.io index
  Installing earbuds v0.1.8
error: failed to compile `earbuds v0.1.8`, intermediate artifacts can be found at `/tmp/cargo-installyfj8B9`

Caused by:
  failed to download `zvariant v2.8.0`

Caused by:
  unable to get packages from source

Caused by:
  failed to parse manifest at `/home/marcin/.cargo/registry/src/github.com-1ecc6299db9ec823/zvariant-2.8.0/Cargo.toml`

Caused by:
  feature `resolver` is required

  consider adding `cargo-features = ["resolver"]` to the manifest
bzyx commented 3 years ago

After clean recompiling it worked! So it was my fault that I didn't clean up after failed builds.

./target/debug/earbuds status
Info for 'Galaxy Buds Pro (7876)':

Battery:        L: 68%, R: 66%
Equalizer:      Dynamic
ANC:            Enabled
Touchpads:      Enabled
Left option:    NoiseCanceling
Right option:   Spotify
Temp. left:     29.3°C
Temp. right:    29.1°C

Thank you for your help and great tool!

JojiiOfficial commented 3 years ago

I'm glad it works now

This other error looks interesting though. Maybe I should bump a new version.