Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bluetooth disconnects immediately after connecting #8

Closed
jaxter0ne opened this issue May 2, 2022 · 16 comments
Closed

Bluetooth disconnects immediately after connecting #8

jaxter0ne opened this issue May 2, 2022 · 16 comments

Comments

@jaxter0ne
Copy link

jaxter0ne commented May 2, 2022

Hello,
I have tried setting up my Nespresso Expert with Brewer in homebridge both on a Mac running MacOS and a Raspberry Pi Zero W, but I haven't been able to successfully brew a coffee. It seems like the bluetooth connection drops immediately after connecting. I have tried to manually connect but it still doesn't work.

I get this inside the logs:
[Brewer] [WATCH] Machine Expert_CDD376ED07FE unreachable, still scanning

And also sometimes I get this:
noble warning: unknown handle 64 disconnected!

The Raspberry Pi is litterally behind the machine so I don't think it's a proximity problem.

I'm new to Raspberry Pi so any detailed help would be greatly appreciated.

Thanks

@tritter
Copy link
Owner

tritter commented May 10, 2022

Hi,

@jaxter0ne Could you try to get it work with: https://github.com/petergullberg/brewbutton#brewbutton-in-the-browser
Check the browser sample in chrome, if that works it should work too using the plugin.

My first guess is maybe the token is wrong?

Thanks,
Thom

@jaxter0ne
Copy link
Author

Thanks for your reply! I encounter the same problem with the brewbutton.
I'm quite a newbie and have tried multiple times to get the token and I've got the same result each time. Do you have a real step by step way to retrieve it using a Mac, iPhone, Android phone? (I just don't have a PC)

Thank you very much!

@tritter
Copy link
Owner

tritter commented May 12, 2022

@jaxter0ne unfortunately it is quite hard to get the token. I added a guide to the Readme, I know its technical but this was for me the easiest way with just a Mac and an Android device: https://github.com/tritter/homebridge-brewer#token

@jaxter0ne
Copy link
Author

Do you paste the hexdump command line inside the Terminal on the mac or elsewhere? I can't seem to be able to make that command work...

@tritter
Copy link
Owner

tritter commented Jun 8, 2022

Hi @jaxter0ne sorry for my late reply. Yes I think I used a Mac for that, but hexdump should be available on linux too.

@jaxter0ne
Copy link
Author

Thanks for your answer.
This is what I get:

0B 00 04 00 12 14 00 83 AE B5 5A 12 84 24 98
0B 00 04 00 12 14 00 83 AE B5 5A 12 84 24 98

So my token should be: 83-AE-B5-5A-12-84-24-98
Right?

But it still doesn't work...

@jaxter0ne
Copy link
Author

jaxter0ne commented Jun 8, 2022

Oh and this is how the plugin is configured on HomeBridge, if maybe it's not configured correctly:

    {
        "machines": [
            {
                "displayName": "Nespresso",
                "name": "Expert_CDD376ED07FE",
                "token": "83-AE-B5-5A-12-84-24-98",
                "temperature": "High"
            }
        ],
        "platform": "Brewer"
    }
]

@tritter
Copy link
Owner

tritter commented Jun 8, 2022

@jaxter0ne exactly looks good! Do you run on a raspberry do you have more Logs? Browser also didn't work for you? (https://github.com/petergullberg/brewbutton#brewbutton-in-the-browser)
Also make sure your phone is not connected to the machine (repower machine) as it can only have one connection at a time.

@jaxter0ne
Copy link
Author

It doesn't work in the browser either. This is what I get:

Requesting Bluetooth Device...
Connecting to GATT Server...
Getting Service...
Getting Characteristic...
established auth characteristic?
Writing Auth
authenticated
Notifications started
Reading status
Connected

Argh! NotSupportedError: GATT operation failed for unknown reason.

And then if I unplug and plug the machine again, this is what I get:

Requesting Bluetooth Device...
Connecting to GATT Server...
Getting Service...
Getting Characteristic...
established auth characteristic?
Writing Auth
authenticated
Argh! NotSupportedError: GATT operation failed for unknown reason.

@tritter
Copy link
Owner

tritter commented Jun 8, 2022

@jaxter0ne Hmm is this maybe a newer version of the expert? :/ Are you sure its an expert? ;)

@jaxter0ne
Copy link
Author

Well yes it is an expert, I bought it second hand because it's not sold by Nespresso anymore.
Maybe European models are different?

@tritter
Copy link
Owner

tritter commented Jun 8, 2022

Almost think so, do you understand bluetooth a bit? It looks like you're authenticated correctly but the gatt services have an error. Could you try a bluetooth scanner or change the browser site to read your characteristics?
You should find/change ids like these: https://github.com/petergullberg/brewbutton/blob/f907f4779a79ec822358f9eb12f0d480ca149060/brewbutton.html#L77

In the BLE Snoop you should also find them, at leas the authentication should be the same: "06aa3a41-f22a-11e3-9daa-0002a5d5c51b"

@jaxter0ne
Copy link
Author

Hm no I have no idea how to do that unfortunately. Could I send you my btsnoop_hci.log file so you can look it up maybe? Or if you can walk me through it I can try.

@tritter
Copy link
Owner

tritter commented Jun 8, 2022

@jaxter0ne yes brew a coffee and send that snoop log, that should usually contain all data. Thanks for your patience.

@jaxter0ne
Copy link
Author

This is the latest one I did. Please tell me if you need a new one.

Thank you so much for your help!

@tritter
Copy link
Owner

tritter commented Nov 24, 2022

@jaxter0ne updated dependencies, may be fixed now.

@tritter tritter closed this as completed Nov 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants