Skip to content

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

@zehnm

Description

@zehnm

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions