How to call RPC via BLE (e.g. for WiFi setup)

Take a look at
This is a Web (JavaScript) client, which works on Google Chrome browser only (it has BLE support).
The core logic in contained in this file: , which implements a blerpc function:

var blerpc = async function(dev, method, params) {

And this is how that function is called by the

var params = {
  config: {
    wifi: {
      ap: {enable: false},
      sta: {
        enable: true,
        ssid: 'SSID',
        pass: 'PASSWORD',
blerpc(app.state.device, 'Config.Set', params)
    .then(function(f) {
      blerpc(app.state.device, 'Config.Save', {reboot: true})
    .then(function() {
    .catch(function(err) {

A useful tool - but worth noting that it only works on Chrome desktop. Chrome on iOS doesn’t work (haven’t checked Android).

Ironically, if you try it on Chrome for iOS it says “…not supported… Please use Chrome”. Would be helpful to reword this.

1 Like