Coder Social home page Coder Social logo

sony-headphones-control's Introduction

Sony Headphones Control

It's a Tasker/Locale plugin to control bluetooth headphones from Sony.

You can use it to automatically change ambient sound settings. Also you can use it as standalone app if you want.

Supported headphones:

  • WF-1000XM3
  • WH-1000XM2
  • WH-1000XM3
  • WH-XB900N
  • WI-1000X

Some screenshots

main main

sony-headphones-control's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

sony-headphones-control's Issues

WF-1000XM3 2.1.0 Error

The app can no longer interact with the WF-1000XM3 after the January 14th update, version 2.1.0. An error message of "IO error (Another application using a headset? Is it connected?)" is thrown.

App crashes with NPE when getting Bluetooth devices

On my Pixel 3 with Android 10 the all crashes with the following exception:

FATAL EXCEPTION: main
Process: com.clusterrr.sonyheadphonescontrol, PID: 14490
java.lang.NullPointerException: Attempt to get length of null array
	at com.clusterrr.sonyheadphonescontrol.TaskerFireReceiver.sendData(TaskerFireReceiver.java:133)
	at com.clusterrr.sonyheadphonescontrol.TaskerFireReceiver.setAmbientSound(TaskerFireReceiver.java:122)
	at com.clusterrr.sonyheadphonescontrol.TaskerFireReceiver.execute(TaskerFireReceiver.java:91)
	at com.clusterrr.sonyheadphonescontrol.MainActivity.onClick(MainActivity.java:110)
	at android.view.View.performClick(View.java:7140)
	at android.view.View.performClickInternal(View.java:7117)
	at android.view.View.access$3500(View.java:801)
	at android.view.View$PerformClick.run(View.java:27351)
	at android.os.Handler.handleCallback(Handler.java:883)
	at android.os.Handler.dispatchMessage(Handler.java:100)
	at android.os.Looper.loop(Looper.java:214)
	at android.app.ActivityThread.main(ActivityThread.java:7356)
	at java.lang.reflect.Method.invoke(Native Method)
	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492)
	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:930)

Publish on f-droid

Hi

I've just got a pair of the Sony WH-1000MX3 headphones and as you may know they are great ๐Ÿ˜„ However, it really hurts to install the "Sony Headphones Connect App". Your App is simple, has no trackers and is opensource! Therefore it would be cool to publish it on F-Droid - it shouldn't be super complicated How to contribute to f-droid
If its okay for you, I can go through the necessary changes and additions. What do you think about it?

Request: Case battery info for WF-1000XM3

First off, I'm so happy to have found this and really appreciate your work towards this app! I'd be happy to donate to your coffee fund if that's an option.

Now that WF-1000XM3 can get the battery level for the case, I'm wondering whether you would be able to get that value as a variable for tasker? I imagine this could be setup similar to other plugins, where there is query action that pulls the plugin's variables.

Some explanation of how it works?

Hi there, thanks for this promising looking repo!

I've recently got a WF-1000XM4, wanted a finer control of the noise cancelling, and came across your repo. The initial apk does not work initially (says headset not found). After playing around with it for a while, I realise the checks on UUID.
I found that XM4 generates the following UUID:

{'00000000-0000-1000-8000-00805f9b34fb',
 '00000000-deca-fade-deca-deafdecacaff',
 '00001108-0000-1000-8000-00805f9b34fb',
 '0000110b-0000-1000-8000-00805f9b34fb',
 '0000110e-0000-1000-8000-00805f9b34fb',
 '0000111e-0000-1000-8000-00805f9b34fb',
 '764cbf0d-bbcb-438f-a8bb-6b92759d6053',
 '85dbf2f9-73e3-43f5-a129-971b91c72f1e',
 '8901dfa8-5c7e-4d8f-9f0c-c2b70683f5f0',
 '956c7b26-d49a-4ba8-b03f-b17d393cb6e2'}

and added one of these uuid (I simply took the last uuid):

diff --git a/app/src/main/java/com/clusterrr/sonyheadphonescontrol/TaskerFireReceiver.java b/app/src/main/java/com/clusterrr/sonyheadphonescontrol/TaskerFireReceiver.java
index 9e97f2c..8e6a74a 100644
--- a/app/src/main/java/com/clusterrr/sonyheadphonescontrol/TaskerFireReceiver.java
+++ b/app/src/main/java/com/clusterrr/sonyheadphonescontrol/TaskerFireReceiver.java
@@ -44,7 +44,8 @@ public final class TaskerFireReceiver extends BroadcastReceiver {
     public static final String TAG = "SonyHeadphonesControl";
     public static final UUID[] HEADSET_UUIDS = new UUID[]{
             UUID.fromString("96cc203e-5068-46ad-b32d-e316f5e069ba"),
-            UUID.fromString("ba69e0f5-16e3-2db3-ad46-68503e20cc96")
+            UUID.fromString("ba69e0f5-16e3-2db3-ad46-68503e20cc96"),
+            UUID.fromString("956c7b26-d49a-4ba8-b03f-b17d393cb6e2")
     };

Now, the app seems to now able to detect the XM4 but all of the action has no effect (e.g. enable noise/wind cancelling, set ambient sound, etc.) I think perhaps the bytes that it writes are incompatible?.

Example log:

2022-05-13 13:27:33.687 11996-11996/com.clusterrr.sonyheadphonescontrol I/SonyHeadphonesControl: Headset found: 14:3F:A6:ED:7F:1B WF-1000XM4
2022-05-13 13:27:33.824 11996-11996/com.clusterrr.sonyheadphonescontrol D/SonyHeadphonesControl: BluetoothSocket connected: true
2022-05-13 13:27:33.828 11996-11996/com.clusterrr.sonyheadphonescontrol D/SonyHeadphonesControl: write: 3e 0c 00 00 00 00 08 68 02 00 02 00 01 00 00 81 3c
2022-05-13 13:27:33.867 11996-11996/com.clusterrr.sonyheadphonescontrol D/SonyHeadphonesControl: read: 3e 01 01 00 00 00 00 02 3c
2022-05-13 13:27:33.868 11996-11996/com.clusterrr.sonyheadphonescontrol D/BluetoothSocket: close() this: android.bluetooth.BluetoothSocket@83601d0, channel: 9, mSocketIS: android.net.LocalSocketImpl$SocketInputStream@a6c55c9, mSocketOS: android.net.LocalSocketImpl$SocketOutputStream@4b9f4cemSocket: android.net.LocalSocket@1182fef impl:android.net.LocalSocketImpl@7c16afc fd:java.io.FileDescriptor@6db8585, mSocketState: CONNECTED
2022-05-13 13:27:33.875 11996-11996/com.clusterrr.sonyheadphonescontrol I/Quality: Skipped: false 23
2022-05-13 13:27:45.558 11996-12014/com.clusterrr.sonyheadphonescontrol D/BluetoothSocket: close() this: android.bluetooth.BluetoothSocket@99715d3, channel: 9, mSocketIS: android.net.LocalSocketImpl$SocketInputStream@22cc510, mSocketOS: android.net.LocalSocketImpl$SocketOutputStream@b7af809mSocket: null, mSocketState: CLOSED
2022-05-13 13:27:45.560 11996-12014/com.clusterrr.sonyheadphonescontrol D/BluetoothSocket: close() this: android.bluetooth.BluetoothSocket@f29fe3b, channel: 9, mSocketIS: android.net.LocalSocketImpl$SocketInputStream@cf96958, mSocketOS: android.net.LocalSocketImpl$SocketOutputStream@65adab1mSocket: null, mSocketState: CLOSED
2022-05-13 13:27:45.561 11996-12014/com.clusterrr.sonyheadphonescontrol D/BluetoothSocket: close() this: android.bluetooth.BluetoothSocket@f522007, channel: 9, mSocketIS: android.net.LocalSocketImpl$SocketInputStream@823f534, mSocketOS: android.net.LocalSocketImpl$SocketOutputStream@63d6f5dmSocket: null, mSocketState: CLOSED
2022-05-13 13:27:45.562 11996-12014/com.clusterrr.sonyheadphonescontrol D/BluetoothSocket: close() this: android.bluetooth.BluetoothSocket@83601d0, channel: 9, mSocketIS: android.net.LocalSocketImpl$SocketInputStream@a6c55c9, mSocketOS: android.net.LocalSocketImpl$SocketOutputStream@4b9f4cemSocket: null, mSocketState: CLOSED

My question is, how did you figure out what bytes to write to the BluetoothSocket? Was it via using some sort of app/logcat to monitor the Bluetooth traffic?

If you can provide some pointers that'd be great. Thanks!

Support for WF-SP800N

This seems like such a useful tool. My WF-SP800N headphones keep defaulting to Ambient Sound Control "on".

I wonder if it would be possible to add support for these headphones?

[Request] Volume Control

The Sony Wf-1000xm3 do not support volume control on Linux. It would be great if the Bluetooth commands for it could be reverse engineered.

Crashes with WF-1000XM5

Crashes when trying to control ANC on the WF-1000XM5.
Support for those would be very cool.

Linux version

Would it be possible to have a small Linux version that I could run in command prompt?

Feature, adding EQ and settings backup.

I fully admit I have not used the app yet, my WF-XM3's need a battery replacement and have been acting up since I got them.

Regardless of that though, I was hoping to see the ability to use this app as a replacement for the normal app. I was hoping to be able to use an EQ as well as backup & restore options.

After that I personally could get everything I have ever wanted in a set of earbuds: repairability, reliablility sustainability and lastly foss. While having the vary nice bonus of them sounding really good.

EQ's I think are a must for any audio software.
However what isan't a must but would also be nice is the ability to fully custimize the touch controls.

I don't know what sony was thinking when they made their app but not being able custimize those settings futher then a drop down menu is a little annoying.
Anyway, love how it's looking so far.

WF1000xm4 support

tried my luck downloading this but it doesn't seem to recognize my wf1000xm4, could support be added?

Sony WH-1000XM4 support

As the title suggests, are the Sony WH-1000XM4 going to be supported? I tested the app and works fine but the tasker plugin cannot turn on ANC again after disabling it...
All other options work fine when using them from tasker task plugin.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.