gmallios / soundcoremanager Goto Github PK
View Code? Open in Web Editor NEWControl Soundcore headphones with the power of Rust.
Control Soundcore headphones with the power of Rust.
Implement auto updates using Tauri and Github Actions.
Hello,
Thanks for the hard work.
I have tried v0.1.0:
All of them stuck here:
my pc:
Current status of Soundcore Space A40 (A3936) support:
The official Soundcore app uses the Bluetooth name to determine the model id of the device.
These names are prefixed with label_(modelid) in the strings.xml
When we try to connect to an RFCOMM service when already connected to a device, the service is not found.Disconnecting and opening that connection through the bluetooth-lib allows us to connect to that service.
Perhaps we should wait after the performSdpQuery like in https://github.com/eelcocramer/node-bluetooth-serial-port/blob/master/src/macos/BluetoothWorker.mm
Current status of Soundcore vr p10 (A3850) support:
Current status of Life A2 NC (A3935) support
Using pybluez we can write a rfcomm server to emulate a device and interact with it using the official app, thus allowing us to see what gets sent to the device and what responses map to.
A small test as a PoC was done using ubuntu and pybluez's rfcomm-server example and changing the broadcast name to Soundcore Space Q45. On Windows that didn't work because the device wouldn't connect (maybe a usb dongle problem).
Reply with the device Model ID and the name.
Current status of Soundcore Liberty 4 NC LE (A3947 ) support:
@gmallios, soundCoreManager unstable (downloaded from link in the ReadMe) Inspect console logs from
tauri.localhost-1714595725234.log
i saved logs corresponding to the RedLine using "Save as..."
Current status of Life Q35/A3027 support
I had some experience doing something similar with a Bluetooth module for Arduino by connecting using AT mode and configuring the chip, its probably not possible but worth asking.
I've created an issue ticket on a similar repo you have also interacted with before. The issue ticket has the logs.
KillerBOSS2019/SoundcoreDesktop#12
Current status of Life Q30(A3028)/Life Tune (A3029) support
Current status of Soundcore Space Q45 (A3040) support:
Trying to build this on my mac and Im getting this error.
marcinbauer@marcinbauercodiblycom SoundcoreManager-macos-fixes % yarn tauri build yarn run v1.22.19 $ tauri build Running beforeBuildCommand
yarn build`
$ tsc && vite build
vite v4.3.1 building for production...
✓ 1107 modules transformed.
dist/index.html 0.40 kB │ gzip: 0.28 kB
dist/assets/a3951_img_device_left-4d0d7088.webp 8.56 kB
dist/assets/a3951_img_device_right_edited-0c3d60b2.webp 8.71 kB
dist/assets/a3040_img_device-877189fe.webp 15.24 kB
dist/assets/a3935_img_device-a77ed0ac.webp 19.28 kB
dist/assets/a3027_img_device-e0d85385.webp 33.85 kB
dist/assets/a3029_img_device-56d22a6c.webp 38.49 kB
dist/assets/a3028_img_device-cdafd53d.webp 46.67 kB
dist/assets/index-c4dd7fee.js 737.05 kB │ gzip: 242.93 kB
(!) Some chunks are larger than 500 kBs after minification. Consider:
iobluetooth v0.1.0 (/Users/marcinbauer/Downloads/SoundcoreManager-macos-fixes/bluetooth-lib/iobluetooth)
Caused by:
process didn't exit successfully: /Users/marcinbauer/Downloads/SoundcoreManager-macos-fixes/src-tauri/target/release/build/iobluetooth-4556dd54046b94a3/build-script-build
(exit status: 101)
--- stdout
cargo:rerun-if-changed=protos/search.proto
cargo:rerun-if-changed=protos
--- stderr
thread 'main' panicked at 'Could not find protoc
installation and this build crate cannot proceed without
this knowledge. If protoc
is installed and this crate had trouble finding
it, you can set the PROTOC
environment variable with the specific path to your
installed protoc
binary.You could try running brew install protobuf
or downloading it from https://github.com/protocolbuffers/protobuf/releases
For more information: https://docs.rs/prost-build/#sourcing-protoc
', /Users/marcinbauer/.cargo/registry/src/index.crates.io-6f17d22bba15001f/prost-build-0.11.4/src/lib.rs:1296:10
note: run with RUST_BACKTRACE=1
environment variable to display a backtrace
warning: build failed, waiting for other jobs to finish...
Error failed to build app: failed to build app
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.`
Any ideas what can be wrong?
After choosing to connect to Soundcore Libery Air 2 Pro the screen is loading forever and in the console I get a lot of checksum errors
tauri.localhost-1680858911042.log
We should filter the Bluetooth names to figure out if it is a Soundcore device and if it is connected.
Current status of Soundcore A3i (A3992) support
Originally posted by vernonet August 22, 2023
What operating systems does the Windows app support? Doesn't work for me on win 7 x64. I tried it on two PCs with Windows 7 x64 - the application does not find various libraries (for example, bluetoothapis.dll, etc.). Works fine on win 10.
Currently, when a user changes an ANC mode through the tray menu the UI doesn't reflect this change. This is not the intended behaviour.
The current way of parsing can cause panics since it is able to index out of bounds and is not idiomatic. A small refactor should be done to use iterators
Title refers to the "Windows Latest standalone binary" download.
yarn run v1.22.19
$ tauri build
Running beforeBuildCommand yarn build
$ tsc && vite build
vite v3.2.5 building for production...
✓ 1105 modules transformed.
dist/assets/a3027_img_device.e0d85385.webp 33.06 KiB
dist/assets/a3028_img_device.cdafd53d.webp 45.58 KiB
dist/assets/a3029_img_device.56d22a6c.webp 37.58 KiB
dist/assets/a3951_img_device_left.4d0d7088.webp 8.36 KiB
dist/assets/a3951_img_device_right_edited.0c3d60b2.webp 8.51 KiB
dist/assets/a3040_img_device.877189fe.webp 14.88 KiB
dist/assets/a3935_img_device.a77ed0ac.webp 18.83 KiB
dist/index.html 0.39 KiB
dist/assets/index.95be6cc2.js 570.16 KiB / gzip: 185.16 KiB
(!) Some chunks are larger than 500 KiB after minification. Consider:
Using dynamic import() to code-split the application
Use build.rollupOptions.output.manualChunks to improve chunking: https://rollupjs.org/guide/en/#outputmanualchunks
Adjust chunk size limit for this warning via build.chunkSizeWarningLimit.
warning: unused import: PathBuf
--> build.rs:3:18
|
3 | path::{Path, PathBuf},
| ^^^^^^^
|
= note: #[warn(unused_imports)]
on by default
Compiling bluetooth-lib v0.1.0 (/Users/amr/tools/SoundcoreManager/bluetooth-lib)
warning: soundcoremanager
(build script) generated 1 warning
Compiling soundcoremanager v0.1.1 (/Users/amr/tools/SoundcoreManager/src-tauri)
error[E0433]: failed to resolve: use of undeclared crate or module windows
--> /Users/amr/tools/SoundcoreManager/bluetooth-lib/src/error.rs:27:17
|
27 | source: windows::core::Error,
| ^^^^^^^ use of undeclared crate or module windows
warning: unused imports: RefCell
, Ref
, sync::Arc
--> /Users/amr/tools/SoundcoreManager/bluetooth-lib/src/macos/rfcomm.rs:3:12
|
3 | cell::{Ref, RefCell},
| ^^^ ^^^^^^^
4 | sync::Arc,
| ^^^^^^^^^
|
= note: #[warn(unused_imports)]
on by default
warning: unused imports: Handle
, Runtime
--> /Users/amr/tools/SoundcoreManager/bluetooth-lib/src/macos/rfcomm.rs:6:22
|
6 | use tokio::runtime::{Handle, Runtime};
| ^^^^^^ ^^^^^^^
For more information about this error, try rustc --explain E0433
.
warning: bluetooth-lib
(lib) generated 2 warnings
error: could not compile bluetooth-lib
due to previous error; 2 warnings emitted
warning: build failed, waiting for other jobs to finish...
error: failed to run custom build command for soundcoremanager v0.1.1 (/Users/amr/tools/SoundcoreManager/src-tauri)
Caused by:
process didn't exit successfully: /Users/amr/tools/SoundcoreManager/src-tauri/target/release/build/soundcoremanager-7d8a811d0b5bc1b5/build-script-build
(exit status: 101)
--- stderr
Compiling iobluetooth v0.1.0 (/Users/amr/tools/SoundcoreManager/bluetooth-lib/iobluetooth)
warning: unused import: objc::runtime::Object
--> src/server.rs:3:5
|
3 | use objc::runtime::Object;
| ^^^^^^^^^^^^^^^^^^^^^
|
= note: #[warn(unused_imports)]
on by default
warning: unused import: Instant
--> src/inquiry_adapter.rs:3:22
|
3 | time::{Duration, Instant},
| ^^^^^^^
warning: unused imports: NSDate
, NSRunLoop
--> src/inquiry_adapter.rs:10:18
|
10 | foundation::{NSDate, NSRunLoop},
| ^^^^^^ ^^^^^^^^^
warning: unused imports: Boolean
, CFRunLoopGetCurrent
, CFRunLoopRunInMode
, CFRunLoopRun
, CFRunLoopStop
, CFStringCreateWithBytesNoCopy
, CFStringRef
, CFString
, kCFAllocatorDefault
, kCFAllocatorNull
, kCFStringEncodingUTF8
--> src/inquiry_adapter.rs:13:12
|
13 | base::{kCFAllocatorDefault, kCFAllocatorNull, Boolean},
| ^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^ ^^^^^^^
14 | mach_port::CFIndex,
15 | runloop::{CFRunLoopGetCurrent, CFRunLoopRun, CFRunLoopRunInMode, CFRunLoopStop},
| ^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^
16 | string::{kCFStringEncodingUTF8, CFString, CFStringCreateWithBytesNoCopy, CFStringRef},
| ^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^
warning: unused imports: Class
, Object
--> src/inquiry_adapter.rs:22:15
|
22 | runtime::{Class, Object},
| ^^^^^ ^^^^^^
warning: unused imports: Receiver
, Sender
, self
--> src/inquiry_delegate.rs:2:30
|
2 | use futures::channel::mpsc::{self, Receiver, Sender};
| ^^^^ ^^^^^^^^ ^^^^^^
warning: unused import: futures::sink::SinkExt
--> src/inquiry_delegate.rs:3:5
|
3 | use futures::sink::SinkExt;
| ^^^^^^^^^^^^^^^^^^^^^^
warning: unused imports: uint32_t
, uint8_t
--> src/iobluetoothdevice.rs:4:12
|
4 | use libc::{uint32_t, uint8_t, KERN_SUCCESS};
| ^^^^^^^^ ^^^^^^^
warning: unused import: rc::StrongPtr
--> src/iobluetoothdevice.rs:7:5
|
7 | rc::StrongPtr,
| ^^^^^^^^^^^^^
warning: unused import: IOBluetoothRFCOMMChannel
--> src/iobluetoothdevice.rs:12:37
|
12 | use crate::util::{string_to_string, IOBluetoothRFCOMMChannel, IOReturn};
| ^^^^^^^^^^^^^^^^^^^^^^^^
warning: unused imports: BufRead
, BufReader
, Read
, TcpListener
, TcpStream
, Write
--> src/rfcomm_delegate.rs:2:10
|
2 | io::{BufRead, BufReader, Read, Write},
| ^^^^^^^ ^^^^^^^^^ ^^^^ ^^^^^
3 | net::{TcpListener, TcpStream},
| ^^^^^^^^^^^ ^^^^^^^^^
warning: unused import: Protocol
--> src/rfcomm_delegate.rs:13:30
|
13 | runtime::{Class, Object, Protocol, Sel},
| ^^^^^^^^
warning: unused import: crate::util::IOBluetoothRFCOMMChannel
--> src/rfcomm_delegate.rs:17:5
|
17 | use crate::util::IOBluetoothRFCOMMChannel;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
warning: unused import: NSData
--> src/util.rs:5:18
|
5 | foundation::{NSData, NSString},
| ^^^^^^
warning: use of deprecated type alias libc::uint32_t
: Use u32 instead.
--> src/iobluetoothdevice.rs:4:12
|
4 | use libc::{uint32_t, uint8_t, KERN_SUCCESS};
| ^^^^^^^^
|
= note: #[warn(deprecated)]
on by default
warning: use of deprecated type alias libc::uint8_t
: Use u8 instead.
--> src/iobluetoothdevice.rs:4:22
|
4 | use libc::{uint32_t, uint8_t, KERN_SUCCESS};
| ^^^^^^^
error[E0308]: mismatched types
--> src/iobluetoothdevice.rs:84:13
|
81 | pub fn is_paired(&self) -> bool {
| ---- expected bool
because of return type
...
84 | is_paired
| ^^^^^^^^^ expected bool
, found i8
Expected type did not match the received type.
Erroneous code examples:
fn plus_one(x: i32) -> i32 {
x + 1
}
plus_one("Not a number");
// ^^^^^^^^^^^^^^ expected `i32`, found `&str`
if "Not a bool" {
// ^^^^^^^^^^^^ expected `bool`, found `&str`
}
let x: f32 = "Not a float";
// --- ^^^^^^^^^^^^^ expected `f32`, found `&str`
// |
// expected due to this
This error occurs when an expression was used in a place where the compiler
expected an expression of a different type. It can occur in several cases, the
most common being when calling a function and passing an argument which has a
different type than the matching type in the function declaration.
...skipping...
error[E0308]: mismatched types
--> src/iobluetoothdevice.rs:91:13
|
88 | pub fn is_connected(&self) -> bool {
| ---- expected bool
because of return type
...
91 | is_connected
| ^^^^^^^^^^^^ expected bool
, found i8
error[E0308]: mismatched types
--> src/util.rs:146:13
|
143 | pub fn is_open(&self) -> bool {
| ---- expected bool
because of return type
...
146 | is_open
| ^^^^^^^ expected bool
, found i8
For more information about this error, try rustc --explain E0308
.
warning: iobluetooth
(bin "soundcoremanager-iobtserver") generated 16 warnings
error: could not compile iobluetooth
due to 3 previous errors; 16 warnings emitted
thread 'main' panicked at 'Failed to build iobluetooth server!', build.rs:49:9
note: run with RUST_BACKTRACE=1
environment variable to display a backtrace
Error failed to build app: failed to build app
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.