Wi-Fi Setup with Web Browser Instead of Mobile App

Hi everyone,

I see that the docs provide examples for doing product Wi-Fi setup over BLE using React Native, examples for iOS and Android, and a tool to do it on the web using a USB cable. Is there a way to do Wi-Fi setup, in my case on an M404, using BLE on a webpage instead of an iOS or Android app?

[Edit] Alternatively, I've used the WiFiManager library for ESP8266 before for a previous project, and this was a pretty good user experience. I remember reading a post here about this, and I think the result was that there isn't anything similar for M404 devices. I just wanted to confirm if that's still the case, since something like that would be a great solution.

Hi Hector,

Here are some options I know.

One option:

Another option:

Best,

1 Like

Browser-based BLE setup is possible, however iOS does not support WebBLE in Safari or Chrome, so that pretty much makes it non-viable.

Additionally, support for WebBLE in desktop browsers is better on recent laptops, but very unreliable or not available on older laptops.

Using the built-in BLE setup code from WebBLE is possible, but setting up the encryption will be difficult. You can use a simpler protocol that will make it much easier, but probably less secure.

@gusgonnet,

The first solution you shared might be a good enough solution for now, but it does seem to require having a cellular connection to begin with (to send the Wi-Fi credentials to the evice), which isn't always guarenteed in my case and is the reason we're using an M404 with Wi-Fi in the first place.

It looks like the ble-wifi-setup-manager only currently supports Argon and P2 devices. When trying to build for the M404 I got an error saying #error "This library only works on the Argon or P2!" - If this were ever extended to support M404, I think this would be a viable solution for us.

The problem with ble-wifi-setup-manager is really a one-line change, I think. In ble_wifi_setup_manager.cpp

// Before:
#if PLATFORM_ID != PLATFORM_ARGON && PLATFORM_ID != PLATFORM_P2

// After:
#if PLATFORM_ID != PLATFORM_ARGON && PLATFORM_ID != PLATFORM_P2 && PLATFORM_ID != PLATFORM_MSOM
2 Likes

I had hoped this was the case. I'll try it out when I get the chance. Thanks!