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

Sending RPC doesn't work with Chrome on macOS #213

Open
zehnm opened this issue Jan 26, 2024 · 0 comments
Open

Sending RPC doesn't work with Chrome on macOS #213

zehnm opened this issue Jan 26, 2024 · 0 comments

Comments

@zehnm
Copy link

zehnm commented Jan 26, 2024

I'm implementing improv-wifi BLE on ESP32 with IDF 5.1 and NimBLE, but sendRPC calls never reach my device when using Chrome on a Mac. Reading state and capabilities characteristics works, but RPC requests are simply "swallowed" using https://esphome.github.io/esp-web-tools/.

Cross referencing it with the ESP Web Tools firmware showed the exact same behaviour: provisioning is never initiated and the web app gets stuck!

The same issue has been described in #212 but has been closed due to inactivity. So it seems I'm not the only one.

  • Chrome 120 with macOS 13.6.4 on M1 Max
  • Chrome doesn't show any console warnings or errors when using the identify request or sending wifi credentials.
  • Since sendRPC doesn't seem to have any error handling (maybe they are bubbled up, but I'm not a JS developer), I've patched it with the developer tools in Chrome and added an error handler around this._rpcCommandChar.writeValueWithoutResponse(i), but it always returns success. The write call returns ok, and debugging shows the correct payload, but the data never reaches the peripheral.

Now the fun part:

  • When using Chrome's Bluetooth internals chrome://bluetooth-internals/#devices on my Mac I can write the RPC command characteristic and 0x020002 triggers the identify command.
  • I only encounter this on my Mac. It works with Chrome on Linux and on an Android tablet.

I'd like to use improv-wifi BLE in our product and get this working on Mac as well.
I'm happy to provide more information if required to help resolve this issue.

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

1 participant