Hi! Actually someone else had exactly this problem recently!
The issue is that setServices sets the services that are available once you're connected to the device. There's another type of services - advertised services - that are broadcast to everyone even when not connected, and it's those that Web Bluetooth is looking for.
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
Hi! Actually someone else had exactly this problem recently!
The issue is that
setServices
sets the services that are available once you're connected to the device. There's another type of services - advertised services - that are broadcast to everyone even when not connected, and it's those that Web Bluetooth is looking for.It's actually in the second half of the setServices docs: https://www.espruino.com/Reference#l_NRF_setServices
Something like this should fix it:
Out of interest, any thoughts about where I could put some info on this so others are less likely to fall into the same trap :)